Add config option to control chat suggestions on fabric

This commit is contained in:
Draycia committed 2022-07-09 20:10:01 -07:00
1 parent e00adf644f
commit 12c2c3c7a1
5 files changed
+74 -11

No files matched your search

@@ -386,11 +386,11 @@ public class CarbonChannelRegistry implements ChannelRegistry, DefaultedRegistry
builder = builder.permission(channel.permission());
// Add to LuckPerms permission suggestions... lol
this.carbonChat.server().console().get(PermissionChecker.POINTER).ifPresent(checker -> {
checker.test(channel.permission());
checker.test(channel.permission() + ".see");
checker.test(channel.permission() + ".speak");
});
//this.carbonChat.server().console().get(PermissionChecker.POINTER).ifPresent(checker -> {
// checker.test(channel.permission());
// checker.test(channel.permission() + ".see");
// checker.test(channel.permission() + ".speak");
//});
}
final Key channelKey = channel.key();
@@ -19,10 +19,12 @@
*/
package net.draycia.carbon.common.config;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import net.kyori.adventure.key.Key;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.checkerframework.framework.qual.DefaultQualifier;
import org.spongepowered.configurate.objectmapping.ConfigSerializable;
import org.spongepowered.configurate.objectmapping.meta.Comment;
@@ -58,6 +60,9 @@ public class PrimaryConfig {
""")
private Map<String, String> customPlaceholders = Map.of();
@Comment("The suggestions shown when using the TAB key in chat.")
private List<String> customChatSuggestions = List.of();
@Comment("Various settings related to pinging players in channels.")
private PingSettings pingSettings = new PingSettings();
@@ -87,6 +92,10 @@ public class PrimaryConfig {
return this.customPlaceholders;
}
public @Nullable List<String> customChatSuggestions() {
return this.customChatSuggestions;
}
public PingSettings pings() {
return this.pingSettings;
}