diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlayerFunctions.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlayerFunctions.java index 2dbded55f..124e949b2 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlayerFunctions.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlayerFunctions.java @@ -274,12 +274,6 @@ public class PlayerFunctions { * Caption to send */ public static void sendMessage(final Player plr, final C c, final String... args) { - - if (plr == null) { - PlotMain.sendConsoleSenderMessage(c); - return; - } - if (c.s().length() < 1) { return; } @@ -289,6 +283,10 @@ public class PlayerFunctions { msg = msg.replaceFirst("%s", str); } } + if (plr == null) { + PlotMain.sendConsoleSenderMessage(c); + return; + } sendMessage(plr, msg); } } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/StringComparsion.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/StringComparsion.java index e5aefa907..729eaa28f 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/StringComparsion.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/StringComparsion.java @@ -11,7 +11,7 @@ import java.util.Collections; public class StringComparsion { private String bestMatch; - private double match; + private double match = 0; public StringComparsion(final String input, final Object[] objects) { double c = 0;