v0.87.1 - Fixed delspawn, added /ma reset coords
This commit is contained in:
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
name: MobArena
|
||||
main: com.garbagemule.MobArena.MobArena
|
||||
version: 0.87
|
||||
version: 0.87.1
|
||||
commands:
|
||||
mobarena:
|
||||
description: Base command for MobArena
|
||||
|
||||
@@ -146,10 +146,11 @@ public class MACommands implements CommandExecutor
|
||||
if (MAUtils.getCoords("spawnpoints." + arg) == null)
|
||||
{
|
||||
ArenaManager.tellPlayer(p, "Couldn't find spawnpoint \"" + arg + "\".");
|
||||
ArenaManager.tellPlayer(p, "Spawnpoints: " + MAUtils.spawnList());
|
||||
return true;
|
||||
}
|
||||
|
||||
MAUtils.delCoords("spawnpoints." + arg);
|
||||
MAUtils.delCoords("coords.spawnpoints." + arg);
|
||||
|
||||
ArenaManager.tellPlayer(p, "Spawn point with name \"" + arg + "\" removed.");
|
||||
MAUtils.notifyIfSetup(p);
|
||||
@@ -197,6 +198,17 @@ public class MACommands implements CommandExecutor
|
||||
return true;
|
||||
}
|
||||
|
||||
// ma reset coords
|
||||
if (cmd.equals("reset"))
|
||||
{
|
||||
if (!arg.equals("coords"))
|
||||
return false;
|
||||
|
||||
MAUtils.delCoords("coords");
|
||||
ArenaManager.tellPlayer(p, "All arena coords have been reset.");
|
||||
return true;
|
||||
}
|
||||
|
||||
// ma protect true/false
|
||||
if (cmd.equals("protect"))
|
||||
{
|
||||
|
||||
@@ -473,6 +473,21 @@ public class MAUtils
|
||||
fixCoords();
|
||||
}
|
||||
|
||||
public static String spawnList()
|
||||
{
|
||||
Configuration c = ArenaManager.config;
|
||||
c.load();
|
||||
|
||||
String result = "";
|
||||
if (c.getKeys("coords.spawnpoints") == null)
|
||||
return result;
|
||||
|
||||
for (String s : c.getKeys("coords.spawnpoints"))
|
||||
result += s + " ";
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ///////////////////////////////////////////////////////////////////// //
|
||||
|
||||
@@ -21,7 +21,7 @@ public class MobArena extends JavaPlugin
|
||||
* or Mean Admins. */
|
||||
public final String[] COMMANDS = {"join", "j", "leave", "l", "list", "who", "spectate", "spec",
|
||||
"setwarp", "addspawn", "delspawn", "setregion", "expandregion",
|
||||
"protect", "undo", "dooooo"};
|
||||
"protect", "undo", "dooooo", "reset"};
|
||||
|
||||
public MobArena()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user