Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void onDeath(PlayerDeathEvent e) {
- Player p = e.getEntity();
- int ostalo = cmds.igr.size();
- if(cmds.igr.contains(p)) {
- cmds.igr.remove(p);
- cmds.mrtv.add(p);
- } else if(ostalo == 1) {
- Player win = cmds.igr.get(0);
- int x = cmds.pl.getConfig().getInt("spawnX");
- int y = cmds.pl.getConfig().getInt("spawnY");
- int z = cmds.pl.getConfig().getInt("spawnZ");
- World w = win.getWorld();
- Location spawn = new Location(w, x, y, z);
- win.teleport(spawn);
- this.clearInv(win);
- this.loadInv(win);
- cmds.igr.remove(win);
- cmds.mrtv.add(p);
- Bukkit.broadcastMessage(ChatColor.translateAlternateColorCodes('&', cmds.pl.getConfig().getString("win").replaceAll("%igrac%", win.getName())));
- } else return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement