Applied changes
This commit is contained in:
parent
44984d8987
commit
57f15694ad
5 changed files with 6 additions and 99 deletions
|
@ -75,7 +75,7 @@ public class CommandCaller implements CommandExecutor {
|
||||||
}
|
}
|
||||||
if (cmd == null) {
|
if (cmd == null) {
|
||||||
if (hadspace) {
|
if (hadspace) {
|
||||||
sender.sendMessage(TBMCChatAPI.GetSubCommands(path));
|
sender.sendMessage(TBMCChatAPI.GetSubCommands(path, sender));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
String[] errormsg = new String[] { //
|
String[] errormsg = new String[] { //
|
||||||
|
|
|
@ -3,7 +3,9 @@ package buttondevteam.chat.commands.ucmds;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import buttondevteam.chat.PluginMain;
|
||||||
import buttondevteam.lib.chat.TBMCChatAPI;
|
import buttondevteam.lib.chat.TBMCChatAPI;
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
|
|
||||||
|
@ -34,6 +36,8 @@ public final class HelpCommand extends UCommandBase {
|
||||||
text.add("§6---- Command list ----");
|
text.add("§6---- Command list ----");
|
||||||
for (TBMCCommandBase cmd : TBMCChatAPI.GetCommands().values())
|
for (TBMCCommandBase cmd : TBMCChatAPI.GetCommands().values())
|
||||||
if (!cmd.GetCommandPath().contains(" "))
|
if (!cmd.GetCommandPath().contains(" "))
|
||||||
|
if (!cmd.GetModOnly() || PluginMain.permission.has(sender, "tbmc.admin"))
|
||||||
|
if (!cmd.GetPlayerOnly() || sender instanceof Player)
|
||||||
text.add("/" + cmd.GetCommandPath());
|
text.add("/" + cmd.GetCommandPath());
|
||||||
sender.sendMessage(text.toArray(new String[text.size()]));
|
sender.sendMessage(text.toArray(new String[text.size()]));
|
||||||
} else if (args[0].equalsIgnoreCase("colors")) {
|
} else if (args[0].equalsIgnoreCase("colors")) {
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
package buttondevteam.chat.commands.ucmds;
|
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
|
|
||||||
import buttondevteam.lib.chat.TBMCChatAPI;
|
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
|
||||||
|
|
||||||
public final class UCommand extends TBMCCommandBase {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String[] GetHelpText(String alias) {
|
|
||||||
return TBMCChatAPI.GetSubCommands(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String GetCommandPath() {
|
|
||||||
return "u";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean GetPlayerOnly() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean GetModOnly() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,34 +0,0 @@
|
||||||
package buttondevteam.chat.commands.ucmds.admin;
|
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
|
|
||||||
import buttondevteam.chat.commands.ucmds.UCommandBase;
|
|
||||||
import buttondevteam.lib.chat.TBMCChatAPI;
|
|
||||||
|
|
||||||
public final class AdminCommand extends UCommandBase {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String[] GetHelpText(String alias) {
|
|
||||||
return TBMCChatAPI.GetSubCommands(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String GetUCommandPath() {
|
|
||||||
return "admin";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean GetPlayerOnly() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean GetModOnly() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,29 +0,0 @@
|
||||||
package buttondevteam.chat.commands.ucmds.announce;
|
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
|
|
||||||
import buttondevteam.chat.commands.ucmds.UCommandBase;
|
|
||||||
import buttondevteam.lib.chat.TBMCChatAPI;
|
|
||||||
|
|
||||||
public class AnnounceCommand extends UCommandBase {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String[] GetHelpText(String alias) {
|
|
||||||
return TBMCChatAPI.GetSubCommands(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String GetUCommandPath() {
|
|
||||||
return "announce";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean GetPlayerOnly() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue