mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-10-02 11:50:30 +02:00
Merge branch 'dev' of https://git.krews.org/morningstar/Arcturus-Community into dev
This commit is contained in:
commit
b01426646a
@ -74,7 +74,12 @@ public class CommandHandler {
|
||||
boolean succes = false;
|
||||
if (command.permission == null || gameClient.getHabbo().hasPermission(command.permission, gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null && (gameClient.getHabbo().getHabboInfo().getCurrentRoom().hasRights(gameClient.getHabbo())) || gameClient.getHabbo().hasPermission(Permission.ACC_PLACEFURNI) || (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null && gameClient.getHabbo().getHabboInfo().getCurrentRoom().getGuildId() > 0 && gameClient.getHabbo().getHabboInfo().getCurrentRoom().guildRightLevel(gameClient.getHabbo()) >= 2))) {
|
||||
try {
|
||||
Emulator.getPluginManager().fireEvent(new UserExecuteCommandEvent(gameClient.getHabbo(), command, parts));
|
||||
UserExecuteCommandEvent userExecuteCommandEvent = new UserExecuteCommandEvent(gameClient.getHabbo(), command, parts);
|
||||
Emulator.getPluginManager().fireEvent(userExecuteCommandEvent);
|
||||
|
||||
if(userExecuteCommandEvent.isCancelled()) {
|
||||
return userExecuteCommandEvent.isSuccess();
|
||||
}
|
||||
|
||||
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null)
|
||||
gameClient.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new RoomUserTypingComposer(gameClient.getHabbo().getRoomUnit(), false).compose());
|
||||
|
@ -15,7 +15,7 @@ public class FreezeLivesComposer extends MessageComposer {
|
||||
@Override
|
||||
protected ServerMessage composeInternal() {
|
||||
this.response.init(Outgoing.FreezeLivesComposer);
|
||||
this.response.appendInt(this.gamePlayer.getHabbo().getHabboInfo().getId());
|
||||
this.response.appendInt(this.gamePlayer.getHabbo().getRoomUnit().getId());
|
||||
this.response.appendInt(this.gamePlayer.getLives());
|
||||
return this.response;
|
||||
}
|
||||
|
@ -6,15 +6,22 @@ import com.eu.habbo.habbohotel.users.Habbo;
|
||||
public class UserExecuteCommandEvent extends UserEvent {
|
||||
|
||||
public final Command command;
|
||||
|
||||
|
||||
public final String[] params;
|
||||
|
||||
private boolean success;
|
||||
|
||||
public UserExecuteCommandEvent(Habbo habbo, Command command, String[] params) {
|
||||
super(habbo);
|
||||
|
||||
this.command = command;
|
||||
this.params = params;
|
||||
this.success = true;
|
||||
}
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user