mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-29 01:37:20 +01:00
Updated commands to use CommandSender instead of Player
This commit is contained in:
parent
0ba870434e
commit
4301a76b31
2 changed files with 8 additions and 7 deletions
|
@ -1,9 +1,6 @@
|
|||
package org.bukkit.craftbukkit;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandMap;
|
||||
import org.bukkit.command.SimpleCommandMap;
|
||||
import org.bukkit.command.PluginCommandYamlParser;
|
||||
import org.bukkit.command.*;
|
||||
import org.bukkit.entity.Player;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
|
@ -153,8 +150,8 @@ public final class CraftServer implements Server {
|
|||
return server;
|
||||
}
|
||||
|
||||
public boolean dispatchCommand(Player player, String commandLine) {
|
||||
return commandMap.dispatch(player, commandLine);
|
||||
public boolean dispatchCommand(CommandSender sender, String commandLine) {
|
||||
return commandMap.dispatch(sender, commandLine);
|
||||
}
|
||||
|
||||
public void reload() {
|
||||
|
|
|
@ -25,6 +25,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||
return server.getHandle().g(getName());
|
||||
}
|
||||
|
||||
public boolean isPlayer() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isOnline() {
|
||||
for (Object obj: server.getHandle().b) {
|
||||
EntityPlayerMP player = (EntityPlayerMP) obj;
|
||||
|
|
Loading…
Add table
Reference in a new issue