From 45b246e926343cbb603abfff071b02bd3af970e8 Mon Sep 17 00:00:00 2001 From: Harmonic Date: Fri, 31 May 2019 11:02:22 -0400 Subject: [PATCH 01/13] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4441b151..1df67672 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ TheGeneral's own words were "dont like it then dont use it". We did not like wha Arcturus Morningstar is released under the [GNU General Public License v3](https://www.gnu.org/licenses/gpl-3.0.txt). ## Versions ## +![image](https://img.shields.io/badge/STATUS-STABLE-blue.svg?style=for-the-badge&logo=appveyor) Stable Version: **2.0.0** Compiled Download: https://git.krews.org/morningstar/Arcturus-Community/releases From 097c2ea85a25022e7e884f3fd4f5e6b94d88c9a6 Mon Sep 17 00:00:00 2001 From: Harmonic Date: Fri, 31 May 2019 11:04:24 -0400 Subject: [PATCH 02/13] Update README.md --- README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index 1df67672..c145f88e 100644 --- a/README.md +++ b/README.md @@ -12,12 +12,8 @@ Arcturus Morningstar is released under the [GNU General Public License v3](https ## Versions ## ![image](https://img.shields.io/badge/STATUS-STABLE-blue.svg?style=for-the-badge&logo=appveyor) -Stable Version: **2.0.0** - +![image](https://img.shields.io/badge/VERSION-2.0.0-success.svg?style=for-the-badge&logo=appveyor) Compiled Download: https://git.krews.org/morningstar/Arcturus-Community/releases - -UnStable Version: **2.1.0** - Client build: **PRODUCTION-201611291003-338511768** ## Reporting problems ## From e0e509fc45a2807fb752afcc818da1be81515beb Mon Sep 17 00:00:00 2001 From: Harmonic Date: Fri, 31 May 2019 11:04:47 -0400 Subject: [PATCH 03/13] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c145f88e..b294174a 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,9 @@ Arcturus Morningstar is released under the [GNU General Public License v3](https ## Versions ## ![image](https://img.shields.io/badge/STATUS-STABLE-blue.svg?style=for-the-badge&logo=appveyor) + ![image](https://img.shields.io/badge/VERSION-2.0.0-success.svg?style=for-the-badge&logo=appveyor) + Compiled Download: https://git.krews.org/morningstar/Arcturus-Community/releases Client build: **PRODUCTION-201611291003-338511768** From 7c57d35d67705000a2983e730aba3ce809c60a40 Mon Sep 17 00:00:00 2001 From: Harmonic Date: Fri, 31 May 2019 11:05:05 -0400 Subject: [PATCH 04/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b294174a..763ac232 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,10 @@ Arcturus Morningstar is released under the [GNU General Public License v3](https ## Versions ## ![image](https://img.shields.io/badge/STATUS-STABLE-blue.svg?style=for-the-badge&logo=appveyor) - ![image](https://img.shields.io/badge/VERSION-2.0.0-success.svg?style=for-the-badge&logo=appveyor) Compiled Download: https://git.krews.org/morningstar/Arcturus-Community/releases + Client build: **PRODUCTION-201611291003-338511768** ## Reporting problems ## From 4c85be81655fdca2c2859322ffbf9731b1e28274 Mon Sep 17 00:00:00 2001 From: Harmonic Date: Fri, 31 May 2019 11:09:42 -0400 Subject: [PATCH 05/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 763ac232..b9d405d0 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@ TheGeneral's own words were "dont like it then dont use it". We did not like wha Arcturus Morningstar is released under the [GNU General Public License v3](https://www.gnu.org/licenses/gpl-3.0.txt). ## Versions ## -![image](https://img.shields.io/badge/STATUS-STABLE-blue.svg?style=for-the-badge&logo=appveyor) ![image](https://img.shields.io/badge/VERSION-2.0.0-success.svg?style=for-the-badge&logo=appveyor) +![image](https://img.shields.io/badge/STATUS-STABLE-blue.svg?style=for-the-badge&logo=appveyor) Compiled Download: https://git.krews.org/morningstar/Arcturus-Community/releases From 7a64b9cbf366632481bd223e1f6152d797799259 Mon Sep 17 00:00:00 2001 From: Harmonic Date: Fri, 5 Jul 2019 09:19:41 -0400 Subject: [PATCH 06/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b9d405d0..5749811a 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ TheGeneral's own words were "dont like it then dont use it". We did not like wha Arcturus Morningstar is released under the [GNU General Public License v3](https://www.gnu.org/licenses/gpl-3.0.txt). ## Versions ## -![image](https://img.shields.io/badge/VERSION-2.0.0-success.svg?style=for-the-badge&logo=appveyor) +![image](https://img.shields.io/badge/VERSION-2.1.0-success.svg?style=for-the-badge&logo=appveyor) ![image](https://img.shields.io/badge/STATUS-STABLE-blue.svg?style=for-the-badge&logo=appveyor) Compiled Download: https://git.krews.org/morningstar/Arcturus-Community/releases From 1ffc5076e4cf2f8cd89c31946046463a2ac2b930 Mon Sep 17 00:00:00 2001 From: Harmonic Date: Fri, 5 Jul 2019 09:23:14 -0400 Subject: [PATCH 07/13] Added Quadral to the README Credits for his work on the pathfinder. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 5749811a..d831fa0a 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ When making an bug report or a feature request use the template we provide so th - Claudio - Alejandro - Harmony +- Quadral (Pathfinder) ## Discord ## Join us on Discord at https://discord.gg/BzfFsTp From 5873f0c8cb320ea3a33c40268a39a01000f25473 Mon Sep 17 00:00:00 2001 From: Harmonic Date: Mon, 8 Jul 2019 21:31:27 -0400 Subject: [PATCH 08/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d831fa0a..34a13cda 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ TheGeneral's own words were "dont like it then dont use it". We did not like wha Arcturus Morningstar is released under the [GNU General Public License v3](https://www.gnu.org/licenses/gpl-3.0.txt). ## Versions ## -![image](https://img.shields.io/badge/VERSION-2.1.0-success.svg?style=for-the-badge&logo=appveyor) +![image](https://img.shields.io/badge/VERSION-2.1.1-success.svg?style=for-the-badge&logo=appveyor) ![image](https://img.shields.io/badge/STATUS-STABLE-blue.svg?style=for-the-badge&logo=appveyor) Compiled Download: https://git.krews.org/morningstar/Arcturus-Community/releases From a7887d7579a062bb8194db760e9f3667b21d4eca Mon Sep 17 00:00:00 2001 From: KrewsOrg Date: Wed, 17 Jul 2019 00:23:39 +0100 Subject: [PATCH 09/13] FloorPlanEditor Exploit Fix --- pom.xml | 2 +- sqlupdates/2_1_1_TO_2_2_0-RC-1.sql | 12 +++++++ src/main/java/com/eu/habbo/Emulator.java | 31 +++++----------- .../com/eu/habbo/core/CreditsScheduler.java | 9 ++--- .../com/eu/habbo/core/PixelScheduler.java | 35 ++----------------- .../com/eu/habbo/core/PointsScheduler.java | 34 ++---------------- .../eu/habbo/habbohotel/GameEnvironment.java | 12 +++++-- .../eu/habbo/habbohotel/permissions/Rank.java | 21 +++++++++++ .../com/eu/habbo/plugin/PluginManager.java | 2 ++ 9 files changed, 63 insertions(+), 95 deletions(-) create mode 100644 sqlupdates/2_1_1_TO_2_2_0-RC-1.sql diff --git a/pom.xml b/pom.xml index 51d02e18..33253bbb 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.eu.habbo Habbo - 2.1.0 + 2.2.0 UTF-8 diff --git a/sqlupdates/2_1_1_TO_2_2_0-RC-1.sql b/sqlupdates/2_1_1_TO_2_2_0-RC-1.sql new file mode 100644 index 00000000..63c682f3 --- /dev/null +++ b/sqlupdates/2_1_1_TO_2_2_0-RC-1.sql @@ -0,0 +1,12 @@ +ALTER TABLE `permissions` +ADD COLUMN `auto_credits_amount` INT DEFAULT '0'; +ADD COLUMN `auto_pixels_amount` INT DEFAULT '0'; +ADD COLUMN `auto_gotw_amount` INT DEFAULT '0'; +ADD COLUMN `auto_points_amount` INT DEFAULT '0'; + +INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.auto.gotwpoints.enabled', '0'); +INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.auto.gotwpoints.interval', '600'); +INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.auto.gotwpoints.ignore.idled', '1'); +INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.auto.gotwpoints.ignore.hotelview', '1'); +INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.auto.gotwpoints.type', '4'); +INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.auto.gotwpoints.name', 'shell'); diff --git a/src/main/java/com/eu/habbo/Emulator.java b/src/main/java/com/eu/habbo/Emulator.java index bdebafe6..9cdd1324 100644 --- a/src/main/java/com/eu/habbo/Emulator.java +++ b/src/main/java/com/eu/habbo/Emulator.java @@ -34,13 +34,13 @@ public final class Emulator { public final static int MAJOR = 2; - public final static int MINOR = 1; + public final static int MINOR = 2; - public final static int BUILD = 1; + public final static int BUILD = 0; - public final static String PREVIEW = "Stable"; + public final static String PREVIEW = "RC-1"; public static final String version = "Arcturus Morningstar" + " " + MAJOR + "." + MINOR + "." + BUILD + " " + PREVIEW; private static final String logo = @@ -137,15 +137,12 @@ public final class Emulator { } - Emulator.getThreading().run(new Runnable() { - @Override - public void run() { - Emulator.getLogging().logStart("Thankyou for downloading Arcturus Morningstar! This is a stable 2.1.0 build, it should be more than stable for daily use on hotels, if you find any bugs please place them on our git repository."); - Emulator.getLogging().logStart("Please note, Arcturus Emulator is a project by TheGeneral, we take no credit for the original work, and only the work we have continued. If you'd like to support the project, join our discord at: "); - Emulator.getLogging().logStart("https://discord.gg/syuqgN"); - Emulator.getLogging().logStart("Please report bugs on our git at Krews.org. Not on our discord!!"); - System.out.println("Waiting for commands: "); - } + Emulator.getThreading().run(() -> { + Emulator.getLogging().logStart("Thankyou for downloading Arcturus Morningstar! This is a 2.2.0 RC-1 Build. If you find any bugs please place them on our git repository."); + Emulator.getLogging().logStart("Please note, Arcturus Emulator is a project by TheGeneral, we take no credit for the original work, and only the work we have continued. If you'd like to support the project, join our discord at: "); + Emulator.getLogging().logStart("https://discord.gg/syuqgN"); + Emulator.getLogging().logStart("Please report bugs on our git at Krews.org. Not on our discord!!"); + System.out.println("Waiting for commands: "); }, 3500); BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); @@ -169,24 +166,14 @@ public final class Emulator { } private static void setBuild() { - if (Emulator.class.getProtectionDomain().getCodeSource() == null) { - build = "UNKNOWN"; - return; - } StringBuilder sb = new StringBuilder(); try { - String filepath = new File(Emulator.class.getProtectionDomain().getCodeSource().getLocation().getPath()).getAbsolutePath(); MessageDigest md = MessageDigest.getInstance("MD5");// MD5 - FileInputStream fis = new FileInputStream(filepath); byte[] dataBytes = new byte[1024]; int nread = 0; - - while ((nread = fis.read(dataBytes)) != -1) md.update(dataBytes, 0, nread); - byte[] mdbytes = md.digest(); - for (int i = 0; i < mdbytes.length; i++) sb.append(Integer.toString((mdbytes[i] & 0xff) + 0x100, 16).substring(1)); } catch (Exception e) { diff --git a/src/main/java/com/eu/habbo/core/CreditsScheduler.java b/src/main/java/com/eu/habbo/core/CreditsScheduler.java index 4c2a44a1..ce136ede 100644 --- a/src/main/java/com/eu/habbo/core/CreditsScheduler.java +++ b/src/main/java/com/eu/habbo/core/CreditsScheduler.java @@ -8,14 +8,10 @@ import java.util.Map; public class CreditsScheduler extends Scheduler { public static boolean IGNORE_HOTEL_VIEW; - - public static boolean IGNORE_IDLED; - - public static int CREDITS; - public CreditsScheduler() { + super(Emulator.getConfig().getInt("hotel.auto.credits.interval")); this.reloadConfig(); } @@ -24,7 +20,6 @@ public class CreditsScheduler extends Scheduler { if (Emulator.getConfig().getBoolean("hotel.auto.credits.enabled")) { IGNORE_HOTEL_VIEW = Emulator.getConfig().getBoolean("hotel.auto.credits.ignore.hotelview"); IGNORE_IDLED = Emulator.getConfig().getBoolean("hotel.auto.credits.ignore.idled"); - CREDITS = Emulator.getConfig().getInt("hotel.auto.credits.amount"); if (this.disposed) { this.disposed = false; this.run(); @@ -50,7 +45,7 @@ public class CreditsScheduler extends Scheduler { if (habbo.getRoomUnit().isIdle() && IGNORE_IDLED) continue; - habbo.giveCredits(CREDITS); + habbo.giveCredits(habbo.getHabboInfo().getRank().getCreditsTimerAmount()); } } catch (Exception e) { Emulator.getLogging().logErrorLine(e); diff --git a/src/main/java/com/eu/habbo/core/PixelScheduler.java b/src/main/java/com/eu/habbo/core/PixelScheduler.java index 285df17c..188c37da 100644 --- a/src/main/java/com/eu/habbo/core/PixelScheduler.java +++ b/src/main/java/com/eu/habbo/core/PixelScheduler.java @@ -4,51 +4,23 @@ import com.eu.habbo.Emulator; import com.eu.habbo.habbohotel.users.Habbo; import java.util.Map; +import java.util.Set; public class PixelScheduler extends Scheduler { public static boolean IGNORE_HOTEL_VIEW; - - public static boolean IGNORE_IDLED; - - - private static int PIXELS; + public static Set> HABBOS; public PixelScheduler() { super(Emulator.getConfig().getInt("hotel.auto.pixels.interval")); this.reloadConfig(); } - public static boolean isIgnoreHotelView() { - return IGNORE_HOTEL_VIEW; - } - - public static void setIgnoreHotelView(boolean ignoreHotelView) { - IGNORE_HOTEL_VIEW = ignoreHotelView; - } - - public static boolean isIgnoreIdled() { - return IGNORE_IDLED; - } - - public static void setIgnoreIdled(boolean ignoreIdled) { - IGNORE_IDLED = ignoreIdled; - } - - public static int getPIXELS() { - return PIXELS; - } - - public static void setPIXELS(int PIXELS) { - PixelScheduler.PIXELS = PIXELS; - } - public void reloadConfig() { if (Emulator.getConfig().getBoolean("hotel.auto.pixels.enabled")) { IGNORE_HOTEL_VIEW = Emulator.getConfig().getBoolean("hotel.auto.pixels.ignore.hotelview"); IGNORE_IDLED = Emulator.getConfig().getBoolean("hotel.auto.pixels.ignore.idled"); - PIXELS = Emulator.getConfig().getInt("hotel.auto.pixels.amount"); if (this.disposed) { this.disposed = false; this.run(); @@ -65,7 +37,6 @@ public class PixelScheduler extends Scheduler { Habbo habbo; for (Map.Entry map : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().entrySet()) { habbo = map.getValue(); - try { if (habbo != null) { if (habbo.getHabboInfo().getCurrentRoom() == null && IGNORE_HOTEL_VIEW) @@ -74,7 +45,7 @@ public class PixelScheduler extends Scheduler { if (habbo.getRoomUnit().isIdle() && IGNORE_IDLED) continue; - habbo.givePixels(PIXELS); + habbo.givePixels(habbo.getHabboInfo().getRank().getPixelsTimerAmount()); } } catch (Exception e) { Emulator.getLogging().logErrorLine(e); diff --git a/src/main/java/com/eu/habbo/core/PointsScheduler.java b/src/main/java/com/eu/habbo/core/PointsScheduler.java index 529d004d..f5c8042d 100644 --- a/src/main/java/com/eu/habbo/core/PointsScheduler.java +++ b/src/main/java/com/eu/habbo/core/PointsScheduler.java @@ -8,47 +8,18 @@ import java.util.Map; public class PointsScheduler extends Scheduler { public static boolean IGNORE_HOTEL_VIEW; - - public static boolean IGNORE_IDLED; - - private static int POINTS; - public PointsScheduler() { + super(Emulator.getConfig().getInt("hotel.auto.points.interval")); this.reloadConfig(); } - public static boolean isIgnoreHotelView() { - return IGNORE_HOTEL_VIEW; - } - - public static void setIgnoreHotelView(boolean ignoreHotelView) { - IGNORE_HOTEL_VIEW = ignoreHotelView; - } - - public static boolean isIgnoreIdled() { - return IGNORE_IDLED; - } - - public static void setIgnoreIdled(boolean ignoreIdled) { - IGNORE_IDLED = ignoreIdled; - } - - public static int getPOINTS() { - return POINTS; - } - - public static void setPOINTS(int POINTS) { - PointsScheduler.POINTS = POINTS; - } - public void reloadConfig() { if (Emulator.getConfig().getBoolean("hotel.auto.points.enabled")) { IGNORE_HOTEL_VIEW = Emulator.getConfig().getBoolean("hotel.auto.points.ignore.hotelview"); IGNORE_IDLED = Emulator.getConfig().getBoolean("hotel.auto.points.ignore.idled"); - POINTS = Emulator.getConfig().getInt("hotel.auto.points.amount"); if (this.disposed) { this.disposed = false; this.run(); @@ -74,7 +45,8 @@ public class PointsScheduler extends Scheduler { if (habbo.getRoomUnit().isIdle() && IGNORE_IDLED) continue; - habbo.givePoints(POINTS); + //habbo.givePoints(POINTS); + habbo.givePoints(habbo.getHabboInfo().getRank().getDiamondsTimerAmount()); } } catch (Exception e) { Emulator.getLogging().logErrorLine(e); diff --git a/src/main/java/com/eu/habbo/habbohotel/GameEnvironment.java b/src/main/java/com/eu/habbo/habbohotel/GameEnvironment.java index 99302c6a..02704bd3 100644 --- a/src/main/java/com/eu/habbo/habbohotel/GameEnvironment.java +++ b/src/main/java/com/eu/habbo/habbohotel/GameEnvironment.java @@ -2,6 +2,7 @@ package com.eu.habbo.habbohotel; import com.eu.habbo.Emulator; import com.eu.habbo.core.CreditsScheduler; +import com.eu.habbo.core.GotwPointsScheduler; import com.eu.habbo.core.PixelScheduler; import com.eu.habbo.core.PointsScheduler; import com.eu.habbo.habbohotel.achievements.AchievementManager; @@ -26,6 +27,7 @@ public class GameEnvironment { public CreditsScheduler creditsScheduler; public PixelScheduler pixelScheduler; public PointsScheduler pointsScheduler; + public GotwPointsScheduler gotwPointsScheduler; private HabboManager habboManager; private NavigatorManager navigatorManager; private GuildManager guildManager; @@ -76,6 +78,9 @@ public class GameEnvironment { Emulator.getThreading().run(this.pixelScheduler); this.pointsScheduler = new PointsScheduler(); Emulator.getThreading().run(this.pointsScheduler); + this.gotwPointsScheduler = new GotwPointsScheduler(); + Emulator.getThreading().run(this.gotwPointsScheduler); + Emulator.getLogging().logStart("GameEnvironment -> Loaded!"); } @@ -84,6 +89,7 @@ public class GameEnvironment { this.pointsScheduler.setDisposed(true); this.pixelScheduler.setDisposed(true); this.creditsScheduler.setDisposed(true); + this.gotwPointsScheduler.setDisposed(true); this.craftingManager.dispose(); this.habboManager.dispose(); this.commandHandler.dispose(); @@ -171,7 +177,9 @@ public class GameEnvironment { return this.pixelScheduler; } - public PointsScheduler getPointsScheduler() { - return this.pointsScheduler; + public PointsScheduler getPointsScheduler() { return this.pointsScheduler; + } + + public GotwPointsScheduler getGotwPointsScheduler() { return this.gotwPointsScheduler; } } diff --git a/src/main/java/com/eu/habbo/habbohotel/permissions/Rank.java b/src/main/java/com/eu/habbo/habbohotel/permissions/Rank.java index 068f050e..20929cd7 100644 --- a/src/main/java/com/eu/habbo/habbohotel/permissions/Rank.java +++ b/src/main/java/com/eu/habbo/habbohotel/permissions/Rank.java @@ -29,12 +29,20 @@ public class Rank { private boolean hasPrefix; + private int diamondsTimerAmount; + private int creditsTimerAmount; + private int pixelsTimerAmount; + private int gotwTimerAmount; public Rank(ResultSet set) throws SQLException { this.permissions = new THashMap<>(); this.variables = new THashMap<>(); this.id = set.getInt("id"); this.level = set.getInt("level"); + this.diamondsTimerAmount = 1; + this.creditsTimerAmount = 1; + this.pixelsTimerAmount = 1; + this.gotwTimerAmount = 1; this.load(set); } @@ -47,6 +55,10 @@ public class Rank { this.logCommands = set.getString("log_commands").equals("1"); this.prefix = set.getString("prefix"); this.prefixColor = set.getString("prefix_color"); + this.diamondsTimerAmount = set.getInt("auto_points_amount"); + this.creditsTimerAmount = set.getInt("auto_credits_amount"); + this.pixelsTimerAmount = set.getInt("auto_pixels_amount"); + this.gotwTimerAmount = set.getInt("auto_gotw_amount"); this.hasPrefix = !this.prefix.isEmpty(); for (int i = 1; i < meta.getColumnCount() + 1; i++) { String columnName = meta.getColumnName(i); @@ -115,4 +127,13 @@ public class Rank { public boolean hasPrefix() { return this.hasPrefix; } + + public int getDiamondsTimerAmount() { return this.diamondsTimerAmount; } + + public int getCreditsTimerAmount() { return this.creditsTimerAmount; } + + public int getPixelsTimerAmount() { return this.pixelsTimerAmount; } + + public int getGotwTimerAmount() { return this.gotwTimerAmount; } } + diff --git a/src/main/java/com/eu/habbo/plugin/PluginManager.java b/src/main/java/com/eu/habbo/plugin/PluginManager.java index 80f56a9b..d1ecfbef 100644 --- a/src/main/java/com/eu/habbo/plugin/PluginManager.java +++ b/src/main/java/com/eu/habbo/plugin/PluginManager.java @@ -126,6 +126,8 @@ public class PluginManager { Emulator.getGameEnvironment().getCreditsScheduler().reloadConfig(); Emulator.getGameEnvironment().getPointsScheduler().reloadConfig(); Emulator.getGameEnvironment().getPixelScheduler().reloadConfig(); + Emulator.getGameEnvironment().getGotwPointsScheduler().reloadConfig(); + } } From 39937613e20728c35ca68c30a72f65433780be33 Mon Sep 17 00:00:00 2001 From: KrewsOrg Date: Wed, 17 Jul 2019 00:34:06 +0100 Subject: [PATCH 10/13] Added Missing GotwPointsScheduler --- .../eu/habbo/core/GotwPointsScheduler.java | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 src/main/java/com/eu/habbo/core/GotwPointsScheduler.java diff --git a/src/main/java/com/eu/habbo/core/GotwPointsScheduler.java b/src/main/java/com/eu/habbo/core/GotwPointsScheduler.java new file mode 100644 index 00000000..4a85969e --- /dev/null +++ b/src/main/java/com/eu/habbo/core/GotwPointsScheduler.java @@ -0,0 +1,78 @@ +package com.eu.habbo.core; + +import com.eu.habbo.Emulator; +import com.eu.habbo.habbohotel.users.Habbo; + +import java.util.Map; + +public class GotwPointsScheduler extends Scheduler { + + public static boolean IGNORE_HOTEL_VIEW; + public static boolean IGNORE_IDLED; + public static String GOTW_POINTS_NAME; + + public GotwPointsScheduler() { //TODO MOVE TO A PLUGIN. IS NOT PART OF OFFICIAL HABBO. + + super(Emulator.getConfig().getInt("hotel.auto.gotwpoints.interval")); + this.reloadConfig(); + } + + public void reloadConfig() { + if (Emulator.getConfig().getBoolean("hotel.auto.gotwpoints.enabled")) { + IGNORE_HOTEL_VIEW = Emulator.getConfig().getBoolean("hotel.auto.gotwpoints.ignore.hotelview"); + IGNORE_IDLED = Emulator.getConfig().getBoolean("hotel.auto.gotwpoints.ignore.idled"); + GOTW_POINTS_NAME = Emulator.getConfig().getValue("hotel.auto.gotwpoints.name"); + + if (this.disposed) { + this.disposed = false; + this.run(); + } + } else { + this.disposed = true; + } + } + + @Override + public void run() { + super.run(); + + Habbo habbo; + for (Map.Entry map : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().entrySet()) { + habbo = map.getValue(); + + try { + if (habbo != null) { + if (habbo.getHabboInfo().getCurrentRoom() == null && IGNORE_HOTEL_VIEW) + continue; + + if (habbo.getRoomUnit().isIdle() && IGNORE_IDLED) + continue; + + int type; + boolean found = false; + for (String s : Emulator.getConfig().getValue("seasonal.currency.names").split(";")) { + if (s.equalsIgnoreCase(GOTW_POINTS_NAME) || (GOTW_POINTS_NAME.startsWith(s) && Math.abs(s.length() - GOTW_POINTS_NAME.length()) < 3)) { + found = true; + break; + } + } + type = Emulator.getConfig().getInt("seasonal.currency." + GOTW_POINTS_NAME, -1); + if (found || type != -1) { + + habbo.givePoints(type, habbo.getHabboInfo().getRank().getGotwTimerAmount()); + } + } + } catch (Exception e) { + Emulator.getLogging().logErrorLine(e); + } + } + } + + public boolean isDisposed() { + return this.disposed; + } + + public void setDisposed(boolean disposed) { + this.disposed = disposed; + } +} From 4d026f97e799249cc5800fa14098bd04ff6f1f46 Mon Sep 17 00:00:00 2001 From: KrewsOrg Date: Wed, 17 Jul 2019 00:36:33 +0100 Subject: [PATCH 11/13] Removed unused code from PixelScheduler --- src/main/java/com/eu/habbo/core/PixelScheduler.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/com/eu/habbo/core/PixelScheduler.java b/src/main/java/com/eu/habbo/core/PixelScheduler.java index 188c37da..13a0cf3d 100644 --- a/src/main/java/com/eu/habbo/core/PixelScheduler.java +++ b/src/main/java/com/eu/habbo/core/PixelScheduler.java @@ -4,13 +4,11 @@ import com.eu.habbo.Emulator; import com.eu.habbo.habbohotel.users.Habbo; import java.util.Map; -import java.util.Set; public class PixelScheduler extends Scheduler { public static boolean IGNORE_HOTEL_VIEW; public static boolean IGNORE_IDLED; - public static Set> HABBOS; public PixelScheduler() { super(Emulator.getConfig().getInt("hotel.auto.pixels.interval")); From bb8cb00a651aedfcbe5ca670f592107b2f23ac9c Mon Sep 17 00:00:00 2001 From: KrewsOrg Date: Mon, 22 Jul 2019 11:23:14 +0100 Subject: [PATCH 12/13] FloorPlanValidation is now like Habbo. Doesn't allow different lengths from line 1. --- .../floorplaneditor/FloorPlanEditorSaveEvent.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main/java/com/eu/habbo/messages/incoming/floorplaneditor/FloorPlanEditorSaveEvent.java b/src/main/java/com/eu/habbo/messages/incoming/floorplaneditor/FloorPlanEditorSaveEvent.java index e7212745..27ca5097 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/floorplaneditor/FloorPlanEditorSaveEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/floorplaneditor/FloorPlanEditorSaveEvent.java @@ -50,6 +50,21 @@ public class FloorPlanEditorSaveEvent extends MessageHandler { errors.add("${notification.floorplan_editor.error.title}"); } + boolean rowCountCorrect = true; + int rowCount = 0; + String[] splitMap = map.split(((char) 13) + ""); + for (String s : splitMap) { + if(rowCount > 0 && rowCount != s.length()) { + rowCountCorrect = false; + } + rowCount = s.length(); + } + + if (!rowCountCorrect && Emulator.getConfig().getBoolean("hotel.room.floorplan.check.enabled")) + { + errors.add("${notification.floorplan_editor.error.title}"); + } + if (map.isEmpty() || map.replace("x", "").replace(((char) 13) + "", "").length() == 0) { errors.add("${notification.floorplan_editor.error.message.effective_height_is_0}"); From 142c71d3153e6d71ce6a0ea869fa540594a17846 Mon Sep 17 00:00:00 2001 From: Harmonic Date: Mon, 22 Jul 2019 06:24:32 -0400 Subject: [PATCH 13/13] Revert "Merge branch 'add-rank-currency-timers' into 'master'" This reverts merge request !48 --- pom.xml | 2 +- sqlupdates/2_1_1_TO_2_2_0-RC-1.sql | 12 --- src/main/java/com/eu/habbo/Emulator.java | 31 +++++--- .../com/eu/habbo/core/CreditsScheduler.java | 9 ++- .../eu/habbo/core/GotwPointsScheduler.java | 78 ------------------- .../com/eu/habbo/core/PixelScheduler.java | 33 +++++++- .../com/eu/habbo/core/PointsScheduler.java | 34 +++++++- .../eu/habbo/habbohotel/GameEnvironment.java | 12 +-- .../eu/habbo/habbohotel/permissions/Rank.java | 21 ----- .../FloorPlanEditorSaveEvent.java | 15 ---- .../com/eu/habbo/plugin/PluginManager.java | 2 - 11 files changed, 95 insertions(+), 154 deletions(-) delete mode 100644 sqlupdates/2_1_1_TO_2_2_0-RC-1.sql delete mode 100644 src/main/java/com/eu/habbo/core/GotwPointsScheduler.java diff --git a/pom.xml b/pom.xml index 33253bbb..51d02e18 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.eu.habbo Habbo - 2.2.0 + 2.1.0 UTF-8 diff --git a/sqlupdates/2_1_1_TO_2_2_0-RC-1.sql b/sqlupdates/2_1_1_TO_2_2_0-RC-1.sql deleted file mode 100644 index 63c682f3..00000000 --- a/sqlupdates/2_1_1_TO_2_2_0-RC-1.sql +++ /dev/null @@ -1,12 +0,0 @@ -ALTER TABLE `permissions` -ADD COLUMN `auto_credits_amount` INT DEFAULT '0'; -ADD COLUMN `auto_pixels_amount` INT DEFAULT '0'; -ADD COLUMN `auto_gotw_amount` INT DEFAULT '0'; -ADD COLUMN `auto_points_amount` INT DEFAULT '0'; - -INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.auto.gotwpoints.enabled', '0'); -INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.auto.gotwpoints.interval', '600'); -INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.auto.gotwpoints.ignore.idled', '1'); -INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.auto.gotwpoints.ignore.hotelview', '1'); -INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.auto.gotwpoints.type', '4'); -INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.auto.gotwpoints.name', 'shell'); diff --git a/src/main/java/com/eu/habbo/Emulator.java b/src/main/java/com/eu/habbo/Emulator.java index 9cdd1324..bdebafe6 100644 --- a/src/main/java/com/eu/habbo/Emulator.java +++ b/src/main/java/com/eu/habbo/Emulator.java @@ -34,13 +34,13 @@ public final class Emulator { public final static int MAJOR = 2; - public final static int MINOR = 2; + public final static int MINOR = 1; - public final static int BUILD = 0; + public final static int BUILD = 1; - public final static String PREVIEW = "RC-1"; + public final static String PREVIEW = "Stable"; public static final String version = "Arcturus Morningstar" + " " + MAJOR + "." + MINOR + "." + BUILD + " " + PREVIEW; private static final String logo = @@ -137,12 +137,15 @@ public final class Emulator { } - Emulator.getThreading().run(() -> { - Emulator.getLogging().logStart("Thankyou for downloading Arcturus Morningstar! This is a 2.2.0 RC-1 Build. If you find any bugs please place them on our git repository."); - Emulator.getLogging().logStart("Please note, Arcturus Emulator is a project by TheGeneral, we take no credit for the original work, and only the work we have continued. If you'd like to support the project, join our discord at: "); - Emulator.getLogging().logStart("https://discord.gg/syuqgN"); - Emulator.getLogging().logStart("Please report bugs on our git at Krews.org. Not on our discord!!"); - System.out.println("Waiting for commands: "); + Emulator.getThreading().run(new Runnable() { + @Override + public void run() { + Emulator.getLogging().logStart("Thankyou for downloading Arcturus Morningstar! This is a stable 2.1.0 build, it should be more than stable for daily use on hotels, if you find any bugs please place them on our git repository."); + Emulator.getLogging().logStart("Please note, Arcturus Emulator is a project by TheGeneral, we take no credit for the original work, and only the work we have continued. If you'd like to support the project, join our discord at: "); + Emulator.getLogging().logStart("https://discord.gg/syuqgN"); + Emulator.getLogging().logStart("Please report bugs on our git at Krews.org. Not on our discord!!"); + System.out.println("Waiting for commands: "); + } }, 3500); BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); @@ -166,14 +169,24 @@ public final class Emulator { } private static void setBuild() { + if (Emulator.class.getProtectionDomain().getCodeSource() == null) { + build = "UNKNOWN"; + return; + } StringBuilder sb = new StringBuilder(); try { + String filepath = new File(Emulator.class.getProtectionDomain().getCodeSource().getLocation().getPath()).getAbsolutePath(); MessageDigest md = MessageDigest.getInstance("MD5");// MD5 + FileInputStream fis = new FileInputStream(filepath); byte[] dataBytes = new byte[1024]; int nread = 0; + + while ((nread = fis.read(dataBytes)) != -1) md.update(dataBytes, 0, nread); + byte[] mdbytes = md.digest(); + for (int i = 0; i < mdbytes.length; i++) sb.append(Integer.toString((mdbytes[i] & 0xff) + 0x100, 16).substring(1)); } catch (Exception e) { diff --git a/src/main/java/com/eu/habbo/core/CreditsScheduler.java b/src/main/java/com/eu/habbo/core/CreditsScheduler.java index ce136ede..4c2a44a1 100644 --- a/src/main/java/com/eu/habbo/core/CreditsScheduler.java +++ b/src/main/java/com/eu/habbo/core/CreditsScheduler.java @@ -8,10 +8,14 @@ import java.util.Map; public class CreditsScheduler extends Scheduler { public static boolean IGNORE_HOTEL_VIEW; + + public static boolean IGNORE_IDLED; - public CreditsScheduler() { + public static int CREDITS; + + public CreditsScheduler() { super(Emulator.getConfig().getInt("hotel.auto.credits.interval")); this.reloadConfig(); } @@ -20,6 +24,7 @@ public class CreditsScheduler extends Scheduler { if (Emulator.getConfig().getBoolean("hotel.auto.credits.enabled")) { IGNORE_HOTEL_VIEW = Emulator.getConfig().getBoolean("hotel.auto.credits.ignore.hotelview"); IGNORE_IDLED = Emulator.getConfig().getBoolean("hotel.auto.credits.ignore.idled"); + CREDITS = Emulator.getConfig().getInt("hotel.auto.credits.amount"); if (this.disposed) { this.disposed = false; this.run(); @@ -45,7 +50,7 @@ public class CreditsScheduler extends Scheduler { if (habbo.getRoomUnit().isIdle() && IGNORE_IDLED) continue; - habbo.giveCredits(habbo.getHabboInfo().getRank().getCreditsTimerAmount()); + habbo.giveCredits(CREDITS); } } catch (Exception e) { Emulator.getLogging().logErrorLine(e); diff --git a/src/main/java/com/eu/habbo/core/GotwPointsScheduler.java b/src/main/java/com/eu/habbo/core/GotwPointsScheduler.java deleted file mode 100644 index 4a85969e..00000000 --- a/src/main/java/com/eu/habbo/core/GotwPointsScheduler.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.eu.habbo.core; - -import com.eu.habbo.Emulator; -import com.eu.habbo.habbohotel.users.Habbo; - -import java.util.Map; - -public class GotwPointsScheduler extends Scheduler { - - public static boolean IGNORE_HOTEL_VIEW; - public static boolean IGNORE_IDLED; - public static String GOTW_POINTS_NAME; - - public GotwPointsScheduler() { //TODO MOVE TO A PLUGIN. IS NOT PART OF OFFICIAL HABBO. - - super(Emulator.getConfig().getInt("hotel.auto.gotwpoints.interval")); - this.reloadConfig(); - } - - public void reloadConfig() { - if (Emulator.getConfig().getBoolean("hotel.auto.gotwpoints.enabled")) { - IGNORE_HOTEL_VIEW = Emulator.getConfig().getBoolean("hotel.auto.gotwpoints.ignore.hotelview"); - IGNORE_IDLED = Emulator.getConfig().getBoolean("hotel.auto.gotwpoints.ignore.idled"); - GOTW_POINTS_NAME = Emulator.getConfig().getValue("hotel.auto.gotwpoints.name"); - - if (this.disposed) { - this.disposed = false; - this.run(); - } - } else { - this.disposed = true; - } - } - - @Override - public void run() { - super.run(); - - Habbo habbo; - for (Map.Entry map : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().entrySet()) { - habbo = map.getValue(); - - try { - if (habbo != null) { - if (habbo.getHabboInfo().getCurrentRoom() == null && IGNORE_HOTEL_VIEW) - continue; - - if (habbo.getRoomUnit().isIdle() && IGNORE_IDLED) - continue; - - int type; - boolean found = false; - for (String s : Emulator.getConfig().getValue("seasonal.currency.names").split(";")) { - if (s.equalsIgnoreCase(GOTW_POINTS_NAME) || (GOTW_POINTS_NAME.startsWith(s) && Math.abs(s.length() - GOTW_POINTS_NAME.length()) < 3)) { - found = true; - break; - } - } - type = Emulator.getConfig().getInt("seasonal.currency." + GOTW_POINTS_NAME, -1); - if (found || type != -1) { - - habbo.givePoints(type, habbo.getHabboInfo().getRank().getGotwTimerAmount()); - } - } - } catch (Exception e) { - Emulator.getLogging().logErrorLine(e); - } - } - } - - public boolean isDisposed() { - return this.disposed; - } - - public void setDisposed(boolean disposed) { - this.disposed = disposed; - } -} diff --git a/src/main/java/com/eu/habbo/core/PixelScheduler.java b/src/main/java/com/eu/habbo/core/PixelScheduler.java index 13a0cf3d..285df17c 100644 --- a/src/main/java/com/eu/habbo/core/PixelScheduler.java +++ b/src/main/java/com/eu/habbo/core/PixelScheduler.java @@ -8,17 +8,47 @@ import java.util.Map; public class PixelScheduler extends Scheduler { public static boolean IGNORE_HOTEL_VIEW; + + public static boolean IGNORE_IDLED; + + private static int PIXELS; + public PixelScheduler() { super(Emulator.getConfig().getInt("hotel.auto.pixels.interval")); this.reloadConfig(); } + public static boolean isIgnoreHotelView() { + return IGNORE_HOTEL_VIEW; + } + + public static void setIgnoreHotelView(boolean ignoreHotelView) { + IGNORE_HOTEL_VIEW = ignoreHotelView; + } + + public static boolean isIgnoreIdled() { + return IGNORE_IDLED; + } + + public static void setIgnoreIdled(boolean ignoreIdled) { + IGNORE_IDLED = ignoreIdled; + } + + public static int getPIXELS() { + return PIXELS; + } + + public static void setPIXELS(int PIXELS) { + PixelScheduler.PIXELS = PIXELS; + } + public void reloadConfig() { if (Emulator.getConfig().getBoolean("hotel.auto.pixels.enabled")) { IGNORE_HOTEL_VIEW = Emulator.getConfig().getBoolean("hotel.auto.pixels.ignore.hotelview"); IGNORE_IDLED = Emulator.getConfig().getBoolean("hotel.auto.pixels.ignore.idled"); + PIXELS = Emulator.getConfig().getInt("hotel.auto.pixels.amount"); if (this.disposed) { this.disposed = false; this.run(); @@ -35,6 +65,7 @@ public class PixelScheduler extends Scheduler { Habbo habbo; for (Map.Entry map : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().entrySet()) { habbo = map.getValue(); + try { if (habbo != null) { if (habbo.getHabboInfo().getCurrentRoom() == null && IGNORE_HOTEL_VIEW) @@ -43,7 +74,7 @@ public class PixelScheduler extends Scheduler { if (habbo.getRoomUnit().isIdle() && IGNORE_IDLED) continue; - habbo.givePixels(habbo.getHabboInfo().getRank().getPixelsTimerAmount()); + habbo.givePixels(PIXELS); } } catch (Exception e) { Emulator.getLogging().logErrorLine(e); diff --git a/src/main/java/com/eu/habbo/core/PointsScheduler.java b/src/main/java/com/eu/habbo/core/PointsScheduler.java index f5c8042d..529d004d 100644 --- a/src/main/java/com/eu/habbo/core/PointsScheduler.java +++ b/src/main/java/com/eu/habbo/core/PointsScheduler.java @@ -8,18 +8,47 @@ import java.util.Map; public class PointsScheduler extends Scheduler { public static boolean IGNORE_HOTEL_VIEW; + + public static boolean IGNORE_IDLED; - public PointsScheduler() { + private static int POINTS; + + public PointsScheduler() { super(Emulator.getConfig().getInt("hotel.auto.points.interval")); this.reloadConfig(); } + public static boolean isIgnoreHotelView() { + return IGNORE_HOTEL_VIEW; + } + + public static void setIgnoreHotelView(boolean ignoreHotelView) { + IGNORE_HOTEL_VIEW = ignoreHotelView; + } + + public static boolean isIgnoreIdled() { + return IGNORE_IDLED; + } + + public static void setIgnoreIdled(boolean ignoreIdled) { + IGNORE_IDLED = ignoreIdled; + } + + public static int getPOINTS() { + return POINTS; + } + + public static void setPOINTS(int POINTS) { + PointsScheduler.POINTS = POINTS; + } + public void reloadConfig() { if (Emulator.getConfig().getBoolean("hotel.auto.points.enabled")) { IGNORE_HOTEL_VIEW = Emulator.getConfig().getBoolean("hotel.auto.points.ignore.hotelview"); IGNORE_IDLED = Emulator.getConfig().getBoolean("hotel.auto.points.ignore.idled"); + POINTS = Emulator.getConfig().getInt("hotel.auto.points.amount"); if (this.disposed) { this.disposed = false; this.run(); @@ -45,8 +74,7 @@ public class PointsScheduler extends Scheduler { if (habbo.getRoomUnit().isIdle() && IGNORE_IDLED) continue; - //habbo.givePoints(POINTS); - habbo.givePoints(habbo.getHabboInfo().getRank().getDiamondsTimerAmount()); + habbo.givePoints(POINTS); } } catch (Exception e) { Emulator.getLogging().logErrorLine(e); diff --git a/src/main/java/com/eu/habbo/habbohotel/GameEnvironment.java b/src/main/java/com/eu/habbo/habbohotel/GameEnvironment.java index 02704bd3..99302c6a 100644 --- a/src/main/java/com/eu/habbo/habbohotel/GameEnvironment.java +++ b/src/main/java/com/eu/habbo/habbohotel/GameEnvironment.java @@ -2,7 +2,6 @@ package com.eu.habbo.habbohotel; import com.eu.habbo.Emulator; import com.eu.habbo.core.CreditsScheduler; -import com.eu.habbo.core.GotwPointsScheduler; import com.eu.habbo.core.PixelScheduler; import com.eu.habbo.core.PointsScheduler; import com.eu.habbo.habbohotel.achievements.AchievementManager; @@ -27,7 +26,6 @@ public class GameEnvironment { public CreditsScheduler creditsScheduler; public PixelScheduler pixelScheduler; public PointsScheduler pointsScheduler; - public GotwPointsScheduler gotwPointsScheduler; private HabboManager habboManager; private NavigatorManager navigatorManager; private GuildManager guildManager; @@ -78,9 +76,6 @@ public class GameEnvironment { Emulator.getThreading().run(this.pixelScheduler); this.pointsScheduler = new PointsScheduler(); Emulator.getThreading().run(this.pointsScheduler); - this.gotwPointsScheduler = new GotwPointsScheduler(); - Emulator.getThreading().run(this.gotwPointsScheduler); - Emulator.getLogging().logStart("GameEnvironment -> Loaded!"); } @@ -89,7 +84,6 @@ public class GameEnvironment { this.pointsScheduler.setDisposed(true); this.pixelScheduler.setDisposed(true); this.creditsScheduler.setDisposed(true); - this.gotwPointsScheduler.setDisposed(true); this.craftingManager.dispose(); this.habboManager.dispose(); this.commandHandler.dispose(); @@ -177,9 +171,7 @@ public class GameEnvironment { return this.pixelScheduler; } - public PointsScheduler getPointsScheduler() { return this.pointsScheduler; - } - - public GotwPointsScheduler getGotwPointsScheduler() { return this.gotwPointsScheduler; + public PointsScheduler getPointsScheduler() { + return this.pointsScheduler; } } diff --git a/src/main/java/com/eu/habbo/habbohotel/permissions/Rank.java b/src/main/java/com/eu/habbo/habbohotel/permissions/Rank.java index 20929cd7..068f050e 100644 --- a/src/main/java/com/eu/habbo/habbohotel/permissions/Rank.java +++ b/src/main/java/com/eu/habbo/habbohotel/permissions/Rank.java @@ -29,20 +29,12 @@ public class Rank { private boolean hasPrefix; - private int diamondsTimerAmount; - private int creditsTimerAmount; - private int pixelsTimerAmount; - private int gotwTimerAmount; public Rank(ResultSet set) throws SQLException { this.permissions = new THashMap<>(); this.variables = new THashMap<>(); this.id = set.getInt("id"); this.level = set.getInt("level"); - this.diamondsTimerAmount = 1; - this.creditsTimerAmount = 1; - this.pixelsTimerAmount = 1; - this.gotwTimerAmount = 1; this.load(set); } @@ -55,10 +47,6 @@ public class Rank { this.logCommands = set.getString("log_commands").equals("1"); this.prefix = set.getString("prefix"); this.prefixColor = set.getString("prefix_color"); - this.diamondsTimerAmount = set.getInt("auto_points_amount"); - this.creditsTimerAmount = set.getInt("auto_credits_amount"); - this.pixelsTimerAmount = set.getInt("auto_pixels_amount"); - this.gotwTimerAmount = set.getInt("auto_gotw_amount"); this.hasPrefix = !this.prefix.isEmpty(); for (int i = 1; i < meta.getColumnCount() + 1; i++) { String columnName = meta.getColumnName(i); @@ -127,13 +115,4 @@ public class Rank { public boolean hasPrefix() { return this.hasPrefix; } - - public int getDiamondsTimerAmount() { return this.diamondsTimerAmount; } - - public int getCreditsTimerAmount() { return this.creditsTimerAmount; } - - public int getPixelsTimerAmount() { return this.pixelsTimerAmount; } - - public int getGotwTimerAmount() { return this.gotwTimerAmount; } } - diff --git a/src/main/java/com/eu/habbo/messages/incoming/floorplaneditor/FloorPlanEditorSaveEvent.java b/src/main/java/com/eu/habbo/messages/incoming/floorplaneditor/FloorPlanEditorSaveEvent.java index 27ca5097..e7212745 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/floorplaneditor/FloorPlanEditorSaveEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/floorplaneditor/FloorPlanEditorSaveEvent.java @@ -50,21 +50,6 @@ public class FloorPlanEditorSaveEvent extends MessageHandler { errors.add("${notification.floorplan_editor.error.title}"); } - boolean rowCountCorrect = true; - int rowCount = 0; - String[] splitMap = map.split(((char) 13) + ""); - for (String s : splitMap) { - if(rowCount > 0 && rowCount != s.length()) { - rowCountCorrect = false; - } - rowCount = s.length(); - } - - if (!rowCountCorrect && Emulator.getConfig().getBoolean("hotel.room.floorplan.check.enabled")) - { - errors.add("${notification.floorplan_editor.error.title}"); - } - if (map.isEmpty() || map.replace("x", "").replace(((char) 13) + "", "").length() == 0) { errors.add("${notification.floorplan_editor.error.message.effective_height_is_0}"); diff --git a/src/main/java/com/eu/habbo/plugin/PluginManager.java b/src/main/java/com/eu/habbo/plugin/PluginManager.java index d1ecfbef..80f56a9b 100644 --- a/src/main/java/com/eu/habbo/plugin/PluginManager.java +++ b/src/main/java/com/eu/habbo/plugin/PluginManager.java @@ -126,8 +126,6 @@ public class PluginManager { Emulator.getGameEnvironment().getCreditsScheduler().reloadConfig(); Emulator.getGameEnvironment().getPointsScheduler().reloadConfig(); Emulator.getGameEnvironment().getPixelScheduler().reloadConfig(); - Emulator.getGameEnvironment().getGotwPointsScheduler().reloadConfig(); - } }