// <Index = 3> @EventHandler public void onPlayerDeath(PlayerDeathEvent event) { Player att = event.getEntity().getKiller(); String pName = event.getEntity().getName(); if (att instanceof Player && att.getEntityId() != event.getEntity().getEntityId()) { String aName = att.getName(); SQL.addKill(aName); SQL.addMoney(aName, SQL.getMoney(pName) > SQL.getMoney(aName) ? 10 : 5); ScoreboardHandler.addKill(aName); } SQL.addDeath(pName); event.getDrops().clear(); }
@Override public void run() { for (Player p : Bukkit.getOnlinePlayers()) { p.setFoodLevel(Main.lobbyBoolean ? 20 : 16); p.setLevel(SQL.getMoney(p.getName())); } }
@EventHandler(priority = EventPriority.MONITOR) public void onRodUse(PlayerUseRodEvent event) { SQL.addRodUsed(event.getPlayer().getName()); }