mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +01:00
fix(ModToolSanctionEvents): run if timestamp is back to 0
This commit is contained in:
parent
72adc5325d
commit
2622140d5a
@ -36,6 +36,8 @@ public class ModToolSanctionAlertEvent extends MessageHandler {
|
||||
|
||||
if (item != null && 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 {
|
||||
modToolSanctions.run(userId, this.client.getHabbo(), 0, cfhTopic, message, 0, false, 0);
|
||||
|
@ -60,6 +60,8 @@ public class ModToolSanctionBanEvent extends MessageHandler {
|
||||
|
||||
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 {
|
||||
modToolSanctions.run(userId, this.client.getHabbo(), 0, cfhTopic, message, 0, false, 0);
|
||||
|
@ -41,6 +41,12 @@ public class ModToolSanctionMuteEvent extends MessageHandler {
|
||||
|
||||
int muteDurationTimestamp = Math.toIntExact(new Date( System.currentTimeMillis() + (modToolSanctionLevelItem.sanctionHourLength * 60 * 60)).getTime() / 1000);
|
||||
|
||||
modToolSanctions.run(userId, this.client.getHabbo(), item.sanctionLevel, cfhTopic, message, 0, true, muteDurationTimestamp);
|
||||
} else {
|
||||
ModToolSanctionLevelItem modToolSanctionLevelItem = modToolSanctions.getSanctionLevelItem(item.sanctionLevel);
|
||||
|
||||
int muteDurationTimestamp = Math.toIntExact(new Date( System.currentTimeMillis() + (modToolSanctionLevelItem.sanctionHourLength * 60 * 60)).getTime() / 1000);
|
||||
|
||||
modToolSanctions.run(userId, this.client.getHabbo(), item.sanctionLevel, cfhTopic, message, 0, true, muteDurationTimestamp);
|
||||
}
|
||||
} else {
|
||||
|
@ -36,6 +36,8 @@ public class ModToolSanctionTradeLockEvent extends MessageHandler {
|
||||
|
||||
if (item.probationTimestamp > 0 && item.probationTimestamp >= Emulator.getIntUnixTimestamp()) {
|
||||
modToolSanctions.run(userId, this.client.getHabbo(), item.sanctionLevel, cfhTopic, message, duration, false, 0);
|
||||
} else {
|
||||
modToolSanctions.run(userId, this.client.getHabbo(), item.sanctionLevel, cfhTopic, message, duration, false, 0);
|
||||
}
|
||||
} else {
|
||||
modToolSanctions.run(userId, this.client.getHabbo(), 0, cfhTopic, message, duration, false, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user