diff --git a/src/main/java/com/eu/habbo/habbohotel/commands/FastwalkCommand.java b/src/main/java/com/eu/habbo/habbohotel/commands/FastwalkCommand.java index 519b692b..49c9a4ae 100644 --- a/src/main/java/com/eu/habbo/habbohotel/commands/FastwalkCommand.java +++ b/src/main/java/com/eu/habbo/habbohotel/commands/FastwalkCommand.java @@ -16,6 +16,11 @@ public class FastwalkCommand extends Command { if(gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) { + if(gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) { + if (gameClient.getHabbo().getHabboInfo().getRiding() != null) //TODO Make this an event plugin which fires that can be cancelled + return true; + } + Habbo habbo = gameClient.getHabbo(); if(params.length >= 2) diff --git a/src/main/java/com/eu/habbo/habbohotel/commands/SitCommand.java b/src/main/java/com/eu/habbo/habbohotel/commands/SitCommand.java index b756eac6..216c3eff 100644 --- a/src/main/java/com/eu/habbo/habbohotel/commands/SitCommand.java +++ b/src/main/java/com/eu/habbo/habbohotel/commands/SitCommand.java @@ -13,6 +13,7 @@ public class SitCommand extends Command @Override public boolean handle(GameClient gameClient, String[] params) throws Exception { + if (gameClient.getHabbo().getHabboInfo().getRiding() == null) //TODO Make this an event plugin which fires that can be cancelled gameClient.getHabbo().getHabboInfo().getCurrentRoom().makeSit(gameClient.getHabbo()); return true; } diff --git a/src/main/java/com/eu/habbo/habbohotel/commands/TeleportCommand.java b/src/main/java/com/eu/habbo/habbohotel/commands/TeleportCommand.java index a1fdf6d3..8fa7e7e0 100644 --- a/src/main/java/com/eu/habbo/habbohotel/commands/TeleportCommand.java +++ b/src/main/java/com/eu/habbo/habbohotel/commands/TeleportCommand.java @@ -14,6 +14,7 @@ public class TeleportCommand extends Command @Override public boolean handle(GameClient gameClient, String[] params) throws Exception { + if (gameClient.getHabbo().getHabboInfo().getRiding() == null) //TODO Make this an event plugin which fires that can be cancelled if(gameClient.getHabbo().getRoomUnit().cmdTeleport) { gameClient.getHabbo().getRoomUnit().cmdTeleport = false; @@ -26,5 +27,6 @@ public class TeleportCommand extends Command gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.succes.cmd_teleport.enabled"), RoomChatMessageBubbles.ALERT); return true; } + return true; } } diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUnit.java b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUnit.java index 04e25832..ebeac176 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUnit.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUnit.java @@ -161,7 +161,14 @@ public class RoomUnit if (this.path == null || this.path.isEmpty()) return true; - if (this.fastWalk && this.path.size() >= 3) + boolean canfastwalk = true; + Habbo habboT = room.getHabbo(this); + if(habboT != null) { + if(habboT.getHabboInfo().getRiding() != null) + canfastwalk = false; + } + + if (canfastwalk && this.fastWalk && this.path.size() >= 3) { this.path.poll(); this.path.poll();