diff --git a/TheButtonAutoFlair.jar b/TheButtonAutoFlair.jar index 3b44d61..4d1b2d6 100644 Binary files a/TheButtonAutoFlair.jar and b/TheButtonAutoFlair.jar differ diff --git a/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/CreativeGlobalMechanic.java b/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/CreativeGlobalMechanic.java index 4fe577b..6acd52d 100644 --- a/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/CreativeGlobalMechanic.java +++ b/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/CreativeGlobalMechanic.java @@ -66,7 +66,7 @@ public class CreativeGlobalMechanic extends GameMechanicBase { private void minigameStart(StartMinigameEvent event) { if (event.getMinigame().getMechanicName().equals(getMechanic())) { final List players = event.getPlayers(); - //final Minigame minigame = event.getMinigame(); + // final Minigame minigame = event.getMinigame(); for (MinigamePlayer player : players) { player.setCanFly(true); player.setAllowTeleport(true); diff --git a/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PlayerListener.java b/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PlayerListener.java index 3b23ef8..de4dd36 100644 --- a/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PlayerListener.java +++ b/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PlayerListener.java @@ -80,7 +80,9 @@ public class PlayerListener implements Listener { // 2015.07.16. @Override public void run() { if (mp.FlairState.equals(FlairStates.NoComment)) { - String json = String.format("[\"\",{\"text\":\"If you'd like your /r/TheButton flair displayed ingame, write your Minecraft name to \",\"color\":\"aqua\"},{\"text\":\"[this thread].\",\"color\":\"aqua\",\"clickEvent\":{\"action\":\"open_url\",\"value\":\"%s\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":{\"text\":\"\",\"extra\":[{\"text\":\"Click here to go to the Reddit thread\",\"color\":\"aqua\"}]}}}]", PluginMain.FlairThreadURL); + String json = String + .format("[\"\",{\"text\":\"If you'd like your /r/TheButton flair displayed ingame, write your Minecraft name to \",\"color\":\"aqua\"},{\"text\":\"[this thread].\",\"color\":\"aqua\",\"clickEvent\":{\"action\":\"open_url\",\"value\":\"%s\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":{\"text\":\"\",\"extra\":[{\"text\":\"Click here to go to the Reddit thread\",\"color\":\"aqua\"}]}}}]", + PluginMain.FlairThreadURL); PluginMain.Instance.getServer().dispatchCommand( PluginMain.Console, "tellraw " + mp.PlayerName + " " + json); @@ -708,6 +710,14 @@ public class PlayerListener implements Listener { // 2015.07.16. } catch (NotRegisteredException e) { return; } + } else if (cmd.equalsIgnoreCase("home") || cmd.equalsIgnoreCase("tpa") || cmd.equalsIgnoreCase("tp")) { + MinigamePlayer mgp = Minigames.plugin.pdata.getMinigamePlayer(event + .getPlayer()); + if (mgp.isInMinigame() + && mgp.getMinigame().getMechanic().getMechanic() + .equals("creativeglobal")) { + mgp.setAllowTeleport(true); + } } } diff --git a/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PlayerListener$2.class b/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PlayerListener$2.class index 6b4610c..560e1d1 100644 Binary files a/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PlayerListener$2.class and b/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PlayerListener$2.class differ diff --git a/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PlayerListener$3.class b/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PlayerListener$3.class index cc00a90..cd7d4a0 100644 Binary files a/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PlayerListener$3.class and b/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PlayerListener$3.class differ diff --git a/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PlayerListener.class b/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PlayerListener.class index b64b817..6e19274 100644 Binary files a/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PlayerListener.class and b/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PlayerListener.class differ