Fixed #33 and minor bugs
This commit is contained in:
parent
76655a2c91
commit
6889f8ed87
3 changed files with 8 additions and 4 deletions
|
@ -25,6 +25,9 @@ commands:
|
||||||
chatonly:
|
chatonly:
|
||||||
description: Enable chat only mode. Useful for chat clients.
|
description: Enable chat only mode. Useful for chat clients.
|
||||||
usage: "&cUsage: /chatonly&r"
|
usage: "&cUsage: /chatonly&r"
|
||||||
|
shrug:
|
||||||
|
description: Shrug.
|
||||||
|
usage: "&cUsage: /shrug [message]&r"
|
||||||
author: NorbiPeti
|
author: NorbiPeti
|
||||||
depend: [Essentials, Towny, Minigames, Votifier, WorldGuard, WorldEdit, ProtocolLib, FastLogin, Vault, AuthMe]
|
depend: [Essentials, Towny, Minigames, Votifier, WorldGuard, WorldEdit, ProtocolLib, FastLogin, Vault, AuthMe]
|
||||||
permissions:
|
permissions:
|
||||||
|
|
|
@ -3,6 +3,7 @@ package io.github.norbipeti.thebuttonmcchat.commands;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import io.github.norbipeti.thebuttonmcchat.PluginMain;
|
import io.github.norbipeti.thebuttonmcchat.PluginMain;
|
||||||
|
import io.github.norbipeti.thebuttonmcchat.commands.appendtext.ShrugCommand;
|
||||||
import io.github.norbipeti.thebuttonmcchat.commands.appendtext.TableflipCommand;
|
import io.github.norbipeti.thebuttonmcchat.commands.appendtext.TableflipCommand;
|
||||||
import io.github.norbipeti.thebuttonmcchat.commands.appendtext.UnflipCommand;
|
import io.github.norbipeti.thebuttonmcchat.commands.appendtext.UnflipCommand;
|
||||||
import io.github.norbipeti.thebuttonmcchat.commands.ucmds.UCommand;
|
import io.github.norbipeti.thebuttonmcchat.commands.ucmds.UCommand;
|
||||||
|
@ -29,6 +30,8 @@ public abstract class TBMCCommandBase implements CommandExecutor {
|
||||||
plugin.getCommand(cmd.GetCommandName()).setExecutor(cmd);
|
plugin.getCommand(cmd.GetCommandName()).setExecutor(cmd);
|
||||||
cmd = new ChatonlyCommand();
|
cmd = new ChatonlyCommand();
|
||||||
plugin.getCommand(cmd.GetCommandName()).setExecutor(cmd);
|
plugin.getCommand(cmd.GetCommandName()).setExecutor(cmd);
|
||||||
|
cmd = new ShrugCommand();
|
||||||
|
plugin.getCommand(cmd.GetCommandName()).setExecutor(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static HashMap<String, TBMCCommandBase> commands = new HashMap<String, TBMCCommandBase>();
|
private static HashMap<String, TBMCCommandBase> commands = new HashMap<String, TBMCCommandBase>();
|
||||||
|
|
|
@ -14,10 +14,8 @@ public abstract class AppendTextCommandBase extends TBMCCommandBase {
|
||||||
@Override
|
@Override
|
||||||
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
||||||
String msg = GetAppendedText();
|
String msg = GetAppendedText();
|
||||||
if (args.length > 0) {
|
for (int i = args.length - 1; i >= 0; i--)
|
||||||
msg = args[0] + " " + msg;
|
msg = args[i] + " " + msg;
|
||||||
} else
|
|
||||||
msg = " " + msg;
|
|
||||||
ChatProcessing.ProcessChat(sender, msg);
|
ChatProcessing.ProcessChat(sender, msg);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue