diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/command/CommandSender.java | 2 | ||||
-rw-r--r-- | src/main/java/org/bukkit/command/ConsoleCommandSender.java | 19 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/command/CommandSender.java b/src/main/java/org/bukkit/command/CommandSender.java index 64a4e988..713e325f 100644 --- a/src/main/java/org/bukkit/command/CommandSender.java +++ b/src/main/java/org/bukkit/command/CommandSender.java @@ -20,6 +20,8 @@ public interface CommandSender { * Checks if this sender is a player * * @return true if they are + * @deprecated Use instanceof */ + @Deprecated public boolean isPlayer(); }
\ No newline at end of file diff --git a/src/main/java/org/bukkit/command/ConsoleCommandSender.java b/src/main/java/org/bukkit/command/ConsoleCommandSender.java new file mode 100644 index 00000000..b8f805ce --- /dev/null +++ b/src/main/java/org/bukkit/command/ConsoleCommandSender.java @@ -0,0 +1,19 @@ + +package org.bukkit.command; + +/** + * Represents CLI input from a console + */ +public class ConsoleCommandSender implements CommandSender { + public void sendMessage(String message) { + System.out.println(message); + } + + public boolean isOp() { + return true; + } + + public boolean isPlayer() { + return false; + } +} |