mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-31 04:12:37 +01:00
Temporary Command fixes to prevent you from triggering the commands while on a horse
This commit is contained in:
parent
37010f7ab3
commit
1a09c8af3e
@ -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().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();
|
Habbo habbo = gameClient.getHabbo();
|
||||||
|
|
||||||
if(params.length >= 2)
|
if(params.length >= 2)
|
||||||
|
@ -13,6 +13,7 @@ public class SitCommand extends Command
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception
|
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());
|
gameClient.getHabbo().getHabboInfo().getCurrentRoom().makeSit(gameClient.getHabbo());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ public class TeleportCommand extends Command
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception
|
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)
|
if(gameClient.getHabbo().getRoomUnit().cmdTeleport)
|
||||||
{
|
{
|
||||||
gameClient.getHabbo().getRoomUnit().cmdTeleport = false;
|
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);
|
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.succes.cmd_teleport.enabled"), RoomChatMessageBubbles.ALERT);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -161,7 +161,14 @@ public class RoomUnit
|
|||||||
if (this.path == null || this.path.isEmpty())
|
if (this.path == null || this.path.isEmpty())
|
||||||
return true;
|
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();
|
||||||
this.path.poll();
|
this.path.poll();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user