Exemplo n.º 1
0
 // <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();
 }
Exemplo n.º 2
0
 @Override
 public void run() {
   for (Player p : Bukkit.getOnlinePlayers()) {
     p.setFoodLevel(Main.lobbyBoolean ? 20 : 16);
     p.setLevel(SQL.getMoney(p.getName()));
   }
 }
Exemplo n.º 3
0
 @EventHandler(priority = EventPriority.MONITOR)
 public void onRodUse(PlayerUseRodEvent event) {
   SQL.addRodUsed(event.getPlayer().getName());
 }