diff --git a/MobArena.jar b/MobArena.jar index cb89d57..6a73e4b 100644 Binary files a/MobArena.jar and b/MobArena.jar differ diff --git a/bin/plugin.yml b/bin/plugin.yml index ae4c99e..0996566 100644 --- a/bin/plugin.yml +++ b/bin/plugin.yml @@ -1,6 +1,6 @@ name: MobArena main: com.garbagemule.MobArena.MobArena -version: 0.91.1 +version: 0.91.2 softdepend: [MultiVerse] commands: ma: diff --git a/src/com/garbagemule/MobArena/MACommands.java b/src/com/garbagemule/MobArena/MACommands.java index c89adec..da7a001 100644 --- a/src/com/garbagemule/MobArena/MACommands.java +++ b/src/com/garbagemule/MobArena/MACommands.java @@ -172,8 +172,8 @@ public class MACommands implements CommandExecutor } // Write the coordinate data to the config-file. - MAUtils.setCoords(arg, p.getLocation()); - + MAUtils.setCoords(arg, p.getLocation().getBlock().getRelative(0,1,0).getLocation()); + ArenaManager.tellPlayer(p, "Warp point \"" + arg + "\" set."); MAUtils.notifyIfSetup(p); return true; @@ -190,7 +190,7 @@ public class MACommands implements CommandExecutor } // Write the coordinate data to the config-file. - MAUtils.setCoords("spawnpoints." + arg, p.getLocation()); + MAUtils.setCoords("spawnpoints." + arg, p.getLocation().getBlock().getRelative(0,1,0).getLocation()); ArenaManager.tellPlayer(p, "Spawn point with name \"" + arg + "\" added."); MAUtils.notifyIfSetup(p); diff --git a/src/com/garbagemule/MobArena/MobArena.java b/src/com/garbagemule/MobArena/MobArena.java index 8414ea6..768d859 100644 --- a/src/com/garbagemule/MobArena/MobArena.java +++ b/src/com/garbagemule/MobArena/MobArena.java @@ -67,7 +67,7 @@ public class MobArena extends JavaPlugin pm.registerEvent(Event.Type.PLAYER_JOIN, discListener, Priority.Normal, this); pm.registerEvent(Event.Type.BLOCK_BREAK, blockListener, Priority.Normal, this); pm.registerEvent(Event.Type.BLOCK_PLACE, blockListener, Priority.Normal, this); - pm.registerEvent(Event.Type.ENTITY_DEATH, deathListener, Priority.Lowest, this); + pm.registerEvent(Event.Type.ENTITY_DEATH, deathListener, Priority.Lowest, this); // Lowest because of Tombstone pm.registerEvent(Event.Type.ENTITY_EXPLODE, monsterListener, Priority.Normal, this); pm.registerEvent(Event.Type.ENTITY_COMBUST, monsterListener, Priority.Normal, this); pm.registerEvent(Event.Type.ENTITY_TARGET, monsterListener, Priority.Normal, this); diff --git a/src/com/garbagemule/MobArena/MobArenaHandler.java b/src/com/garbagemule/MobArena/MobArenaHandler.java index 9cd0701..e204808 100644 --- a/src/com/garbagemule/MobArena/MobArenaHandler.java +++ b/src/com/garbagemule/MobArena/MobArenaHandler.java @@ -28,4 +28,7 @@ public class MobArenaHandler // Get the current wave number. public int getWave() { return ArenaManager.wave; } + + // Check if a location is in the arena region + public boolean inRegion(Location l) { return MAUtils.inRegion(l); } }