mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-26 08:20:51 +01:00
Added official moderation command softkick
This commit is contained in:
parent
1e51448b38
commit
e2013c8451
@ -1,3 +1,7 @@
|
||||
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.room.stickies.max', '200');
|
||||
|
||||
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('retro.style.homeroom', '1');
|
||||
|
||||
ALTER TABLE `permissions` ADD `cmd_softkick` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `cmd_kickall`;
|
||||
|
||||
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.keys.cmd_softkick', 'softkick');
|
||||
|
@ -284,6 +284,7 @@ public class CommandHandler {
|
||||
addCommand(new WordQuizCommand());
|
||||
addCommand(new UpdateYoutubePlaylistsCommand());
|
||||
addCommand(new AddYoutubePlaylistCommand());
|
||||
addCommand(new SoftKickCommand());
|
||||
|
||||
addCommand(new TestCommand());
|
||||
}
|
||||
|
@ -0,0 +1,25 @@
|
||||
package com.eu.habbo.habbohotel.commands;
|
||||
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.gameclients.GameClient;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
|
||||
public class SoftKickCommand extends Command {
|
||||
public SoftKickCommand() {
|
||||
super("cmd_softkick", Emulator.getTexts().getValue("commands.keys.cmd_softkick").split(";"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
||||
final Room room = gameClient.getHabbo().getHabboInfo().getCurrentRoom();
|
||||
|
||||
for (Habbo habbo : room.getHabbos()) {
|
||||
if (!(habbo.hasPermission(Permission.ACC_UNKICKABLE) || habbo.hasPermission(Permission.ACC_SUPPORTTOOL) || room.isOwner(habbo))) {
|
||||
room.kickHabbo(habbo, false);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user