Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void onKill(PlayerDeathEvent event){
- Player killed = event.getEntity();
- if(ConfigurationService.KITMAP_STATUS && killed instanceof Player){
- Player killer = event.getEntity().getKiller();
- killer.sendMessage("check returned true");
- int killstreak = plugin.getPlayerManager().getPlayerData(killer).getKillstreak();
- plugin.getPlayerManager().getPlayerData(killer).setKillstreak(killstreak + 1);
- if(killstreak > 1){
- plugin.getPlayerManager().getPlayerData(killed).setKillstreak(0);
- killed.sendMessage(Color.translate("&c&lYOUR KILLSTREAK WAS ENDED BY &e" + killer.getDisplayName()));
- return;
- }
- int potionTime = 20*(8*60);
- switch (plugin.getPlayerManager().getPlayerData(killer).getKillstreak()){
- case 3: killer.sendMessage(ChatColor.GREEN + ChatColor.BOLD.toString() + "3 PLAYER KILLSTREAK! " +
- ChatColor.GOLD + ChatColor.BOLD.toString() + "AWARDED 5 GOLDEN APPLES");
- ItemStack goldenApples = new ItemStack(Material.GOLDEN_APPLE, 5);
- putItemInInventory(killer, goldenApples);
- break;
- case 6:
- killer.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE, potionTime, 0));
- killer.sendMessage(ChatColor.GREEN + ChatColor.BOLD.toString() + "6 PLAYER KILLSTREAK! " +
- ChatColor.GOLD + ChatColor.BOLD.toString() + "AWARDED 8 MINUTES OF FIRE RESISTANCE");
- break;
- case 9:
- ItemStack slownessPotion = new ItemStack(Material.POTION, 1, (short) 16426);
- ItemStack poisonPotion = new ItemStack(Material.POTION, 1, (short) 16388);
- putItemInInventory(killer, slownessPotion);
- putItemInInventory(killer, poisonPotion);
- killer.sendMessage(ChatColor.GREEN + ChatColor.BOLD.toString() + "9 PLAYER KILLSTREAK! " +
- ChatColor.GOLD + ChatColor.BOLD.toString() + "AWARDED DEBUFFS");
- break;
- case 12:
- killer.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, potionTime, 1));
- killer.sendMessage(ChatColor.GREEN + ChatColor.BOLD.toString() + "12 PLAYER KILLSTREAK! " +
- ChatColor.GOLD + ChatColor.BOLD.toString() + "AWARDED 8 MINUTES OF SPEED II");
- break;
- case 17:
- killer.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, potionTime, 0));
- killer.sendMessage(ChatColor.GREEN + ChatColor.BOLD.toString() + "17 PLAYER KILLSTREAK! " +
- ChatColor.GOLD + ChatColor.BOLD.toString() + "AWARDED 8 MINUTES STRENGTH I");
- break;
- case 24:
- ItemStack godApple = new ItemStack(Material.GOLDEN_APPLE, 1, (short) 1);
- putItemInInventory(killer, godApple);
- killer.sendMessage(ChatColor.GREEN + ChatColor.BOLD.toString() + "24 PLAYER KILLSTREAK! " +
- ChatColor.GOLD + ChatColor.BOLD.toString() + "AWARDED A GOD APPLE");
- case 27:
- killer.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, potionTime, 0));
- killer.sendMessage(ChatColor.GREEN + ChatColor.BOLD.toString() + "27 PLAYER KILLSTREAK! " +
- ChatColor.GOLD + ChatColor.BOLD.toString() + "AWARDED 8 MINUTES INVISIBILITY");
- break;
- case 30:
- potionTime = 20*(60*60);
- killer.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, potionTime, 0));
- killer.sendMessage(ChatColor.GREEN + ChatColor.BOLD.toString() + "30 PLAYER KILLSTREAK! " +
- ChatColor.GOLD + ChatColor.BOLD.toString() + "AWARDED PERMANENT SPEED II");
- break;
- default:
- killer.sendMessage("error");
- }
- }
- Player killer = event.getEntity().getKiller();
- killer.sendMessage("check returned true");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement