/
CommandSender.java
48 lines (42 loc) · 1.05 KB
/
CommandSender.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package net.ME1312.Galaxi.Command;
import net.ME1312.Galaxi.Galaxi;
import net.ME1312.Galaxi.Library.ExtraDataHandler;
import net.ME1312.Galaxi.Log.TextElement;
/**
* Command Sender Layout Class
*/
public interface CommandSender extends ExtraDataHandler<String> {
/**
* Get Sender Name
*
* @return Sender Name
*/
String getName();
/**
* Send the Sender a message
*
* @param messages Messages to send
*/
void sendMessage(String... messages);
/**
* Send the Sender a message
*
* @param messages Messages to send
*/
void sendMessage(TextElement... messages);
/**
* Test if the Sender has a permission
*
* @param permission Permission to test
* @return Sender's Permission Status
*/
boolean hasPermission(String permission);
/**
* Send a command as the Sender
*
* @param command Command to send
*/
default void command(String command) {
Galaxi.getInstance().getCommandProcessor().runCommand(this, command);
}
}