From 8396b277b7e651cd0d7982b288ba136eb3466042 Mon Sep 17 00:00:00 2001 From: Jordan Giacone Date: Tue, 21 Jan 2014 21:41:51 -0600 Subject: [PATCH] Fixed bug where running the /vrchat command would also try to switch your current channel to the one you're in --- src/base/plugin/ChatHandler.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/base/plugin/ChatHandler.java b/src/base/plugin/ChatHandler.java index 1106f87..853404c 100644 --- a/src/base/plugin/ChatHandler.java +++ b/src/base/plugin/ChatHandler.java @@ -47,7 +47,7 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String { Player player = (Player) sender; String name = player.getDisplayName(); - Channel c = players.get(player.getName()); + Channel c; switch (command) { @@ -58,11 +58,13 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String { player.sendMessage(ChatColor.DARK_GRAY + "[VRChat] " + ChatColor.WHITE + "Version " + getDescription().getVersion()); } - }else + } + else { player.sendMessage(ChatColor.RED + "Not a valid VRChat command! Type '/help vrchat' for commands."); } - break; + + return false; case "ooc": c = Channel.OOC; break;