From 26be2979724b05a5ff7921f88d16f810f5d10261 Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Sat, 5 Nov 2016 09:50:03 -0400 Subject: [PATCH] Super duper minor change --- .../creativeboundaries/PlotChangeListener.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/alisolarflare/creativeboundaries/PlotChangeListener.java b/src/alisolarflare/creativeboundaries/PlotChangeListener.java index 7ce331a..5692cca 100644 --- a/src/alisolarflare/creativeboundaries/PlotChangeListener.java +++ b/src/alisolarflare/creativeboundaries/PlotChangeListener.java @@ -25,6 +25,7 @@ public class PlotChangeListener implements Listener{ @EventHandler public void onPlayerPlotChange(PlayerChangePlotEvent plotEvent){ Player player = plotEvent.getPlayer(); + player.sendMessage("PING"); if (dickmode == false){ debug(player, "dickies"); return; @@ -37,18 +38,21 @@ public class PlotChangeListener implements Listener{ debug(player, "racism"); return; } - + player.sendMessage("PONG"); Resident currentResident = new Resident(player.getName()); Town town; try { + player.sendMessage("PYONG"); debug(player, "1"+plotEvent.toString()); debug(player, "2"+plotEvent.getTo().toString()); debug(player, "3"+plotEvent.getTo().getTownBlock().toString()); debug(player, "4"+Boolean.toString(plotEvent.getTo().getTownBlock().hasTown())); debug(player, "5"+plotEvent.getTo().getTownBlock().getTown().toString()); - if (plotEvent.getTo().getTownBlock().hasTown()) + player.sendMessage("-"); + if (plotEvent.getTo().getTownBlock().hasTown()){ + player.sendMessage("YANG"); town = plotEvent.getTo().getTownBlock().getTown(); - else{ + }else{ player.setGameMode(GameMode.SURVIVAL); return; } @@ -62,7 +66,7 @@ public class PlotChangeListener implements Listener{ player.setGameMode(GameMode.SURVIVAL); } private void debug(Player player, String string){ - if (player.getName() == "alisolarflare") + if (player.getName().equalsIgnoreCase("alisolarflare")) player.sendMessage(string); } }