From fd1d556fa30091c342804d804dccbaa4366f06c3 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Thu, 20 Jun 2024 20:13:03 +0200 Subject: [PATCH] Jup --- src/de/steamwar/bungeecore/discord/util/AuthManager.java | 2 +- src/de/steamwar/bungeecore/listeners/ChatListener.java | 2 +- src/de/steamwar/bungeecore/mods/ModUtils.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/de/steamwar/bungeecore/discord/util/AuthManager.java b/src/de/steamwar/bungeecore/discord/util/AuthManager.java index d1ec156..e97dd3e 100644 --- a/src/de/steamwar/bungeecore/discord/util/AuthManager.java +++ b/src/de/steamwar/bungeecore/discord/util/AuthManager.java @@ -50,7 +50,7 @@ public class AuthManager { String code = Base64.getEncoder().encodeToString(randBytes); TOKENS.put(code, user); - VelocityCore.getLogger().log(Level.INFO, "Created Discord Auth-Token: {0} for: {1}", new Object[] {code, user.getAsTag()}); + VelocityCore.getLogger().log(Level.INFO, "Created Discord Auth-Token: {0} for: {1}".formatted(code, user.getAsTag())); VelocityCore.schedule(() -> TOKENS.remove(code)).delay(10, TimeUnit.MINUTES).schedule(); return code; } diff --git a/src/de/steamwar/bungeecore/listeners/ChatListener.java b/src/de/steamwar/bungeecore/listeners/ChatListener.java index e918e89..c6b5183 100644 --- a/src/de/steamwar/bungeecore/listeners/ChatListener.java +++ b/src/de/steamwar/bungeecore/listeners/ChatListener.java @@ -58,7 +58,7 @@ public class ChatListener extends BasicListener { if (message.contains("jndi:ldap")) { SteamwarUser user = SteamwarUser.get(player.getUniqueId()); PunishmentCommand.ban(user, Punishment.PERMA_TIME, "Versuchte Exploit-Ausnutzung", SteamwarUser.get(-1), true); - VelocityCore.getLogger().log(Level.SEVERE, "{0} {1} wurde automatisch wegen jndi:ldap gebannt.", new Object[]{user.getUserName(), user.getId()}); + VelocityCore.getLogger().log(Level.SEVERE, "{0} {1} wurde automatisch wegen jndi:ldap gebannt.".formatted(user.getUserName(), user.getId())); return; } diff --git a/src/de/steamwar/bungeecore/mods/ModUtils.java b/src/de/steamwar/bungeecore/mods/ModUtils.java index bded582..f031cd8 100644 --- a/src/de/steamwar/bungeecore/mods/ModUtils.java +++ b/src/de/steamwar/bungeecore/mods/ModUtils.java @@ -54,7 +54,7 @@ public class ModUtils { Chatter sender = Chatter.of(uuid); SteamwarUser user = sender.user(); playerModMap.put(uuid,new ArrayList<>(mods)); - VelocityCore.getLogger().log(Level.INFO, "{0} declares mods: {1}", new Object[]{user.getUserName(), mods.stream().map(mod -> mod.getPlatform() + ":" + mod.getModName()).collect(Collectors.joining(" "))}); + VelocityCore.getLogger().log(Level.INFO, "{0} declares mods: {1}".formatted(user.getUserName(), mods.stream().map(mod -> mod.getPlatform() + ":" + mod.getModName()).collect(Collectors.joining(" ")))); ModType max = ModType.YELLOW; Iterator it = mods.iterator(); @@ -83,7 +83,7 @@ public class ModUtils { if(max == ModType.RED) { PunishmentCommand.ban(user, Timestamp.from(Instant.now().plus(7, ChronoUnit.DAYS)), message, SteamwarUser.get(-1), false); - VelocityCore.getLogger().log(Level.SEVERE, "{0} {1} wurde automatisch wegen der Mods {2} gebannt.", new Object[]{user.getUserName(), user.getId(), modList}); + VelocityCore.getLogger().log(Level.SEVERE, "{0} {1} wurde automatisch wegen der Mods {2} gebannt.".formatted(user.getUserName(), user.getId(), modList)); } disconnect.accept(LegacyComponentSerializer.legacySection().deserialize(message));