Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void fail(HackCheck hackCheck, String modifiers) {
- if (!notifications.containsKey(hackCheck.getHackType())) {
- notifications.put(hackCheck.getHackType(), 1);
- Utils.notify(player, hackCheck.getHackType(), 1, modifiers);
- return;
- }
- int currentNotifications = notifications.get(hackCheck.getHackType()) + 1;
- if (currentNotifications >= hackCheck.getMaxNotifications()) {
- Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(Shadow.get(), new Runnable() {
- @Override
- public void run() {
- hackCheck.deliverPunishment(getPlayer());
- }
- }, 0L);
- notifications.remove(hackCheck.getHackType());
- } else {
- notifications.remove(hackCheck.getHackType());
- notifications.put(hackCheck.getHackType(), currentNotifications);
- Utils.notify(player, hackCheck.getHackType(), currentNotifications, modifiers);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement