Advertisement
Data_Base

Untitled

Oct 8th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. public void fail(HackCheck hackCheck, String modifiers) {
  2.  
  3. if (!notifications.containsKey(hackCheck.getHackType())) {
  4.  
  5. notifications.put(hackCheck.getHackType(), 1);
  6.  
  7. Utils.notify(player, hackCheck.getHackType(), 1, modifiers);
  8.  
  9. return;
  10. }
  11.  
  12. int currentNotifications = notifications.get(hackCheck.getHackType()) + 1;
  13.  
  14. if (currentNotifications >= hackCheck.getMaxNotifications()) {
  15.  
  16. Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(Shadow.get(), new Runnable() {
  17. @Override
  18. public void run() {
  19.  
  20. hackCheck.deliverPunishment(getPlayer());
  21.  
  22. }
  23. }, 0L);
  24.  
  25. notifications.remove(hackCheck.getHackType());
  26.  
  27. } else {
  28.  
  29. notifications.remove(hackCheck.getHackType());
  30. notifications.put(hackCheck.getHackType(), currentNotifications);
  31.  
  32. Utils.notify(player, hackCheck.getHackType(), currentNotifications, modifiers);
  33.  
  34. }
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement