mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-22 15:00:52 +01:00
Changes by Swirny, squashed to make merging easier
This commit is contained in:
parent
e2013c8451
commit
25c9f88718
@ -1,7 +1,3 @@
|
||||
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');
|
||||
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('retro.style.homeroom', '1');
|
4
sqlupdates/2_4_0 RC-1 to 2_4_0 RC-2.sql
Normal file
4
sqlupdates/2_4_0 RC-1 to 2_4_0 RC-2.sql
Normal file
@ -0,0 +1,4 @@
|
||||
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');
|
||||
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_softkick_not_found', '%user% not found');
|
||||
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_softkick_error_self', 'You can not softkick yourself!');
|
@ -4,6 +4,7 @@ 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.rooms.RoomChatMessageBubbles;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
|
||||
public class SoftKickCommand extends Command {
|
||||
@ -13,13 +14,22 @@ public class SoftKickCommand extends Command {
|
||||
|
||||
@Override
|
||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
||||
final Room room = gameClient.getHabbo().getHabboInfo().getCurrentRoom();
|
||||
if (params.length == 2) {
|
||||
Habbo habbo = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbo(params[1]);
|
||||
|
||||
for (Habbo habbo : room.getHabbos()) {
|
||||
if (!(habbo.hasPermission(Permission.ACC_UNKICKABLE) || habbo.hasPermission(Permission.ACC_SUPPORTTOOL) || room.isOwner(habbo))) {
|
||||
room.kickHabbo(habbo, false);
|
||||
}
|
||||
if (habbo == null) {
|
||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.keys.cmd_softkick_error").replace("%user%", params[1]), RoomChatMessageBubbles.ALERT);
|
||||
return true;
|
||||
}
|
||||
else if (habbo == gameClient.getHabbo()) {
|
||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.keys.cmd_softkick_error_self"), RoomChatMessageBubbles.ALERT);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
final Room room = gameClient.getHabbo().getHabboInfo().getCurrentRoom();
|
||||
room.kickHabbo(habbo, false);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user