diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWired.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWired.java index 1a926b1e..5f8ddf4a 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWired.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWired.java @@ -55,13 +55,13 @@ public abstract class InteractionWired extends InteractionDefault implements IWi * @param set * @throws SQLException */ - public void loadWiredSettings(ResultSet set) throws SQLException { + public void loadWiredSettings(ResultSet set) throws SQLException, JsonProcessingException { String wiredData = set.getString("wired_data"); this.wiredSettings = new WiredSettings(); if(wiredData.startsWith("{")) { - this.wiredSettings = WiredHandler.getGsonBuilder().create().fromJson(wiredData, WiredSettings.class); + this.wiredSettings = WiredHandler.getObjectMapper().readValue(wiredData, WiredSettings.class); } } @@ -140,9 +140,9 @@ public abstract class InteractionWired extends InteractionDefault implements IWi @Override public void run() { if (this.needsUpdate()) { - //TODO HERE IS WERE WIRED_SAVE_EXCEPTION WILL BE THROWN + //TODO HERE IS WHERE WIRED_SAVE_EXCEPTION WILL BE THROWN //EXAMPLE: if StringParam should be number, throw error here, maybe activating a flag in wiredSettings that string params are numbers - this.loadDefaultParams(); + this.loadDefaultIntegerParams(); String wiredData = ""; @@ -181,7 +181,7 @@ public abstract class InteractionWired extends InteractionDefault implements IWi this.wiredSettings.dispose(); } - public void loadDefaultParams() {} + public void loadDefaultIntegerParams() {} public void activateBox(Room room) { this.activateBox(room, null, 0L); diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionDateRangeActive.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionDateRangeActive.java index a7f6ed4a..ccf676b8 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionDateRangeActive.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionDateRangeActive.java @@ -60,7 +60,7 @@ public class WiredConditionDateRangeActive extends InteractionWiredCondition { } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().isEmpty()) { this.getWiredSettings().getIntegerParams().add(0); this.getWiredSettings().getIntegerParams().add(0); diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionFurniHaveFurni.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionFurniHaveFurni.java index 70a575ed..04df4150 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionFurniHaveFurni.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionFurniHaveFurni.java @@ -52,7 +52,7 @@ public class WiredConditionFurniHaveFurni extends InteractionWiredCondition { } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().isEmpty()) { this.getWiredSettings().getIntegerParams().add(0); } diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionHabboCount.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionHabboCount.java index 2c048889..6ac364e6 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionHabboCount.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionHabboCount.java @@ -34,7 +34,7 @@ public class WiredConditionHabboCount extends InteractionWiredCondition { } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().isEmpty()) { this.getWiredSettings().getIntegerParams().add(0); this.getWiredSettings().getIntegerParams().add(0); diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionHabboHasEffect.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionHabboHasEffect.java index 57174423..77026560 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionHabboHasEffect.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionHabboHasEffect.java @@ -35,7 +35,7 @@ public class WiredConditionHabboHasEffect extends InteractionWiredCondition { } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().isEmpty()) { this.getWiredSettings().getIntegerParams().add(0); } diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionHabboHasHandItem.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionHabboHasHandItem.java index 416e9f06..6e725e58 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionHabboHasHandItem.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionHabboHasHandItem.java @@ -34,7 +34,7 @@ public class WiredConditionHabboHasHandItem extends InteractionWiredCondition { } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().isEmpty()) { this.getWiredSettings().getIntegerParams().add(0); } diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionLessTimeElapsed.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionLessTimeElapsed.java index 7d562667..71868641 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionLessTimeElapsed.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionLessTimeElapsed.java @@ -31,7 +31,7 @@ public class WiredConditionLessTimeElapsed extends InteractionWiredCondition { } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().isEmpty()) { this.getWiredSettings().getIntegerParams().add(0); } diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionMatchStatePosition.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionMatchStatePosition.java index cea8ed52..3fab95cf 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionMatchStatePosition.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionMatchStatePosition.java @@ -70,7 +70,7 @@ public class WiredConditionMatchStatePosition extends InteractionWiredCondition } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().isEmpty()) { this.getWiredSettings().getIntegerParams().add(0); this.getWiredSettings().getIntegerParams().add(0); diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionMoreTimeElapsed.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionMoreTimeElapsed.java index feb39c35..e8bf6b64 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionMoreTimeElapsed.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionMoreTimeElapsed.java @@ -30,7 +30,7 @@ public class WiredConditionMoreTimeElapsed extends InteractionWiredCondition { } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().isEmpty()) { this.getWiredSettings().getIntegerParams().add(0); } diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionNotFurniHaveFurni.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionNotFurniHaveFurni.java index 88dae5fd..bc9a9e1b 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionNotFurniHaveFurni.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionNotFurniHaveFurni.java @@ -53,7 +53,7 @@ public class WiredConditionNotFurniHaveFurni extends InteractionWiredCondition { } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().isEmpty()) { this.getWiredSettings().getIntegerParams().add(0); } diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionNotInTeam.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionNotInTeam.java index 375329a1..54e33e17 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionNotInTeam.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionNotInTeam.java @@ -46,7 +46,7 @@ public class WiredConditionNotInTeam extends InteractionWiredCondition { } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().isEmpty()) { this.getWiredSettings().getIntegerParams().add(1); this.getWiredSettings().getIntegerParams().add(1); diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionTeamMember.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionTeamMember.java index cb178496..7ad53922 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionTeamMember.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionTeamMember.java @@ -48,7 +48,7 @@ public class WiredConditionTeamMember extends InteractionWiredCondition { } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().isEmpty()) { this.getWiredSettings().getIntegerParams().add(1); this.getWiredSettings().getIntegerParams().add(1); diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectBotFollowHabbo.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectBotFollowHabbo.java index c4f81483..d6d63d88 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectBotFollowHabbo.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectBotFollowHabbo.java @@ -51,7 +51,7 @@ public class WiredEffectBotFollowHabbo extends InteractionWiredEffect { } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().isEmpty()) { this.getWiredSettings().getIntegerParams().add(0); } diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectBotGiveHandItem.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectBotGiveHandItem.java index 73b3afa5..044bc6c0 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectBotGiveHandItem.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectBotGiveHandItem.java @@ -67,7 +67,7 @@ public class WiredEffectBotGiveHandItem extends InteractionWiredEffect { } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().isEmpty()) { this.getWiredSettings().getIntegerParams().add(0); } diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectBotTalk.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectBotTalk.java index 45f1786f..cf8a33e5 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectBotTalk.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectBotTalk.java @@ -70,7 +70,7 @@ public class WiredEffectBotTalk extends InteractionWiredEffect { } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().size() == 0) { this.getWiredSettings().getIntegerParams().add(0); } diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectBotTalkToHabbo.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectBotTalkToHabbo.java index 32f90687..a70db984 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectBotTalkToHabbo.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectBotTalkToHabbo.java @@ -75,7 +75,7 @@ public class WiredEffectBotTalkToHabbo extends InteractionWiredEffect { } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().size() == 0) { this.getWiredSettings().getIntegerParams().add(0); } diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectChangeFurniDirection.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectChangeFurniDirection.java index 42e591b7..0739e0e7 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectChangeFurniDirection.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectChangeFurniDirection.java @@ -109,7 +109,7 @@ public class WiredEffectChangeFurniDirection extends InteractionWiredEffect { } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().isEmpty()) { this.getWiredSettings().getIntegerParams().add(0); this.getWiredSettings().getIntegerParams().add(0); diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectGiveScore.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectGiveScore.java index 68b8c78e..97c9c63f 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectGiveScore.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectGiveScore.java @@ -98,7 +98,7 @@ public class WiredEffectGiveScore extends InteractionWiredEffect { } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().isEmpty()) { this.getWiredSettings().getIntegerParams().add(1); this.getWiredSettings().getIntegerParams().add(1); diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectGiveScoreToTeam.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectGiveScoreToTeam.java index 03d60277..2ddf195f 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectGiveScoreToTeam.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectGiveScoreToTeam.java @@ -72,7 +72,7 @@ public class WiredEffectGiveScoreToTeam extends InteractionWiredEffect { } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().isEmpty()) { this.getWiredSettings().getIntegerParams().add(1); this.getWiredSettings().getIntegerParams().add(1); diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectJoinTeam.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectJoinTeam.java index 04a16702..5a1517db 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectJoinTeam.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectJoinTeam.java @@ -64,7 +64,7 @@ public class WiredEffectJoinTeam extends InteractionWiredEffect { } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().isEmpty()) { this.getWiredSettings().getIntegerParams().add(DEFAULT_TEAM.type); } diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectMatchFurni.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectMatchFurni.java index c39962bd..22031c46 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectMatchFurni.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectMatchFurni.java @@ -81,7 +81,7 @@ public class WiredEffectMatchFurni extends InteractionWiredEffect implements Int } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().isEmpty()) { this.getWiredSettings().getIntegerParams().add(0); this.getWiredSettings().getIntegerParams().add(0); diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectMoveFurniTo.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectMoveFurniTo.java index 56167acc..cabae23c 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectMoveFurniTo.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectMoveFurniTo.java @@ -73,7 +73,7 @@ public class WiredEffectMoveFurniTo extends InteractionWiredEffect { } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().isEmpty()) { this.getWiredSettings().getIntegerParams().add(0); this.getWiredSettings().getIntegerParams().add(1); diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectMoveRotateFurni.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectMoveRotateFurni.java index b6257b58..0045c293 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectMoveRotateFurni.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectMoveRotateFurni.java @@ -33,7 +33,7 @@ public class WiredEffectMoveRotateFurni extends InteractionWiredEffect implement } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().size() == 0) { this.getWiredSettings().getIntegerParams().add(0); this.getWiredSettings().getIntegerParams().add(0); diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerAtSetTime.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerAtSetTime.java index 8b90322e..ece26ad1 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerAtSetTime.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerAtSetTime.java @@ -33,7 +33,7 @@ public class WiredTriggerAtSetTime extends InteractionWiredTrigger implements Wi } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().size() == 0) { this.getWiredSettings().getIntegerParams().add(1); } diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerAtTimeLong.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerAtTimeLong.java index 1dc95757..3e95a175 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerAtTimeLong.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerAtTimeLong.java @@ -33,7 +33,7 @@ public class WiredTriggerAtTimeLong extends InteractionWiredTrigger implements W } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().size() == 0) { this.getWiredSettings().getIntegerParams().add(1); } diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerHabboEntersRoom.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerHabboEntersRoom.java index 4250a2b8..a28b781c 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerHabboEntersRoom.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerHabboEntersRoom.java @@ -38,4 +38,4 @@ public class WiredTriggerHabboEntersRoom extends InteractionWiredTrigger { public WiredTriggerType getType() { return WiredTriggerType.ENTER_ROOM; } -} +} \ No newline at end of file diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerHabboSaysKeyword.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerHabboSaysKeyword.java index bae1ebfb..02c9e9c2 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerHabboSaysKeyword.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerHabboSaysKeyword.java @@ -43,7 +43,7 @@ public class WiredTriggerHabboSaysKeyword extends InteractionWiredTrigger { } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().size() == 0) { this.getWiredSettings().getIntegerParams().add(0); } diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerRepeater.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerRepeater.java index a6b2d407..6a298bfd 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerRepeater.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerRepeater.java @@ -32,7 +32,7 @@ public class WiredTriggerRepeater extends InteractionWiredTrigger implements ICy } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().size() == 0) { this.getWiredSettings().getIntegerParams().add(1); } diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerRepeaterLong.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerRepeaterLong.java index bad6837c..e61a170c 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerRepeaterLong.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerRepeaterLong.java @@ -31,7 +31,7 @@ public class WiredTriggerRepeaterLong extends InteractionWiredTrigger implements } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().size() == 0) { this.getWiredSettings().getIntegerParams().add(1); } diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerScoreAchieved.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerScoreAchieved.java index ac31e535..24ff6810 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerScoreAchieved.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/triggers/WiredTriggerScoreAchieved.java @@ -36,7 +36,7 @@ public class WiredTriggerScoreAchieved extends InteractionWiredTrigger { } @Override - public void loadDefaultParams() { + public void loadDefaultIntegerParams() { if(this.getWiredSettings().getIntegerParams().size() == 0) { this.getWiredSettings().getIntegerParams().add(1); } diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java b/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java index d1141146..8f9824f7 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java @@ -500,8 +500,8 @@ public class Room implements Comparable, ISerialize, Runnable { if (item instanceof InteractionWired interactionWired) { interactionWired.loadWiredSettings(set); } - } catch (SQLException e) { - log.error(CAUGHT_SQL_EXCEPTION, e); + } catch (Exception e) { + log.error(CAUGHT_EXCEPTION, e); } } } diff --git a/src/main/java/com/eu/habbo/habbohotel/wired/WiredHandler.java b/src/main/java/com/eu/habbo/habbohotel/wired/WiredHandler.java index fe21586a..8eeac470 100644 --- a/src/main/java/com/eu/habbo/habbohotel/wired/WiredHandler.java +++ b/src/main/java/com/eu/habbo/habbohotel/wired/WiredHandler.java @@ -7,11 +7,11 @@ import com.eu.habbo.habbohotel.items.interactions.InteractionWiredCondition; import com.eu.habbo.habbohotel.items.interactions.InteractionWiredEffect; import com.eu.habbo.habbohotel.items.interactions.InteractionWiredExtra; import com.eu.habbo.habbohotel.items.interactions.InteractionWiredTrigger; -import com.eu.habbo.habbohotel.items.interactions.wired.interfaces.WiredTriggerReset; import com.eu.habbo.habbohotel.items.interactions.wired.effects.WiredEffectGiveReward; import com.eu.habbo.habbohotel.items.interactions.wired.effects.WiredEffectTriggerStacks; import com.eu.habbo.habbohotel.items.interactions.wired.extra.WiredExtraRandom; import com.eu.habbo.habbohotel.items.interactions.wired.extra.WiredExtraUnseen; +import com.eu.habbo.habbohotel.items.interactions.wired.interfaces.WiredTriggerReset; import com.eu.habbo.habbohotel.rooms.Room; import com.eu.habbo.habbohotel.rooms.RoomTile; import com.eu.habbo.habbohotel.rooms.RoomUnit; @@ -28,7 +28,6 @@ import com.eu.habbo.plugin.events.furniture.wired.WiredStackExecutedEvent; import com.eu.habbo.plugin.events.furniture.wired.WiredStackTriggeredEvent; import com.eu.habbo.plugin.events.users.UserWiredRewardReceivedEvent; import com.fasterxml.jackson.databind.ObjectMapper; -import com.google.gson.GsonBuilder; import gnu.trove.set.hash.THashSet; import lombok.extern.slf4j.Slf4j; @@ -42,13 +41,9 @@ import java.util.List; @Slf4j public class WiredHandler { - - //Configuration. Loaded from database & updated accordingly. public static int MAXIMUM_FURNI_SELECTION = 5; public static int TELEPORT_DELAY = 500; - private static GsonBuilder gsonBuilder = null; - private static ObjectMapper objectMapper = null; public static boolean handle(WiredTriggerType triggerType, RoomUnit roomUnit, Room room, Object[] stuff) { @@ -253,13 +248,6 @@ public class WiredHandler { return executed; } - public static GsonBuilder getGsonBuilder() { - if(gsonBuilder == null) { - gsonBuilder = new GsonBuilder(); - } - return gsonBuilder; - } - public static ObjectMapper getObjectMapper() { if(objectMapper == null) { objectMapper = new ObjectMapper();