-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathConsoleUser.java
More file actions
93 lines (72 loc) · 1.95 KB
/
ConsoleUser.java
File metadata and controls
93 lines (72 loc) · 1.95 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
package at.helpch.chatchat.user;
import at.helpch.chatchat.ChatChatPlugin;
import at.helpch.chatchat.api.channel.Channel;
import at.helpch.chatchat.api.format.Format;
import at.helpch.chatchat.api.user.User;
import at.helpch.chatchat.channel.ChatChannel;
import at.helpch.chatchat.format.ChatFormat;
import net.kyori.adventure.audience.Audience;
import net.kyori.adventure.identity.Identity;
import org.bukkit.Bukkit;
import org.jetbrains.annotations.NotNull;
import java.util.Set;
import java.util.UUID;
public final class ConsoleUser implements User {
public static final ConsoleUser INSTANCE = new ConsoleUser();
private ConsoleUser() {
}
@Override
public @NotNull Channel channel() {
return ChatChannel.defaultChannel();
}
@Override
public void channel(@NotNull final Channel channel) {
}
@Override
public @NotNull Format format() {
return ChatFormat.defaultFormat();
}
@Override
public void format(@NotNull final Format format) {
}
@Override
public @NotNull UUID uuid() {
return Identity.nil().uuid();
}
@Override
public boolean hasPermission(@NotNull final String node) {
return true;
}
@Override
public boolean canSee(@NotNull final User target) {
return true;
}
@Override
public @NotNull Set<UUID> ignoredUsers() {
return Set.of();
}
@Override
public void ignoredUsers(@NotNull final Set<UUID> users) {
}
@Override
public void ignoreUser(@NotNull final User user) {
}
@Override
public void unignoreUser(@NotNull final User user) {
}
@Override
public boolean chatEnabled() {
return true;
}
@Override
public void chatState(final boolean enabled) {
}
@Override
public @NotNull Audience audience() {
return Bukkit.getConsoleSender();
}
@Override
public @NotNull Identity identity() {
return Identity.nil();
}
}