mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-24 03:25:24 +01:00
Fixed commands for the Bukkit commands change.
This commit is contained in:
parent
5cf38cc885
commit
428fc7e5f6
@ -26,6 +26,7 @@
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
@ -417,7 +418,14 @@ public void postReload() {
|
||||
/**
|
||||
* Handles a command.
|
||||
*/
|
||||
public boolean onCommand(Player player, Command cmd, String commandLabel, String[] args) {
|
||||
public boolean onCommand(CommandSender sender, Command cmd,
|
||||
String commandLabel, String[] args) {
|
||||
if (!sender.isPlayer()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Player player = (Player)sender;
|
||||
|
||||
try {
|
||||
return handleCommand(player, cmd.getName(), args);
|
||||
} catch (InsufficientArgumentsException e) {
|
||||
|
Loading…
Reference in New Issue
Block a user