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
|
name: MobArena
|
||||||
main: com.garbagemule.MobArena.MobArena
|
main: com.garbagemule.MobArena.MobArena
|
||||||
version: 0.87
|
version: 0.87.1
|
||||||
commands:
|
commands:
|
||||||
mobarena:
|
mobarena:
|
||||||
description: Base command for MobArena
|
description: Base command for MobArena
|
||||||
|
|||||||
@@ -146,10 +146,11 @@ public class MACommands implements CommandExecutor
|
|||||||
if (MAUtils.getCoords("spawnpoints." + arg) == null)
|
if (MAUtils.getCoords("spawnpoints." + arg) == null)
|
||||||
{
|
{
|
||||||
ArenaManager.tellPlayer(p, "Couldn't find spawnpoint \"" + arg + "\".");
|
ArenaManager.tellPlayer(p, "Couldn't find spawnpoint \"" + arg + "\".");
|
||||||
|
ArenaManager.tellPlayer(p, "Spawnpoints: " + MAUtils.spawnList());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
MAUtils.delCoords("spawnpoints." + arg);
|
MAUtils.delCoords("coords.spawnpoints." + arg);
|
||||||
|
|
||||||
ArenaManager.tellPlayer(p, "Spawn point with name \"" + arg + "\" removed.");
|
ArenaManager.tellPlayer(p, "Spawn point with name \"" + arg + "\" removed.");
|
||||||
MAUtils.notifyIfSetup(p);
|
MAUtils.notifyIfSetup(p);
|
||||||
@@ -197,6 +198,17 @@ public class MACommands implements CommandExecutor
|
|||||||
return true;
|
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
|
// ma protect true/false
|
||||||
if (cmd.equals("protect"))
|
if (cmd.equals("protect"))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -377,7 +377,7 @@ public class MAUtils
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes coordinate information from the config-file.
|
* Removes coordinate information from the config-file.
|
||||||
*/
|
*/
|
||||||
public static void delCoords(String name)
|
public static void delCoords(String name)
|
||||||
{
|
{
|
||||||
Configuration c = ArenaManager.config;
|
Configuration c = ArenaManager.config;
|
||||||
@@ -473,6 +473,21 @@ public class MAUtils
|
|||||||
fixCoords();
|
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. */
|
* or Mean Admins. */
|
||||||
public final String[] COMMANDS = {"join", "j", "leave", "l", "list", "who", "spectate", "spec",
|
public final String[] COMMANDS = {"join", "j", "leave", "l", "list", "who", "spectate", "spec",
|
||||||
"setwarp", "addspawn", "delspawn", "setregion", "expandregion",
|
"setwarp", "addspawn", "delspawn", "setregion", "expandregion",
|
||||||
"protect", "undo", "dooooo"};
|
"protect", "undo", "dooooo", "reset"};
|
||||||
|
|
||||||
public MobArena()
|
public MobArena()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user