Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Commit

Permalink
(donington) Fixes for compiler warnings & minor .gitignore enhancemen…
Browse files Browse the repository at this point in the history
…t, completed the last of the creatureType/entityType renaming (a few imports and functions)
  • Loading branch information
Brettflan committed Mar 13, 2012
1 parent 03fe63c commit 30c2eae
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/build
/bin
/dist
/localexport.jardesc
/*.jardesc

# Mac filesystem dust
.DS_Store
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
* 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
Expand Down Expand Up @@ -79,7 +80,6 @@ public static void unhookChat()


// 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;
Expand Down Expand Up @@ -121,6 +121,7 @@ public static void integrateChat(EssentialsChat instance)

private static class LocalChatListener implements Listener
{
@SuppressWarnings("unused")
@EventHandler(priority = EventPriority.NORMAL)
public void onPlayerChat(EssentialsLocalChatEvent event)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ public void onCreatureSpawn(CreatureSpawnEvent event)
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);
}
Expand Down
6 changes: 3 additions & 3 deletions src/com/massivecraft/factions/util/MiscUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

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))
{
Expand All @@ -20,7 +20,7 @@ public static CreatureType creatureTypeFromEntity(Entity entity)
String name = entity.getClass().getSimpleName();
name = name.substring(5); // Remove "Craft"

return CreatureType.fromName(name);
return EntityType.fromName(name);
}

// Inclusive range
Expand Down

0 comments on commit 30c2eae

Please sign in to comment.