mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +01:00
Update ModBanEvent.java
This commit is contained in:
parent
c0282b1d03
commit
831ca621bb
@ -46,30 +46,32 @@ public class ModBanEvent extends MessageHandler {
|
||||
case BAN_AVATAR_ONLY_100_YEARS:
|
||||
duration = Emulator.getIntUnixTimestamp();
|
||||
}
|
||||
if (this.client.getHabbo().hasPermission(Permission.ACC_SUPPORTTOOL)) {
|
||||
ModToolSanctions modToolSanctions = Emulator.getGameEnvironment().getModToolSanctions();
|
||||
if (!this.client.getHabbo().hasPermission(Permission.ACC_SUPPORTTOOL)) {
|
||||
ScripterManager.scripterDetected(this.client, Emulator.getTexts().getValue("scripter.warning.modtools.ban").replace("%username%", this.client.getHabbo().getHabboInfo().getUsername()));
|
||||
return;
|
||||
}
|
||||
|
||||
if (Emulator.getConfig().getBoolean("hotel.sanctions.enabled")) {
|
||||
if (!Emulator.getConfig().getBoolean("hotel.sanctions.enabled")) {
|
||||
Emulator.getGameEnvironment().getModToolManager().ban(userId, this.client.getHabbo(), message, duration, ModToolBanType.ACCOUNT, cfhTopic);
|
||||
return;
|
||||
}
|
||||
ModToolSanctions modToolSanctions = Emulator.getGameEnvironment().getModToolSanctions();
|
||||
THashMap<Integer, ArrayList<ModToolSanctionItem>> modToolSanctionItemsHashMap = Emulator.getGameEnvironment().getModToolSanctions().getSanctions(userId);
|
||||
ArrayList<ModToolSanctionItem> modToolSanctionItems = modToolSanctionItemsHashMap.get(userId);
|
||||
|
||||
if (modToolSanctionItems != null && !modToolSanctionItemsHashMap.isEmpty()) {
|
||||
ModToolSanctionItem item = modToolSanctionItems.get(modToolSanctionItems.size() - 1);
|
||||
|
||||
if (item.probationTimestamp > 0 && item.probationTimestamp >= Emulator.getIntUnixTimestamp()) {
|
||||
modToolSanctions.run(userId, this.client.getHabbo(), item.sanctionLevel, cfhTopic, message, 0, false, 0);
|
||||
} else {
|
||||
modToolSanctions.run(userId, this.client.getHabbo(), item.sanctionLevel, cfhTopic, message, 0, false, 0);
|
||||
}
|
||||
} else {
|
||||
if (modToolSanctionItemsHashMap.isEmpty()) {
|
||||
modToolSanctions.run(userId, this.client.getHabbo(), 0, cfhTopic, message, 0, false, 0);
|
||||
}
|
||||
} else {
|
||||
Emulator.getGameEnvironment().getModToolManager().ban(userId, this.client.getHabbo(), message, duration, ModToolBanType.ACCOUNT, cfhTopic);
|
||||
return;
|
||||
}
|
||||
|
||||
ModToolSanctionItem item = modToolSanctionItems.get(modToolSanctionItems.size() - 1);
|
||||
if (item == null) return;
|
||||
|
||||
if (item.probationTimestamp >= Emulator.getIntUnixTimestamp()) {
|
||||
modToolSanctions.run(userId, this.client.getHabbo(), item.sanctionLevel, cfhTopic, message, 0, false, 0);
|
||||
} else {
|
||||
ScripterManager.scripterDetected(this.client, Emulator.getTexts().getValue("scripter.warning.modtools.ban").replace("%username%", this.client.getHabbo().getHabboInfo().getUsername()));
|
||||
}
|
||||
modToolSanctions.run(userId, this.client.getHabbo(), item.sanctionLevel, cfhTopic, message, 0, false, 0);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user