Minestom/src/main/java/net/minestom/server/command/CommandSender.java

24 lines
465 B
Java
Raw Normal View History

2020-06-21 14:01:03 +02:00
package net.minestom.server.command;
import net.minestom.server.entity.Player;
2020-06-21 14:01:03 +02:00
public interface CommandSender {
void sendMessage(String message);
default void sendMessage(String[] messages) {
for (String message : messages) {
sendMessage(message);
}
}
default boolean isPlayer() {
return this instanceof Player;
}
default boolean isConsole() {
return this instanceof ConsoleSender;
}
2020-06-21 14:01:03 +02:00
}