Human pass over channels

This commit is contained in:
Mariell Hoversholm committed 2020-09-09 22:16:55 +02:00
1 parent 8de275cc6b
commit a9f068cc94
12 files changed
+200 -122

No files matched your search

@@ -56,7 +56,7 @@ public class CarbonPlaceholders extends PlaceholderExpansion {
ChatUser user = carbonChat.getUserService().wrap(player);
return channel.canPlayerUse(user) ? "true" : "false";
return String.valueOf(channel.canPlayerUse(user));
} else if (key.startsWith("can_see_")) {
String value = key.replace("can_see_", "");
@@ -68,7 +68,7 @@ public class CarbonPlaceholders extends PlaceholderExpansion {
ChatUser user = carbonChat.getUserService().wrap(player);
return channel.canPlayerSee(user, true) ? "true" : "false";
return String.valueOf(channel.canPlayerSee(user, true));
} else if (key.startsWith("ignoring_channel_")) {
String value = key.replace("ignoring_channel_", "");
@@ -80,7 +80,7 @@ public class CarbonPlaceholders extends PlaceholderExpansion {
ChatUser user = carbonChat.getUserService().wrap(player);
return user.getChannelSettings(channel).isIgnored() ? "true" : "false";
return String.valueOf(user.getChannelSettings(channel).isIgnored());
} else if (key.startsWith("selected_channel")) {
ChatChannel channel = carbonChat.getUserService().wrap(player).getSelectedChannel();
@@ -30,7 +30,7 @@ public interface Registry<T> {
* @param key The key for the entry
* @return The entry associated with the key
*/
@Nullable @Nullable
@Nullable
T get(@NonNull String key);
/**