mirror of
https://github.com/System-End/Discord-MC-Chat.git
synced 2026-04-19 16:28:23 +00:00
Fix warnings
This commit is contained in:
parent
7bc6b00af0
commit
e9f915e3f8
6 changed files with 7 additions and 7 deletions
|
|
@ -154,7 +154,7 @@ public final class ClientHandler extends SimpleChannelInboundHandler<Packet> {
|
|||
|
||||
try {
|
||||
CommandManager.executeAndWait(captureSender, p.command, p.args)
|
||||
.whenComplete((v, ex) -> {
|
||||
.whenComplete((_, ex) -> {
|
||||
ExecuteResponsePacket response;
|
||||
if (ex != null) {
|
||||
response = new ExecuteResponsePacket(p.requestId, I18nManager.getDmccTranslation("commands.execution_failed", ex.getMessage()));
|
||||
|
|
@ -196,7 +196,7 @@ public final class ClientHandler extends SimpleChannelInboundHandler<Packet> {
|
|||
// Use the completion future with a timeout to send the response reliably
|
||||
completionFuture
|
||||
.orTimeout(CONSOLE_COMMAND_TIMEOUT_SECONDS, TimeUnit.SECONDS)
|
||||
.whenComplete((v, ex) -> ctx.writeAndFlush(new ConsoleResponsePacket(p.requestId, responseBuilder.toString())));
|
||||
.whenComplete((_, _) -> ctx.writeAndFlush(new ConsoleResponsePacket(p.requestId, responseBuilder.toString())));
|
||||
}
|
||||
case ExecuteAutoCompleteRequestPacket p -> {
|
||||
// Handle DMCC command auto-complete with OP level filtering
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ public final class NetworkManager {
|
|||
* @param packet The packet to send
|
||||
*/
|
||||
public static void broadcastToClients(Packet packet) {
|
||||
clientChannels.forEach((channel, name) -> channel.writeAndFlush(packet));
|
||||
clientChannels.forEach((channel, _) -> channel.writeAndFlush(packet));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ public final class LinkedAccountManager {
|
|||
return false;
|
||||
}
|
||||
|
||||
LINKED_ACCOUNTS.computeIfAbsent(discordId, k -> new ArrayList<>())
|
||||
LINKED_ACCOUNTS.computeIfAbsent(discordId, _ -> new ArrayList<>())
|
||||
.add(new LinkEntry(minecraftUuid, System.currentTimeMillis(), isOfflineUuid(minecraftUuid) ? minecraftName : null));
|
||||
UUID_TO_DISCORD.put(minecraftUuid, discordId);
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public final class StandaloneDMCC {
|
|||
*
|
||||
* @param args Command line arguments
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
static void main(String[] args) {
|
||||
for (String arg : args) {
|
||||
if ("--disable-ascii".equalsIgnoreCase(arg)) {
|
||||
LoggerImpl.setConsoleAnsiEnabled(false);
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public final class EventManager {
|
|||
* @param <T> The type of the event
|
||||
*/
|
||||
public static <T> void register(Class<T> eventClass, Consumer<T> handler) {
|
||||
handlers.computeIfAbsent(eventClass, k -> new CopyOnWriteArrayList<>()).add(handler);
|
||||
handlers.computeIfAbsent(eventClass, _ -> new CopyOnWriteArrayList<>()).add(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public final class MinecraftCommands {
|
|||
var stats = literal("stats")
|
||||
.requires(source -> source.hasPermission(ConfigManager.getInt("command_permission_levels.stats", -1)))
|
||||
.then(argument("type", ResourceLocationArgument.id())
|
||||
.suggests((ctx, builder) -> SharedSuggestionProvider.suggestResource(
|
||||
.suggests((_, builder) -> SharedSuggestionProvider.suggestResource(
|
||||
BuiltInRegistries.STAT_TYPE.keySet(), builder))
|
||||
.then(argument("stat", ResourceLocationArgument.id())
|
||||
.suggests((ctx, builder) -> {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue