From b312f2358e98d9fd693ea18c9a984717d253a426 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Fri, 24 Jun 2016 01:38:17 +0200 Subject: [PATCH] Fixed things --- .../norbipeti/thebuttonmcchat/ChatProcessing.java | 2 +- .../thebuttonmcchat/commands/ucmds/UCommand.java | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/io/github/norbipeti/thebuttonmcchat/ChatProcessing.java b/src/io/github/norbipeti/thebuttonmcchat/ChatProcessing.java index 2d51939..fc94a06 100644 --- a/src/io/github/norbipeti/thebuttonmcchat/ChatProcessing.java +++ b/src/io/github/norbipeti/thebuttonmcchat/ChatProcessing.java @@ -54,8 +54,8 @@ public class ChatProcessing { if (msg.contains(PlayerListener.LaughStrings[i])) { UnlolCommand.Lastlol = sender; UnlolCommand.Lastlolornot = false; + break; } - break; } } Channel currentchannel = (mp == null ? PlayerListener.ConsoleChannel diff --git a/src/io/github/norbipeti/thebuttonmcchat/commands/ucmds/UCommand.java b/src/io/github/norbipeti/thebuttonmcchat/commands/ucmds/UCommand.java index e2f638b..2377cbe 100644 --- a/src/io/github/norbipeti/thebuttonmcchat/commands/ucmds/UCommand.java +++ b/src/io/github/norbipeti/thebuttonmcchat/commands/ucmds/UCommand.java @@ -1,5 +1,7 @@ package io.github.norbipeti.thebuttonmcchat.commands.ucmds; +import io.github.norbipeti.thebuttonmcchat.commands.TBMCCommandBase; + import org.bukkit.command.CommandSender; public final class UCommand extends UCommandBase { @@ -12,12 +14,16 @@ public final class UCommand extends UCommandBase { @Override public boolean OnUCommand(CommandSender sender, String alias, String[] args) { - return false; //TODO: Forward call to the correct handler + if (args.length == 0) + return false; // TODO: Forward call to the correct handler + if (!TBMCCommandBase.GetCommands().containsKey(args[0])) + return false; + TBMCCommandBase cmd = TBMCCommandBase.GetCommands().get(args[0]); //Subcommand } @Override public String GetUCommandName() { - return "u"; //TODO: Same as at AdminCommand + return "u"; // TODO: Same as at AdminCommand } @Override