From 9ad500ec155576f5223e3ea0d4a7c09abcfbdf7d Mon Sep 17 00:00:00 2001 From: mathias Date: Fri, 2 Aug 2019 19:41:48 +0300 Subject: [PATCH] Minor improvements --- .../java/pw/kaboom/extras/modules/entity/EntitySpawn.java | 8 ++++---- .../pw/kaboom/extras/modules/player/PlayerConnection.java | 4 ---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/main/java/pw/kaboom/extras/modules/entity/EntitySpawn.java b/src/main/java/pw/kaboom/extras/modules/entity/EntitySpawn.java index 5149938..4ac0675 100644 --- a/src/main/java/pw/kaboom/extras/modules/entity/EntitySpawn.java +++ b/src/main/java/pw/kaboom/extras/modules/entity/EntitySpawn.java @@ -61,7 +61,7 @@ class EntitySpawn implements Listener { } } - /*if (event.getEntityType() == EntityType.ARMOR_STAND || + if (event.getEntityType() == EntityType.ARMOR_STAND || event.getEntityType() == EntityType.DROWNED || event.getEntityType() == EntityType.GIANT || event.getEntityType() == EntityType.HUSK || @@ -93,7 +93,7 @@ class EntitySpawn implements Listener { } catch (Exception exception) { mob.getEquipment().setItemInOffHand(null); } - } else */if (event.getEntityType() == EntityType.ENDER_DRAGON) { + } else if (event.getEntityType() == EntityType.ENDER_DRAGON) { final int dragonCount = event.getLocation().getWorld().getEntitiesByClass(EnderDragon.class).size(); if (dragonCount > 25) { @@ -128,7 +128,7 @@ class EntitySpawn implements Listener { } } - /*if (event.getEntityType() == EntityType.ARMOR_STAND || + if (event.getEntityType() == EntityType.ARMOR_STAND || event.getEntityType() == EntityType.DROWNED || event.getEntityType() == EntityType.GIANT || event.getEntityType() == EntityType.HUSK || @@ -160,7 +160,7 @@ class EntitySpawn implements Listener { } catch (Exception exception) { mob.getEquipment().setItemInOffHand(null); } - }*/ + } } } diff --git a/src/main/java/pw/kaboom/extras/modules/player/PlayerConnection.java b/src/main/java/pw/kaboom/extras/modules/player/PlayerConnection.java index 70b0aff..9084b15 100644 --- a/src/main/java/pw/kaboom/extras/modules/player/PlayerConnection.java +++ b/src/main/java/pw/kaboom/extras/modules/player/PlayerConnection.java @@ -6,11 +6,8 @@ import java.util.UUID; import javax.net.ssl.HttpsURLConnection; -import org.bukkit.Bukkit; import org.bukkit.ChatColor; -import org.bukkit.World; -import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -126,7 +123,6 @@ class PlayerConnection implements Listener { @EventHandler void onPlayerQuit(PlayerQuitEvent event) { final Player player = event.getPlayer(); - final World world = player.getLocation().getWorld(); main.commandMillisList.remove(player.getUniqueId()); main.interactMillisList.remove(player.getUniqueId());