Added some stuff
This commit is contained in:
parent
cd490e5769
commit
9a8baf5653
3 changed files with 16 additions and 1 deletions
|
@ -227,7 +227,9 @@ public class ChatProcessing {
|
|||
.equals("\nAlpha_Bacca44")
|
||||
? "\nDeaths: "
|
||||
+ PlayerListener.AlphaDeaths
|
||||
: "")))))));
|
||||
: ""))))
|
||||
.addExtra(new TellrawPart(
|
||||
"For more, do /u info " + sender.getName())))));
|
||||
json.addExtra(new TellrawPart("> "));
|
||||
long combinetime = System.nanoTime();
|
||||
ChatFormatter.Combine(formatters, formattedmessage, json);
|
||||
|
|
|
@ -32,6 +32,10 @@ public class CommandCaller implements CommandExecutor {
|
|||
new Exception("Null command found at " + entry.getKey() + "!"));
|
||||
continue;
|
||||
}
|
||||
if (c.GetCommandPath() == null) {
|
||||
TBMCCoreAPI.SendException("An error occured while registering commands",
|
||||
new Exception("Command " + entry.getKey() + " has no command path!"));
|
||||
}
|
||||
if (!c.GetCommandPath().contains(" ")) // Top-level command
|
||||
{
|
||||
PluginCommand pc = ((JavaPlugin) c.getPlugin()).getCommand(c.GetCommandPath());
|
||||
|
|
|
@ -25,7 +25,16 @@ public class InfoCommand extends UCommandBase {
|
|||
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
||||
if (args.length == 0)
|
||||
return false;
|
||||
if (args[0].equalsIgnoreCase("console") || args[0].equalsIgnoreCase("server")
|
||||
|| args[0].equalsIgnoreCase("@console")) {
|
||||
sender.sendMessage("The server console."); // TODO: Console login? The Discord thing might replace it
|
||||
return true;
|
||||
}
|
||||
try (TBMCPlayer p = TBMCPlayer.getFromName(args[0])) {
|
||||
if (p == null) {
|
||||
sender.sendMessage("§cThe specified player cannot be found");
|
||||
return true;
|
||||
}
|
||||
sender.sendMessage(p.getInfo(InfoTarget.MCCommand));
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue