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")
|
.equals("\nAlpha_Bacca44")
|
||||||
? "\nDeaths: "
|
? "\nDeaths: "
|
||||||
+ PlayerListener.AlphaDeaths
|
+ PlayerListener.AlphaDeaths
|
||||||
: "")))))));
|
: ""))))
|
||||||
|
.addExtra(new TellrawPart(
|
||||||
|
"For more, do /u info " + sender.getName())))));
|
||||||
json.addExtra(new TellrawPart("> "));
|
json.addExtra(new TellrawPart("> "));
|
||||||
long combinetime = System.nanoTime();
|
long combinetime = System.nanoTime();
|
||||||
ChatFormatter.Combine(formatters, formattedmessage, json);
|
ChatFormatter.Combine(formatters, formattedmessage, json);
|
||||||
|
|
|
@ -32,6 +32,10 @@ public class CommandCaller implements CommandExecutor {
|
||||||
new Exception("Null command found at " + entry.getKey() + "!"));
|
new Exception("Null command found at " + entry.getKey() + "!"));
|
||||||
continue;
|
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
|
if (!c.GetCommandPath().contains(" ")) // Top-level command
|
||||||
{
|
{
|
||||||
PluginCommand pc = ((JavaPlugin) c.getPlugin()).getCommand(c.GetCommandPath());
|
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) {
|
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
||||||
if (args.length == 0)
|
if (args.length == 0)
|
||||||
return false;
|
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])) {
|
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));
|
sender.sendMessage(p.getInfo(InfoTarget.MCCommand));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue