(donington) Fixes for compiler warnings & minor .gitignore enhancement, completed the last of the creatureType/entityType renaming (a few imports and functions)
This commit is contained in:
parent
03fe63cda0
commit
30c2eaeac3
2
.gitignore
vendored
2
.gitignore
vendored
@ -14,7 +14,7 @@
|
||||
/build
|
||||
/bin
|
||||
/dist
|
||||
/localexport.jardesc
|
||||
/*.jardesc
|
||||
|
||||
# Mac filesystem dust
|
||||
.DS_Store
|
@ -24,12 +24,13 @@ import com.earth2me.essentials.chat.EssentialsLocalChatEvent;
|
||||
* If an older version is detected in the setup() method below, handling is passed off to EssentialsOldVersionFeatures
|
||||
*/
|
||||
|
||||
// silence deprecation warnings with this old interface
|
||||
@SuppressWarnings("deprecation")
|
||||
public class EssentialsFeatures
|
||||
{
|
||||
private static EssentialsChat essChat;
|
||||
private static IEssentials essentials;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void setup()
|
||||
{
|
||||
// integrate main essentials plugin
|
||||
@ -79,7 +80,6 @@ public class EssentialsFeatures
|
||||
|
||||
|
||||
// return false if feature is disabled or Essentials isn't available
|
||||
@SuppressWarnings("deprecation")
|
||||
public static boolean handleTeleport(Player player, Location loc)
|
||||
{
|
||||
if ( ! Conf.homesTeleportCommandEssentialsIntegration || essentials == null) return false;
|
||||
@ -121,6 +121,7 @@ public class EssentialsFeatures
|
||||
|
||||
private static class LocalChatListener implements Listener
|
||||
{
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority = EventPriority.NORMAL)
|
||||
public void onPlayerChat(EssentialsLocalChatEvent event)
|
||||
{
|
||||
|
@ -444,7 +444,7 @@ public class FactionsEntityListener implements Listener
|
||||
return;
|
||||
}
|
||||
|
||||
if (Conf.safeZoneNerfedCreatureTypes.contains(event.getCreatureType()) && Board.getFactionAt(new FLocation(event.getLocation())).noMonstersInTerritory())
|
||||
if (Conf.safeZoneNerfedCreatureTypes.contains(event.getEntityType()) && Board.getFactionAt(new FLocation(event.getLocation())).noMonstersInTerritory())
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
@ -5,12 +5,12 @@ import java.util.HashSet;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Creature;
|
||||
import org.bukkit.entity.CreatureType;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Entity;
|
||||
|
||||
public class MiscUtil
|
||||
{
|
||||
public static CreatureType creatureTypeFromEntity(Entity entity)
|
||||
public static EntityType creatureTypeFromEntity(Entity entity)
|
||||
{
|
||||
if ( ! (entity instanceof Creature))
|
||||
{
|
||||
@ -20,7 +20,7 @@ public class MiscUtil
|
||||
String name = entity.getClass().getSimpleName();
|
||||
name = name.substring(5); // Remove "Craft"
|
||||
|
||||
return CreatureType.fromName(name);
|
||||
return EntityType.fromName(name);
|
||||
}
|
||||
|
||||
// Inclusive range
|
||||
|
Loading…
Reference in New Issue
Block a user