Minor improvements

This commit is contained in:
mathias 2019-08-02 19:41:48 +03:00
parent 06b3d1d613
commit 9ad500ec15
2 changed files with 4 additions and 8 deletions

View file

@ -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.DROWNED ||
event.getEntityType() == EntityType.GIANT || event.getEntityType() == EntityType.GIANT ||
event.getEntityType() == EntityType.HUSK || event.getEntityType() == EntityType.HUSK ||
@ -93,7 +93,7 @@ class EntitySpawn implements Listener {
} catch (Exception exception) { } catch (Exception exception) {
mob.getEquipment().setItemInOffHand(null); 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(); final int dragonCount = event.getLocation().getWorld().getEntitiesByClass(EnderDragon.class).size();
if (dragonCount > 25) { 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.DROWNED ||
event.getEntityType() == EntityType.GIANT || event.getEntityType() == EntityType.GIANT ||
event.getEntityType() == EntityType.HUSK || event.getEntityType() == EntityType.HUSK ||
@ -160,7 +160,7 @@ class EntitySpawn implements Listener {
} catch (Exception exception) { } catch (Exception exception) {
mob.getEquipment().setItemInOffHand(null); mob.getEquipment().setItemInOffHand(null);
} }
}*/ }
} }
} }

View file

@ -6,11 +6,8 @@ import java.util.UUID;
import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.HttpsURLConnection;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.World;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
@ -126,7 +123,6 @@ class PlayerConnection implements Listener {
@EventHandler @EventHandler
void onPlayerQuit(PlayerQuitEvent event) { void onPlayerQuit(PlayerQuitEvent event) {
final Player player = event.getPlayer(); final Player player = event.getPlayer();
final World world = player.getLocation().getWorld();
main.commandMillisList.remove(player.getUniqueId()); main.commandMillisList.remove(player.getUniqueId());
main.interactMillisList.remove(player.getUniqueId()); main.interactMillisList.remove(player.getUniqueId());