mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 06:28:54 +00:00
progress
This commit is contained in:
1 parent
a47ff4e7b2
commit
29bdcc8061
48 files changed
+303
-307
No files matched your search
@@ -80,9 +80,9 @@ public class CarbonPlaceholders extends PlaceholderExpansion {
|
||||
|
||||
ChatUser user = carbonChat.getUserService().wrap(player);
|
||||
|
||||
return String.valueOf(user.getChannelSettings(channel).isIgnored());
|
||||
return String.valueOf(user.getChannelSettings(channel).ignored());
|
||||
} else if (key.startsWith("selected_channel")) {
|
||||
ChatChannel channel = carbonChat.getUserService().wrap(player).getSelectedChannel();
|
||||
ChatChannel channel = carbonChat.getUserService().wrap(player).selectedChannel();
|
||||
|
||||
return channel == null ? carbonChat.getChannelManager().getDefaultChannel().getName() : channel.getName();
|
||||
}
|
||||
|
||||
@@ -105,8 +105,8 @@ public final class CarbonUtils {
|
||||
input = "white";
|
||||
}
|
||||
|
||||
if (user != null && user.isOnline()) {
|
||||
input = PlaceholderAPI.setPlaceholders(user.asPlayer(), input);
|
||||
if (user != null && user.online()) {
|
||||
input = PlaceholderAPI.setPlaceholders(user.player(), input);
|
||||
}
|
||||
|
||||
for (NamedTextColor namedColor : NamedTextColor.values()) {
|
||||
|
||||
@@ -6,10 +6,14 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
public class CommandUtils {
|
||||
|
||||
public static void handleDuplicateCommands(@NonNull CommandSettings settings) {
|
||||
CommandAPI.unregister(settings.getName());
|
||||
private CommandUtils() {
|
||||
|
||||
for (String command : settings.getAliases()) {
|
||||
}
|
||||
|
||||
public static void handleDuplicateCommands(@NonNull final CommandSettings settings) {
|
||||
CommandAPI.unregister(settings.name());
|
||||
|
||||
for (final String command : settings.aliases()) {
|
||||
CommandAPI.unregister(command);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,11 +9,15 @@ public final class FunctionalityConstants {
|
||||
|
||||
public static final boolean HAS_HOVER_EVENT_METHOD = noThrow(() -> ItemFactory.class.getMethod("hoverContentOf", ItemStack.class));
|
||||
|
||||
private static boolean noThrow(@NonNull ThrowingRunnable runnable) {
|
||||
private FunctionalityConstants() {
|
||||
|
||||
}
|
||||
|
||||
private static boolean noThrow(@NonNull final ThrowingRunnable runnable) {
|
||||
try {
|
||||
runnable.run();
|
||||
return true;
|
||||
} catch (Exception ex) {
|
||||
} catch (final Exception ex) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user