Arcturus-Community/src/main/java/com/eu/habbo/habbohotel/commands/SitDownCommand.java

34 lines
1002 B
Java
Raw Normal View History

2018-07-06 15:30:00 +02:00
package com.eu.habbo.habbohotel.commands;
import com.eu.habbo.Emulator;
import com.eu.habbo.habbohotel.gameclients.GameClient;
2018-09-12 18:45:00 +02:00
import com.eu.habbo.habbohotel.rooms.RoomUnitStatus;
2018-07-06 15:30:00 +02:00
import com.eu.habbo.habbohotel.users.Habbo;
public class SitDownCommand extends Command
{
public SitDownCommand()
{
super("cmd_sitdown", Emulator.getTexts().getValue("commands.keys.cmd_sitdown").split(";"));
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception
{
for (Habbo habbo : gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbos())
{
if(habbo.getRoomUnit().isWalking())
{
habbo.getRoomUnit().stopWalking();
}
2018-09-12 18:45:00 +02:00
else if(habbo.getRoomUnit().hasStatus(RoomUnitStatus.SIT))
2018-07-06 15:30:00 +02:00
{
continue;
}
gameClient.getHabbo().getHabboInfo().getCurrentRoom().makeSit(habbo);
}
return true;
}
}