mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-03 23:07:40 +01:00
[Bleeding] Update Tell and Help aliases to use alias system.
By: t00thpick1 <t00thpick1dirko@gmail.com>
This commit is contained in:
parent
0d884197d5
commit
2244f53bdd
@ -1,6 +1,7 @@
|
||||
package org.bukkit.command.defaults;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -28,6 +29,7 @@ public class HelpCommand extends VanillaCommand {
|
||||
super("help");
|
||||
this.description = "Shows the help menu";
|
||||
this.usageMessage = "/help <pageNumber>\n/help <topic>\n/help <topic> <pageNumber>";
|
||||
this.setAliases(Arrays.asList(new String[] { "?" }));
|
||||
this.setPermission("bukkit.command.help");
|
||||
}
|
||||
|
||||
@ -109,11 +111,6 @@ public class HelpCommand extends VanillaCommand {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean matches(String input) {
|
||||
return input.equalsIgnoreCase("help") || input.equalsIgnoreCase("?");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) {
|
||||
Validate.notNull(sender, "Sender cannot be null");
|
||||
|
@ -1,9 +1,10 @@
|
||||
package org.bukkit.command.defaults;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class TellCommand extends VanillaCommand {
|
||||
@ -11,6 +12,7 @@ public class TellCommand extends VanillaCommand {
|
||||
super("tell");
|
||||
this.description = "Sends a private message to the given player";
|
||||
this.usageMessage = "/tell <player> <message>";
|
||||
this.setAliases(Arrays.asList(new String[] { "w", "msg" }));
|
||||
this.setPermission("bukkit.command.tell");
|
||||
}
|
||||
|
||||
@ -43,9 +45,4 @@ public class TellCommand extends VanillaCommand {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean matches(String input) {
|
||||
return input.equalsIgnoreCase("tell") || input.equalsIgnoreCase("w") || input.equalsIgnoreCase("msg");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user