mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-23 11:06:14 +01:00
removeleaderboard command fixes, new Msg enum, plugin.yml
This commit is contained in:
parent
708ed2821d
commit
d856f32103
@ -1,7 +1,7 @@
|
||||
name: MobArena
|
||||
author: garbagemule
|
||||
main: com.garbagemule.MobArena.MobArena
|
||||
version: 0.94.4.65
|
||||
version: 0.94.4.66
|
||||
softdepend: [Spout,MultiVerse,XcraftGate,Towny,Heroes,MagicSpells,Vault]
|
||||
commands:
|
||||
ma:
|
||||
|
@ -7,6 +7,7 @@ public enum Msg
|
||||
ARENA_START("Let the slaughter begin!", "Arena started!", Material.REDSTONE_TORCH_ON),
|
||||
ARENA_END("Arena finished.", "Arena finished.", Material.REDSTONE_TORCH_OFF),
|
||||
ARENA_DOES_NOT_EXIST("That arena does not exist. Type /ma arenas for a list.", "Can't find arena."),
|
||||
ARENA_LBOARD_NOT_FOUND("That arena does not have a leaderboard set up."),
|
||||
JOIN_NOT_ENABLED("MobArena is not enabled.", "MobArena disabled.", Material.REDSTONE_TORCH_OFF),
|
||||
JOIN_IN_OTHER_ARENA("You are already in an arena! Leave that one first.", "In another arena."),
|
||||
JOIN_ARENA_NOT_ENABLED("This arena is not enabled.", "Arena disabled.", Material.REDSTONE_TORCH_OFF),
|
||||
|
@ -3,6 +3,7 @@ package com.garbagemule.MobArena.commands.setup;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.garbagemule.MobArena.Messenger;
|
||||
import com.garbagemule.MobArena.Msg;
|
||||
import com.garbagemule.MobArena.commands.Command;
|
||||
import com.garbagemule.MobArena.commands.CommandInfo;
|
||||
import com.garbagemule.MobArena.framework.ArenaMaster;
|
||||
@ -23,17 +24,25 @@ public class RemoveLeaderboardCommand implements Command{
|
||||
|
||||
// If no argument, use the currently selected arena
|
||||
if (arg1.equals("")) {
|
||||
if(am.getSelectedArena().getRegion().getLeaderboard() != null) {
|
||||
if (am.getSelectedArena().getRegion().getLeaderboard() != null) {
|
||||
am.getSelectedArena().getRegion().set("leaderboard", null);
|
||||
Messenger.tellPlayer(sender, "Leaderboard for " + am.getSelectedArena().arenaName() + " successfully removed!");
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
Messenger.tellPlayer(sender, Msg.ARENA_LBOARD_NOT_FOUND);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(am.getArenaWithName(arg1) != null) {
|
||||
am.getArenaWithName(arg1).getRegion().set("leaderboard", null);
|
||||
Messenger.tellPlayer(sender, "Leaderboard for " + am.getSelectedArena().arenaName() + " successfully removed!");
|
||||
return true;
|
||||
if (am.getArenaWithName(arg1) != null) {
|
||||
if (am.getSelectedArena().getRegion().getLeaderboard() != null) {
|
||||
am.getArenaWithName(arg1).getRegion().set("leaderboard", null);
|
||||
Messenger.tellPlayer(sender, "Leaderboard for " + am.getArenaWithName(arg1).arenaName() + " successfully removed!");
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
Messenger.tellPlayer(sender, Msg.ARENA_LBOARD_NOT_FOUND);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Messenger.tellPlayer(sender, "Usage: /ma removeleaderboard <arenaname>");
|
||||
|
Loading…
Reference in New Issue
Block a user