Fixed KittyCannon

This commit is contained in:
Norbi Peti 2015-11-28 01:09:01 +01:00
parent 77bc93d674
commit 682af5c0a0
6 changed files with 14 additions and 6 deletions

Binary file not shown.

View file

@ -46,18 +46,21 @@ public class Commands implements CommandExecutor {
.getUniqueId()); // 2015.08.08. .getUniqueId()); // 2015.08.08.
if (!p.CommentedOnReddit if (!p.CommentedOnReddit
&& !args[0].toLowerCase().equals("admin") && !args[0].toLowerCase().equals("admin")
&& !args[0].toLowerCase().equals("ignore")) { && !args[0].toLowerCase().equals("ignore")
&& !args[0].toLowerCase().equals("kittycannon")) {
player.sendMessage("§cError: You need to write your username to the reddit thread at /r/TheButtonMinecraft§r"); player.sendMessage("§cError: You need to write your username to the reddit thread at /r/TheButtonMinecraft§r");
return true; return true;
} }
if (!p.FlairRecognised if (!p.FlairRecognised
&& !args[0].toLowerCase().equals("admin") && !args[0].toLowerCase().equals("admin")
&& !args[0].toLowerCase().equals("ignore")) { && !args[0].toLowerCase().equals("ignore")
&& !args[0].toLowerCase().equals("kittycannon")) {
player.sendMessage("Sorry, but your flair isn't recorded. Please ask a mod to set it for you."); player.sendMessage("Sorry, but your flair isn't recorded. Please ask a mod to set it for you.");
return true; return true;
} }
if (!p.FlairDecided && !args[0].toLowerCase().equals("admin") if (!p.FlairDecided && !args[0].toLowerCase().equals("admin")
&& !args[0].toLowerCase().equals("ignore")) { && !args[0].toLowerCase().equals("ignore")
&& !args[0].toLowerCase().equals("kittycannon")) {
player.sendMessage("Please select between /u nonpresser and /u cantpress"); player.sendMessage("Please select between /u nonpresser and /u cantpress");
return true; return true;
} }

View file

@ -334,9 +334,14 @@ public class PlayerListener implements Listener { // 2015.07.16.
MinigamePlayer mp = Minigames.plugin.pdata.getMinigamePlayer(e MinigamePlayer mp = Minigames.plugin.pdata.getMinigamePlayer(e
.getPlayer()); .getPlayer());
// System.out.println("B"); // System.out.println("B");
if (!e.getPlayer().isOp()
&& (!mp.isInMinigame() || mp.getMinigame().getName(false) /*
.equalsIgnoreCase(Commands.KittyCannonMinigame))) * if (!e.getPlayer().isOp() && (!mp.isInMinigame() ||
* mp.getMinigame().getName(false)
* .equalsIgnoreCase(Commands.KittyCannonMinigame))) return;
*/
if (!(mp.isInMinigame() && mp.getMinigame().getName(false)
.equalsIgnoreCase(Commands.KittyCannonMinigame)))
return; return;
// System.out.println("C"); // System.out.println("C");
ItemStack item = e.getItem().getItemStack(); ItemStack item = e.getItem().getItemStack();