From f1c98135a2eb9833ee30c70d032568ea2775f89e Mon Sep 17 00:00:00 2001
From: ChomeNS <95471003+ChomeNS@users.noreply.github.com>
Date: Sun, 6 Oct 2024 20:46:51 +0700
Subject: [PATCH] 1.21 + a LOT of fixies and a bit of optimization. WorldPlugin
is still broken with some debug lines
---
.idea/jarRepositories.xml | 5 ++
README.md | 2 +-
build.gradle | 12 ++-
.../java/me/chayapak1/chomens_bot/Bot.java | 25 +++---
.../chatParsers/CreayunChatParser.java | 4 +-
.../chatParsers/KaboomChatParser.java | 4 +-
.../chatParsers/MinecraftChatParser.java | 7 +-
.../chatParsers/U203aChatParser.java | 7 +-
.../command/DiscordCommandContext.java | 4 +-
.../command/IRCCommandContext.java | 4 +-
.../chomens_bot/commands/MailCommand.java | 2 +-
.../chomens_bot/commands/MusicCommand.java | 6 +-
.../chomens_bot/commands/UrbanCommand.java | 2 +-
.../chayapak1/chomens_bot/data/BossBar.java | 4 +-
.../chomens_bot/data/BotBossBar.java | 4 +-
.../chomens_bot/data/PlayerEntry.java | 6 +-
.../me/chayapak1/chomens_bot/data/Team.java | 6 +-
.../plugins/BossbarManagerPlugin.java | 12 +--
.../chomens_bot/plugins/ChatPlugin.java | 39 ++++-----
.../plugins/CommandHandlerPlugin.java | 2 -
.../chomens_bot/plugins/CorePlugin.java | 80 ++++++++++++-------
.../chomens_bot/plugins/DiscordPlugin.java | 12 +--
.../plugins/FormatCheckerPlugin.java | 10 ++-
.../chomens_bot/plugins/IRCPlugin.java | 4 +-
.../chomens_bot/plugins/LoggerPlugin.java | 4 +-
.../plugins/MusicPlayerPlugin.java | 8 +-
.../plugins/PacketSnifferPlugin.java | 4 +-
.../chomens_bot/plugins/PlayersPlugin.java | 16 ++--
.../chomens_bot/plugins/PositionPlugin.java | 20 ++---
.../chomens_bot/plugins/SelfCarePlugin.java | 28 +++----
.../plugins/ServerPluginsManagerPlugin.java | 4 +-
.../chomens_bot/plugins/TPSPlugin.java | 14 ++--
.../plugins/TabCompletePlugin.java | 8 +-
.../chomens_bot/plugins/TeamPlugin.java | 6 +-
.../chomens_bot/plugins/VoiceChatPlugin.java | 29 +++----
.../chomens_bot/plugins/WorldPlugin.java | 50 ++++++------
.../chomens_bot/song/MidiConverter.java | 2 +-
.../chomens_bot/util/ComponentUtilities.java | 8 +-
.../chomens_bot/util/UUIDUtilities.java | 12 ++-
.../chomens_bot/voiceChat/NetworkMessage.java | 2 +-
src/main/resources/default-config.yml | 2 +-
41 files changed, 256 insertions(+), 224 deletions(-)
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
index 5976bcd..78b7d7a 100644
--- a/.idea/jarRepositories.xml
+++ b/.idea/jarRepositories.xml
@@ -51,5 +51,10 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/README.md b/README.md
index 7efd4a7..715b3ec 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@ You will see that the exploits plugin is missing because I gitignored it to prev
To make this successfully compile just make `ExploitsPlugin.java` in the plugins folder and add this code:
```java
-package land.chipmunk.chayapak.chomens_bot.plugins;
+package me.chayapak1.chomens_bot.plugins;
import me.chayapak1.chomens_bot.Bot;
diff --git a/build.gradle b/build.gradle
index 65b7049..cdfc0ba 100644
--- a/build.gradle
+++ b/build.gradle
@@ -19,6 +19,10 @@ repositories {
mavenCentral()
+ maven {
+ url = uri('https://repo.opencollab.dev/main/')
+ }
+
maven {
url = uri('https://repo.opencollab.dev/maven-snapshots/')
}
@@ -37,8 +41,8 @@ repositories {
}
dependencies {
- implementation 'com.github.steveice10:mcprotocollib:1.20.2-1-SNAPSHOT'
- implementation 'net.kyori:adventure-text-serializer-ansi:4.14.0'
+ implementation 'org.geysermc.mcprotocollib:protocol:1.21-SNAPSHOT'
+ implementation 'net.kyori:adventure-text-serializer-ansi:4.15.0'
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'com.google.guava:guava:31.1-jre'
implementation 'org.jline:jline:3.23.0'
@@ -47,7 +51,7 @@ dependencies {
implementation 'org.luaj:luaj-jse:3.0.1'
implementation 'net.dv8tion:JDA:5.0.0-beta.12'
implementation 'joda-time:joda-time:2.12.4'
- implementation 'net.kyori:adventure-text-serializer-legacy:4.13.1'
+ implementation 'net.kyori:adventure-text-serializer-legacy:4.15.0'
implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.20.0'
implementation 'io.socket:socket.io-client:2.1.0'
implementation 'de.maxhenkel.opus4j:opus4j:2.0.2'
@@ -56,7 +60,7 @@ dependencies {
jar {
manifest {
- attributes 'Main-Class': 'land.chipmunk.chayapak.chomens_bot.Main'
+ attributes 'Main-Class': 'me.chayapak1.chomens_bot.Main'
}
}
diff --git a/src/main/java/me/chayapak1/chomens_bot/Bot.java b/src/main/java/me/chayapak1/chomens_bot/Bot.java
index 22b765e..6dbe3b3 100644
--- a/src/main/java/me/chayapak1/chomens_bot/Bot.java
+++ b/src/main/java/me/chayapak1/chomens_bot/Bot.java
@@ -1,21 +1,20 @@
package me.chayapak1.chomens_bot;
-import com.github.steveice10.mc.auth.data.GameProfile;
-import com.github.steveice10.mc.protocol.MinecraftProtocol;
-import com.github.steveice10.mc.protocol.data.game.entity.player.HandPreference;
-import com.github.steveice10.mc.protocol.data.game.setting.ChatVisibility;
-import com.github.steveice10.mc.protocol.data.game.setting.SkinPart;
-import com.github.steveice10.mc.protocol.packet.common.serverbound.ServerboundClientInformationPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundLoginPacket;
-import com.github.steveice10.mc.protocol.packet.login.clientbound.ClientboundGameProfilePacket;
-import com.github.steveice10.packetlib.Session;
-import com.github.steveice10.packetlib.event.session.*;
-import com.github.steveice10.packetlib.packet.Packet;
-import com.github.steveice10.packetlib.tcp.TcpClientSession;
-import land.chipmunk.chayapak.chomens_bot.plugins.*;
import me.chayapak1.chomens_bot.plugins.*;
import me.chayapak1.chomens_bot.util.ComponentUtilities;
import me.chayapak1.chomens_bot.util.RandomStringUtilities;
+import org.geysermc.mcprotocollib.auth.GameProfile;
+import org.geysermc.mcprotocollib.network.Session;
+import org.geysermc.mcprotocollib.network.event.session.*;
+import org.geysermc.mcprotocollib.network.packet.Packet;
+import org.geysermc.mcprotocollib.network.tcp.TcpClientSession;
+import org.geysermc.mcprotocollib.protocol.MinecraftProtocol;
+import org.geysermc.mcprotocollib.protocol.data.game.entity.player.HandPreference;
+import org.geysermc.mcprotocollib.protocol.data.game.setting.ChatVisibility;
+import org.geysermc.mcprotocollib.protocol.data.game.setting.SkinPart;
+import org.geysermc.mcprotocollib.protocol.packet.common.serverbound.ServerboundClientInformationPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundLoginPacket;
+import org.geysermc.mcprotocollib.protocol.packet.login.clientbound.ClientboundGameProfilePacket;
import java.util.ArrayList;
import java.util.List;
diff --git a/src/main/java/me/chayapak1/chomens_bot/chatParsers/CreayunChatParser.java b/src/main/java/me/chayapak1/chomens_bot/chatParsers/CreayunChatParser.java
index e905ee8..1b5921b 100644
--- a/src/main/java/me/chayapak1/chomens_bot/chatParsers/CreayunChatParser.java
+++ b/src/main/java/me/chayapak1/chomens_bot/chatParsers/CreayunChatParser.java
@@ -1,7 +1,7 @@
package me.chayapak1.chomens_bot.chatParsers;
-import com.github.steveice10.mc.auth.data.GameProfile;
-import com.github.steveice10.mc.protocol.data.game.entity.player.GameMode;
+import org.geysermc.mcprotocollib.auth.GameProfile;
+import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode;
import me.chayapak1.chomens_bot.Bot;
import me.chayapak1.chomens_bot.data.chat.ChatParser;
import me.chayapak1.chomens_bot.data.PlayerEntry;
diff --git a/src/main/java/me/chayapak1/chomens_bot/chatParsers/KaboomChatParser.java b/src/main/java/me/chayapak1/chomens_bot/chatParsers/KaboomChatParser.java
index 84d0e22..20753b7 100644
--- a/src/main/java/me/chayapak1/chomens_bot/chatParsers/KaboomChatParser.java
+++ b/src/main/java/me/chayapak1/chomens_bot/chatParsers/KaboomChatParser.java
@@ -1,7 +1,7 @@
package me.chayapak1.chomens_bot.chatParsers;
-import com.github.steveice10.mc.auth.data.GameProfile;
-import com.github.steveice10.mc.protocol.data.game.entity.player.GameMode;
+import org.geysermc.mcprotocollib.auth.GameProfile;
+import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode;
import me.chayapak1.chomens_bot.Bot;
import me.chayapak1.chomens_bot.data.chat.ChatParser;
import me.chayapak1.chomens_bot.data.PlayerEntry;
diff --git a/src/main/java/me/chayapak1/chomens_bot/chatParsers/MinecraftChatParser.java b/src/main/java/me/chayapak1/chomens_bot/chatParsers/MinecraftChatParser.java
index 9e704e2..d2ccfc9 100644
--- a/src/main/java/me/chayapak1/chomens_bot/chatParsers/MinecraftChatParser.java
+++ b/src/main/java/me/chayapak1/chomens_bot/chatParsers/MinecraftChatParser.java
@@ -7,6 +7,7 @@ import me.chayapak1.chomens_bot.data.chat.PlayerMessage;
import me.chayapak1.chomens_bot.util.ComponentUtilities;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.TranslatableComponent;
+import net.kyori.adventure.text.TranslationArgument;
import net.kyori.adventure.text.event.HoverEvent;
import java.util.*;
@@ -34,12 +35,12 @@ public class MinecraftChatParser implements ChatParser {
}
public PlayerMessage parse (TranslatableComponent message) {
- final List args = message.args();
+ final List args = message.arguments();
final String key = message.key();
if (args.size() < 2 || !keys.contains(key)) return null;
- final Component senderComponent = args.get(0);
- final Component contents = args.get(1);
+ final Component senderComponent = args.get(0).asComponent();
+ final Component contents = args.get(1).asComponent();
PlayerEntry sender;
diff --git a/src/main/java/me/chayapak1/chomens_bot/chatParsers/U203aChatParser.java b/src/main/java/me/chayapak1/chomens_bot/chatParsers/U203aChatParser.java
index f9c62e4..12de0d6 100644
--- a/src/main/java/me/chayapak1/chomens_bot/chatParsers/U203aChatParser.java
+++ b/src/main/java/me/chayapak1/chomens_bot/chatParsers/U203aChatParser.java
@@ -7,6 +7,7 @@ import me.chayapak1.chomens_bot.data.chat.PlayerMessage;
import me.chayapak1.chomens_bot.util.ComponentUtilities;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.TranslatableComponent;
+import net.kyori.adventure.text.TranslationArgument;
import net.kyori.adventure.text.event.HoverEvent;
import java.util.List;
@@ -28,11 +29,11 @@ public class U203aChatParser implements ChatParser {
// very similar to MinecraftChatParser
public PlayerMessage parse (TranslatableComponent message) {
- final List args = message.args();
+ final List args = message.arguments();
if (args.size() < 3 || (!message.key().equals("[%s] %s › %s") && !message.key().equals("%s %s › %s"))) return null;
- final Component senderComponent = args.get(1);
- final Component contents = args.get(2);
+ final Component senderComponent = args.get(1).asComponent();
+ final Component contents = args.get(2).asComponent();
PlayerEntry sender;
final HoverEvent> hoverEvent = senderComponent.hoverEvent();
diff --git a/src/main/java/me/chayapak1/chomens_bot/command/DiscordCommandContext.java b/src/main/java/me/chayapak1/chomens_bot/command/DiscordCommandContext.java
index 58efa0c..8bc03bd 100644
--- a/src/main/java/me/chayapak1/chomens_bot/command/DiscordCommandContext.java
+++ b/src/main/java/me/chayapak1/chomens_bot/command/DiscordCommandContext.java
@@ -1,7 +1,7 @@
package me.chayapak1.chomens_bot.command;
-import com.github.steveice10.mc.auth.data.GameProfile;
-import com.github.steveice10.mc.protocol.data.game.entity.player.GameMode;
+import org.geysermc.mcprotocollib.auth.GameProfile;
+import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode;
import me.chayapak1.chomens_bot.data.PlayerEntry;
import me.chayapak1.chomens_bot.util.CodeBlockUtilities;
import me.chayapak1.chomens_bot.Bot;
diff --git a/src/main/java/me/chayapak1/chomens_bot/command/IRCCommandContext.java b/src/main/java/me/chayapak1/chomens_bot/command/IRCCommandContext.java
index d0a48ce..1230aea 100644
--- a/src/main/java/me/chayapak1/chomens_bot/command/IRCCommandContext.java
+++ b/src/main/java/me/chayapak1/chomens_bot/command/IRCCommandContext.java
@@ -1,7 +1,7 @@
package me.chayapak1.chomens_bot.command;
-import com.github.steveice10.mc.auth.data.GameProfile;
-import com.github.steveice10.mc.protocol.data.game.entity.player.GameMode;
+import org.geysermc.mcprotocollib.auth.GameProfile;
+import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode;
import me.chayapak1.chomens_bot.Bot;
import me.chayapak1.chomens_bot.data.PlayerEntry;
import me.chayapak1.chomens_bot.util.ComponentUtilities;
diff --git a/src/main/java/me/chayapak1/chomens_bot/commands/MailCommand.java b/src/main/java/me/chayapak1/chomens_bot/commands/MailCommand.java
index ff35fdc..a1ec6bf 100644
--- a/src/main/java/me/chayapak1/chomens_bot/commands/MailCommand.java
+++ b/src/main/java/me/chayapak1/chomens_bot/commands/MailCommand.java
@@ -118,7 +118,7 @@ public class MailCommand extends Command {
return output;
}
- final String value = ComponentUtilities.stringify(((TranslatableComponent) children.get(0)).args().get(1));
+ final String value = ComponentUtilities.stringify(((TranslatableComponent) children.get(0)).arguments().get(1).asComponent());
if (!value.startsWith("\"") && !value.endsWith("\"") && !value.startsWith("'") && !value.endsWith("'")) {
context.sendOutput(Component.text("`message` NBT is not a string").color(NamedTextColor.RED));
diff --git a/src/main/java/me/chayapak1/chomens_bot/commands/MusicCommand.java b/src/main/java/me/chayapak1/chomens_bot/commands/MusicCommand.java
index 9a00304..984c9f1 100644
--- a/src/main/java/me/chayapak1/chomens_bot/commands/MusicCommand.java
+++ b/src/main/java/me/chayapak1/chomens_bot/commands/MusicCommand.java
@@ -11,7 +11,7 @@ import me.chayapak1.chomens_bot.song.Instrument;
import me.chayapak1.chomens_bot.song.Loop;
import me.chayapak1.chomens_bot.song.Note;
import me.chayapak1.chomens_bot.song.Song;
-import land.chipmunk.chayapak.chomens_bot.util.*;
+import me.chayapak1.chomens_bot.util.*;
import me.chayapak1.chomens_bot.util.*;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.JoinConfiguration;
@@ -225,7 +225,7 @@ public class MusicCommand extends Command {
return output;
}
- final String value = ComponentUtilities.stringify(((TranslatableComponent) children.get(0)).args().get(1));
+ final String value = ComponentUtilities.stringify(((TranslatableComponent) children.get(0)).arguments().get(1).asComponent());
if (!value.startsWith("\"") && !value.endsWith("\"") && !value.startsWith("'") && !value.endsWith("'")) {
context.sendOutput(Component.text("`data` NBT is not a string").color(NamedTextColor.RED));
@@ -282,7 +282,7 @@ public class MusicCommand extends Command {
return output;
}
- final String value = ComponentUtilities.stringify(((TranslatableComponent) children.get(0)).args().get(1));
+ final String value = ComponentUtilities.stringify(((TranslatableComponent) children.get(0)).arguments().get(1).asComponent());
if (!value.startsWith("\"") && !value.endsWith("\"") && !value.startsWith("'") && !value.endsWith("'")) {
context.sendOutput(Component.text("NBT is not a string").color(NamedTextColor.RED));
diff --git a/src/main/java/me/chayapak1/chomens_bot/commands/UrbanCommand.java b/src/main/java/me/chayapak1/chomens_bot/commands/UrbanCommand.java
index 57f75d9..d511a5d 100644
--- a/src/main/java/me/chayapak1/chomens_bot/commands/UrbanCommand.java
+++ b/src/main/java/me/chayapak1/chomens_bot/commands/UrbanCommand.java
@@ -6,7 +6,7 @@ import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import me.chayapak1.chomens_bot.Bot;
import me.chayapak1.chomens_bot.Main;
-import land.chipmunk.chayapak.chomens_bot.command.*;
+import me.chayapak1.chomens_bot.command.*;
import me.chayapak1.chomens_bot.command.*;
import me.chayapak1.chomens_bot.util.ColorUtilities;
import me.chayapak1.chomens_bot.util.HttpUtilities;
diff --git a/src/main/java/me/chayapak1/chomens_bot/data/BossBar.java b/src/main/java/me/chayapak1/chomens_bot/data/BossBar.java
index 24aab15..8bc16c2 100644
--- a/src/main/java/me/chayapak1/chomens_bot/data/BossBar.java
+++ b/src/main/java/me/chayapak1/chomens_bot/data/BossBar.java
@@ -1,7 +1,7 @@
package me.chayapak1.chomens_bot.data;
-import com.github.steveice10.mc.protocol.data.game.BossBarColor;
-import com.github.steveice10.mc.protocol.data.game.BossBarDivision;
+import org.geysermc.mcprotocollib.protocol.data.game.BossBarColor;
+import org.geysermc.mcprotocollib.protocol.data.game.BossBarDivision;
import net.kyori.adventure.text.Component;
import java.util.UUID;
diff --git a/src/main/java/me/chayapak1/chomens_bot/data/BotBossBar.java b/src/main/java/me/chayapak1/chomens_bot/data/BotBossBar.java
index 71bfc9e..76b77a7 100644
--- a/src/main/java/me/chayapak1/chomens_bot/data/BotBossBar.java
+++ b/src/main/java/me/chayapak1/chomens_bot/data/BotBossBar.java
@@ -1,7 +1,7 @@
package me.chayapak1.chomens_bot.data;
-import com.github.steveice10.mc.protocol.data.game.BossBarColor;
-import com.github.steveice10.mc.protocol.data.game.BossBarDivision;
+import org.geysermc.mcprotocollib.protocol.data.game.BossBarColor;
+import org.geysermc.mcprotocollib.protocol.data.game.BossBarDivision;
import me.chayapak1.chomens_bot.Bot;
import me.chayapak1.chomens_bot.util.ComponentUtilities;
import net.kyori.adventure.text.Component;
diff --git a/src/main/java/me/chayapak1/chomens_bot/data/PlayerEntry.java b/src/main/java/me/chayapak1/chomens_bot/data/PlayerEntry.java
index f45f16a..63f9fc4 100644
--- a/src/main/java/me/chayapak1/chomens_bot/data/PlayerEntry.java
+++ b/src/main/java/me/chayapak1/chomens_bot/data/PlayerEntry.java
@@ -1,8 +1,8 @@
package me.chayapak1.chomens_bot.data;
-import com.github.steveice10.mc.auth.data.GameProfile;
-import com.github.steveice10.mc.protocol.data.game.PlayerListEntry;
-import com.github.steveice10.mc.protocol.data.game.entity.player.GameMode;
+import org.geysermc.mcprotocollib.auth.GameProfile;
+import org.geysermc.mcprotocollib.protocol.data.game.PlayerListEntry;
+import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode;
import net.kyori.adventure.text.Component;
import java.security.PublicKey;
diff --git a/src/main/java/me/chayapak1/chomens_bot/data/Team.java b/src/main/java/me/chayapak1/chomens_bot/data/Team.java
index eb80df5..1f67145 100644
--- a/src/main/java/me/chayapak1/chomens_bot/data/Team.java
+++ b/src/main/java/me/chayapak1/chomens_bot/data/Team.java
@@ -1,8 +1,8 @@
package me.chayapak1.chomens_bot.data;
-import com.github.steveice10.mc.protocol.data.game.scoreboard.CollisionRule;
-import com.github.steveice10.mc.protocol.data.game.scoreboard.NameTagVisibility;
-import com.github.steveice10.mc.protocol.data.game.scoreboard.TeamColor;
+import org.geysermc.mcprotocollib.protocol.data.game.scoreboard.CollisionRule;
+import org.geysermc.mcprotocollib.protocol.data.game.scoreboard.NameTagVisibility;
+import org.geysermc.mcprotocollib.protocol.data.game.scoreboard.TeamColor;
import net.kyori.adventure.text.Component;
public class Team {
diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/BossbarManagerPlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/BossbarManagerPlugin.java
index c3be4ea..239abb0 100644
--- a/src/main/java/me/chayapak1/chomens_bot/plugins/BossbarManagerPlugin.java
+++ b/src/main/java/me/chayapak1/chomens_bot/plugins/BossbarManagerPlugin.java
@@ -1,11 +1,11 @@
package me.chayapak1.chomens_bot.plugins;
-import com.github.steveice10.mc.protocol.data.game.BossBarColor;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundBossEventPacket;
-import com.github.steveice10.packetlib.Session;
-import com.github.steveice10.packetlib.event.session.ConnectedEvent;
-import com.github.steveice10.packetlib.event.session.DisconnectedEvent;
-import com.github.steveice10.packetlib.packet.Packet;
+import org.geysermc.mcprotocollib.network.Session;
+import org.geysermc.mcprotocollib.network.event.session.ConnectedEvent;
+import org.geysermc.mcprotocollib.network.event.session.DisconnectedEvent;
+import org.geysermc.mcprotocollib.network.packet.Packet;
+import org.geysermc.mcprotocollib.protocol.data.game.BossBarColor;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundBossEventPacket;
import me.chayapak1.chomens_bot.Bot;
import me.chayapak1.chomens_bot.data.BossBar;
import me.chayapak1.chomens_bot.data.BotBossBar;
diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/ChatPlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/ChatPlugin.java
index de38743..43fcd6c 100644
--- a/src/main/java/me/chayapak1/chomens_bot/plugins/ChatPlugin.java
+++ b/src/main/java/me/chayapak1/chomens_bot/plugins/ChatPlugin.java
@@ -1,12 +1,12 @@
package me.chayapak1.chomens_bot.plugins;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundDisguisedChatPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundPlayerChatPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundSystemChatPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.serverbound.ServerboundChatCommandPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.serverbound.ServerboundChatPacket;
-import com.github.steveice10.packetlib.Session;
-import com.github.steveice10.packetlib.packet.Packet;
+import org.geysermc.mcprotocollib.network.Session;
+import org.geysermc.mcprotocollib.network.packet.Packet;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundDisguisedChatPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundPlayerChatPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundSystemChatPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.ServerboundChatCommandPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.ServerboundChatPacket;
import me.chayapak1.chomens_bot.Bot;
import me.chayapak1.chomens_bot.chatParsers.CreayunChatParser;
import me.chayapak1.chomens_bot.chatParsers.KaboomChatParser;
@@ -141,7 +141,7 @@ public class ChatPlugin extends Bot.Listener {
final Component unsignedContent = packet.getUnsignedContent();
- final String translation = getTranslationByChatType(packet.getChatType());
+ final String translation = getTranslationByChatType(packet.getChatType().id());
for (Listener listener : listeners) {
final boolean bool = listener.playerMessageReceived(playerMessage);
@@ -152,13 +152,13 @@ public class ChatPlugin extends Bot.Listener {
TranslatableComponent component = Component.translatable(translation);
if (translation.equals("chat.type.team.text") || translation.equals("chat.type.team.sent")) { // ohio
- component = component.args(
- Component.translatable("chat.square_brackets").args(bot.team.teamsByPlayer.get(bot.profile.getName()).displayName),
+ component = component.arguments(
+ Component.translatable("chat.square_brackets").arguments(bot.team.teamsByPlayer.get(bot.profile.getName()).displayName),
playerMessage.displayName,
playerMessage.contents
);
} else {
- component = component.args(playerMessage.displayName, playerMessage.contents);
+ component = component.arguments(playerMessage.displayName, playerMessage.contents);
}
final String string = ComponentUtilities.stringify(component);
@@ -180,7 +180,7 @@ public class ChatPlugin extends Bot.Listener {
public void packetReceived (ClientboundDisguisedChatPacket packet) {
try {
- final String translation = getTranslationByChatType(packet.getChatType());
+ final String translation = getTranslationByChatType(packet.getChatType().id());
final Component component = packet.getMessage();
@@ -198,13 +198,13 @@ public class ChatPlugin extends Bot.Listener {
TranslatableComponent translatableComponent = Component.translatable(translation);
if (translation.equals("chat.type.team.text") || translation.equals("chat.type.team.sent")) { // ohio
- translatableComponent = translatableComponent.args(
- Component.translatable("chat.square_brackets").args(bot.team.teamsByPlayer.get(bot.profile.getName()).displayName),
+ translatableComponent = translatableComponent.arguments(
+ Component.translatable("chat.square_brackets").arguments(bot.team.teamsByPlayer.get(bot.profile.getName()).displayName),
name,
content
);
} else {
- translatableComponent = translatableComponent.args(name, content);
+ translatableComponent = translatableComponent.arguments(name, content);
}
final String string = ComponentUtilities.stringify(translatableComponent);
@@ -282,14 +282,7 @@ public class ChatPlugin extends Bot.Listener {
}
public void sendCommandInstantly (String command) {
- bot.session.send(new ServerboundChatCommandPacket(
- command,
- Instant.now().toEpochMilli(),
- 0L,
- Collections.emptyList(),
- 0,
- new BitSet()
- ));
+ bot.session.send(new ServerboundChatCommandPacket(command));
}
public void sendChatInstantly (String message) {
diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/CommandHandlerPlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/CommandHandlerPlugin.java
index faaa13f..4d54242 100644
--- a/src/main/java/me/chayapak1/chomens_bot/plugins/CommandHandlerPlugin.java
+++ b/src/main/java/me/chayapak1/chomens_bot/plugins/CommandHandlerPlugin.java
@@ -1,8 +1,6 @@
package me.chayapak1.chomens_bot.plugins;
import me.chayapak1.chomens_bot.Bot;
-import land.chipmunk.chayapak.chomens_bot.command.*;
-import land.chipmunk.chayapak.chomens_bot.commands.*;
import me.chayapak1.chomens_bot.command.*;
import me.chayapak1.chomens_bot.commands.*;
import me.chayapak1.chomens_bot.util.ExceptionUtilities;
diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/CorePlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/CorePlugin.java
index ac79f61..0ae54bf 100644
--- a/src/main/java/me/chayapak1/chomens_bot/plugins/CorePlugin.java
+++ b/src/main/java/me/chayapak1/chomens_bot/plugins/CorePlugin.java
@@ -1,24 +1,26 @@
package me.chayapak1.chomens_bot.plugins;
-import com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack;
-import com.github.steveice10.mc.protocol.data.game.entity.object.Direction;
-import com.github.steveice10.mc.protocol.data.game.entity.player.Hand;
-import com.github.steveice10.mc.protocol.data.game.entity.player.PlayerAction;
-import com.github.steveice10.mc.protocol.data.game.level.block.BlockChangeEntry;
-import com.github.steveice10.mc.protocol.data.game.level.block.CommandBlockMode;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.level.ClientboundBlockUpdatePacket;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.level.ClientboundLevelChunkWithLightPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.level.ClientboundSectionBlocksUpdatePacket;
-import com.github.steveice10.mc.protocol.packet.ingame.serverbound.inventory.ServerboundSetCommandBlockPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.serverbound.inventory.ServerboundSetCreativeModeSlotPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundPlayerActionPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundUseItemOnPacket;
-import com.github.steveice10.opennbt.tag.builtin.ByteTag;
-import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
-import com.github.steveice10.opennbt.tag.builtin.StringTag;
-import com.github.steveice10.packetlib.Session;
-import com.github.steveice10.packetlib.event.session.DisconnectedEvent;
-import com.github.steveice10.packetlib.packet.Packet;
+import org.cloudburstmc.nbt.NbtMap;
+import org.cloudburstmc.nbt.NbtMapBuilder;
+import org.geysermc.mcprotocollib.network.Session;
+import org.geysermc.mcprotocollib.network.event.session.DisconnectedEvent;
+import org.geysermc.mcprotocollib.network.packet.Packet;
+import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction;
+import org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand;
+import org.geysermc.mcprotocollib.protocol.data.game.entity.player.PlayerAction;
+import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
+import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponent;
+import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType;
+import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents;
+import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockChangeEntry;
+import org.geysermc.mcprotocollib.protocol.data.game.level.block.CommandBlockMode;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level.ClientboundBlockUpdatePacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level.ClientboundLevelChunkWithLightPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level.ClientboundSectionBlocksUpdatePacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.inventory.ServerboundSetCommandBlockPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.inventory.ServerboundSetCreativeModeSlotPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.player.ServerboundPlayerActionPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.player.ServerboundUseItemOnPacket;
import me.chayapak1.chomens_bot.Bot;
import me.chayapak1.chomens_bot.util.MathUtilities;
import net.kyori.adventure.text.BlockNBTComponent;
@@ -179,7 +181,7 @@ public class CorePlugin extends PositionPlugin.Listener {
}
}
- // thanks chipmunk for this new tellraw method :3
+ // thanks chipmunk for this new tellraw method
public CompletableFuture runTracked (String command) {
if (!bot.options.useCore) return null;
@@ -248,13 +250,29 @@ public class CorePlugin extends PositionPlugin.Listener {
public void runPlaceBlock (String command) {
if (!ready || !bot.options.useCore) return;
- final CompoundTag tag = new CompoundTag("");
- final CompoundTag blockEntityTag = new CompoundTag("BlockEntityTag");
- blockEntityTag.put(new StringTag("Command", command));
- blockEntityTag.put(new ByteTag("auto", (byte) 1));
- blockEntityTag.put(new ByteTag("TrackOutput", (byte) 1));
- blockEntityTag.put(new StringTag("CustomName", bot.config.core.customName));
- tag.put(blockEntityTag);
+// final NbtMapBuilder tagBuilder = NbtMap.builder();
+
+ final NbtMapBuilder blockEntityTagBuilder = NbtMap.builder();
+
+ blockEntityTagBuilder.putString("id", "minecraft:command_block");
+ blockEntityTagBuilder.putString("Command", command);
+ blockEntityTagBuilder.putByte("auto", (byte) 1);
+ blockEntityTagBuilder.putByte("TrackOutput", (byte) 1);
+ blockEntityTagBuilder.putString("CustomName", bot.config.core.customName);
+
+ final NbtMap blockEntityTag = blockEntityTagBuilder.build();
+
+// tagBuilder.putCompound("BlockEntityTag", blockEntityTag);
+
+// final NbtMap tag = tagBuilder.build();
+
+ final Map, DataComponent, ?>> map = new HashMap<>();
+
+ map.put(DataComponentType.BLOCK_ENTITY_DATA, DataComponentType.BLOCK_ENTITY_DATA.getDataComponentFactory().create(DataComponentType.BLOCK_ENTITY_DATA, blockEntityTag));
+
+// map.put(DataComponentType.BLOCK_ENTITY_DATA, DataComponentType.BLOCK_ENTITY_DATA.getDataComponentFactory().create(DataComponentType.BLOCK_ENTITY_DATA, tag));
+
+ final DataComponents dataComponents = new DataComponents(map);
final Vector3i temporaryBlockPosition = Vector3i.from(
bot.position.position.getX(),
@@ -265,13 +283,13 @@ public class CorePlugin extends PositionPlugin.Listener {
final Session session = bot.session;
session.send(
new ServerboundSetCreativeModeSlotPacket(
- 36,
+ (short) 36,
new ItemStack(
bot.serverPluginsManager.hasPlugin(ServerPluginsManagerPlugin.EXTRAS) ?
- 492 /* repeating command block id */ :
- 373 /* command block id */,
+ 514 /* repeating command block id */ :
+ 395 /* command block id */,
64,
- tag
+ dataComponents
)
)
);
diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/DiscordPlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/DiscordPlugin.java
index 32e5163..3a73468 100644
--- a/src/main/java/me/chayapak1/chomens_bot/plugins/DiscordPlugin.java
+++ b/src/main/java/me/chayapak1/chomens_bot/plugins/DiscordPlugin.java
@@ -1,7 +1,5 @@
package me.chayapak1.chomens_bot.plugins;
-import com.github.steveice10.packetlib.event.session.ConnectedEvent;
-import com.github.steveice10.packetlib.event.session.DisconnectedEvent;
import me.chayapak1.chomens_bot.Bot;
import me.chayapak1.chomens_bot.Configuration;
import me.chayapak1.chomens_bot.Main;
@@ -26,6 +24,8 @@ import net.kyori.adventure.text.event.HoverEvent;
import net.kyori.adventure.text.format.NamedTextColor;
import net.kyori.adventure.text.format.TextColor;
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
+import org.geysermc.mcprotocollib.network.event.session.ConnectedEvent;
+import org.geysermc.mcprotocollib.network.event.session.DisconnectedEvent;
import org.jetbrains.annotations.NotNull;
import java.awt.*;
@@ -167,7 +167,7 @@ public class DiscordPlugin {
// ignore my very very ohio code,..,,.
Component attachmentsComponent = Component.empty();
- if (messageEvent.getAttachments().size() > 0) {
+ if (!messageEvent.getAttachments().isEmpty()) {
attachmentsComponent = attachmentsComponent.append(Component.space());
for (Message.Attachment attachment : messageEvent.getAttachments()) {
attachmentsComponent = attachmentsComponent
@@ -182,7 +182,7 @@ public class DiscordPlugin {
}
Component embedsComponent = Component.empty();
- if (messageEvent.getEmbeds().size() > 0) {
+ if (!messageEvent.getEmbeds().isEmpty()) {
if (messageEvent.getAttachments().isEmpty()) embedsComponent = embedsComponent.append(Component.space());
for (MessageEmbed embed : messageEvent.getEmbeds()) {
final Component hoverEvent = Component.translatable(
@@ -216,7 +216,7 @@ public class DiscordPlugin {
final List roles = member == null ? Collections.emptyList() : member.getRoles();
Component rolesComponent = Component.empty();
- if (roles.size() > 0) {
+ if (!roles.isEmpty()) {
rolesComponent = rolesComponent
.append(Component.text("Roles:").color(NamedTextColor.GRAY))
.append(Component.newline());
@@ -356,7 +356,7 @@ public class DiscordPlugin {
public void onDiscordTick(String channelId) {
synchronized (logMessages) {
- if (!logMessages.containsKey(channelId) || logMessages.get(channelId).length() == 0) {
+ if (!logMessages.containsKey(channelId) || logMessages.get(channelId).isEmpty()) {
return;
}
}
diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/FormatCheckerPlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/FormatCheckerPlugin.java
index b62031a..12c9540 100644
--- a/src/main/java/me/chayapak1/chomens_bot/plugins/FormatCheckerPlugin.java
+++ b/src/main/java/me/chayapak1/chomens_bot/plugins/FormatCheckerPlugin.java
@@ -6,9 +6,11 @@ import me.chayapak1.chomens_bot.data.PlayerEntry;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.TextComponent;
import net.kyori.adventure.text.TranslatableComponent;
+import net.kyori.adventure.text.TranslationArgument;
import net.kyori.adventure.text.format.NamedTextColor;
import net.kyori.adventure.text.format.Style;
import net.kyori.adventure.text.format.TextDecoration;
+import org.jetbrains.annotations.NotNull;
import java.nio.charset.StandardCharsets;
import java.util.List;
@@ -56,10 +58,10 @@ public class FormatCheckerPlugin extends ChatPlugin.Listener {
if (!(component instanceof TranslatableComponent format)) return false;
- final List args = format.args();
+ final List args = format.arguments();
if (args.size() < 3 || !format.key().equals("[%s] %s › %s")) return false;
- final Component nameComponent = format.args().get(1);
+ final TranslationArgument nameComponent = format.arguments().get(1);
if (!(nameComponent instanceof TextComponent)) return false;
@@ -67,7 +69,7 @@ public class FormatCheckerPlugin extends ChatPlugin.Listener {
if (!name.equals(bot.config.ownerName)) return false;
- final Component prefix = format.args().get(0);
+ final Component prefix = (Component) format.arguments().get(0);
if (
((prefix instanceof TextComponent text) && text.content().equals(bot.username + " Console")) || // ohio
@@ -76,7 +78,7 @@ public class FormatCheckerPlugin extends ChatPlugin.Listener {
if (!(prefix instanceof TranslatableComponent translatablePrefix)) return true;
- final Component userHash = translatablePrefix.args().get(0);
+ final TranslationArgument userHash = translatablePrefix.arguments().get(0);
if (userHash == null) return true;
diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/IRCPlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/IRCPlugin.java
index 1b6a43a..1f0ee36 100644
--- a/src/main/java/me/chayapak1/chomens_bot/plugins/IRCPlugin.java
+++ b/src/main/java/me/chayapak1/chomens_bot/plugins/IRCPlugin.java
@@ -1,6 +1,5 @@
package me.chayapak1.chomens_bot.plugins;
-import com.github.steveice10.packetlib.event.session.ConnectedEvent;
import me.chayapak1.chomens_bot.Bot;
import me.chayapak1.chomens_bot.Configuration;
import me.chayapak1.chomens_bot.Main;
@@ -11,6 +10,7 @@ import me.chayapak1.chomens_bot.irc.IRCMessageLoop;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.event.HoverEvent;
import net.kyori.adventure.text.format.NamedTextColor;
+import org.geysermc.mcprotocollib.network.event.session.ConnectedEvent;
import java.util.*;
import java.util.concurrent.TimeUnit;
@@ -31,6 +31,8 @@ public class IRCPlugin extends IRCMessageLoop {
this.servers = ircConfig.servers;
+ if (!ircConfig.enabled) return;
+
nick(ircConfig.nickname);
user(ircConfig.username, ircConfig.hostName, ircConfig.serverName, ircConfig.realName);
diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/LoggerPlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/LoggerPlugin.java
index 66807aa..c3c3737 100644
--- a/src/main/java/me/chayapak1/chomens_bot/plugins/LoggerPlugin.java
+++ b/src/main/java/me/chayapak1/chomens_bot/plugins/LoggerPlugin.java
@@ -1,11 +1,11 @@
package me.chayapak1.chomens_bot.plugins;
-import com.github.steveice10.packetlib.event.session.ConnectedEvent;
-import com.github.steveice10.packetlib.event.session.DisconnectedEvent;
import me.chayapak1.chomens_bot.Bot;
import me.chayapak1.chomens_bot.util.ComponentUtilities;
import me.chayapak1.chomens_bot.util.LoggerUtilities;
import net.kyori.adventure.text.Component;
+import org.geysermc.mcprotocollib.network.event.session.ConnectedEvent;
+import org.geysermc.mcprotocollib.network.event.session.DisconnectedEvent;
public class LoggerPlugin extends ChatPlugin.Listener {
private final Bot bot;
diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/MusicPlayerPlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/MusicPlayerPlugin.java
index 21fed7c..5cc853b 100644
--- a/src/main/java/me/chayapak1/chomens_bot/plugins/MusicPlayerPlugin.java
+++ b/src/main/java/me/chayapak1/chomens_bot/plugins/MusicPlayerPlugin.java
@@ -1,12 +1,12 @@
package me.chayapak1.chomens_bot.plugins;
-import com.github.steveice10.mc.protocol.data.game.BossBarColor;
-import com.github.steveice10.mc.protocol.data.game.BossBarDivision;
-import com.github.steveice10.packetlib.event.session.DisconnectedEvent;
+import org.geysermc.mcprotocollib.network.event.session.DisconnectedEvent;
+import org.geysermc.mcprotocollib.protocol.data.game.BossBarColor;
+import org.geysermc.mcprotocollib.protocol.data.game.BossBarDivision;
import me.chayapak1.chomens_bot.Bot;
import me.chayapak1.chomens_bot.data.BotBossBar;
import me.chayapak1.chomens_bot.data.PlayerEntry;
-import land.chipmunk.chayapak.chomens_bot.song.*;
+import me.chayapak1.chomens_bot.song.*;
import me.chayapak1.chomens_bot.song.*;
import me.chayapak1.chomens_bot.util.ColorUtilities;
import me.chayapak1.chomens_bot.util.MathUtilities;
diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/PacketSnifferPlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/PacketSnifferPlugin.java
index 9d92f1f..adeeaf3 100644
--- a/src/main/java/me/chayapak1/chomens_bot/plugins/PacketSnifferPlugin.java
+++ b/src/main/java/me/chayapak1/chomens_bot/plugins/PacketSnifferPlugin.java
@@ -1,8 +1,8 @@
package me.chayapak1.chomens_bot.plugins;
-import com.github.steveice10.packetlib.Session;
-import com.github.steveice10.packetlib.packet.Packet;
import me.chayapak1.chomens_bot.Bot;
+import org.geysermc.mcprotocollib.network.Session;
+import org.geysermc.mcprotocollib.network.packet.Packet;
import java.io.BufferedWriter;
import java.io.IOException;
diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/PlayersPlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/PlayersPlugin.java
index 704a5be..436ca4a 100644
--- a/src/main/java/me/chayapak1/chomens_bot/plugins/PlayersPlugin.java
+++ b/src/main/java/me/chayapak1/chomens_bot/plugins/PlayersPlugin.java
@@ -1,13 +1,13 @@
package me.chayapak1.chomens_bot.plugins;
-import com.github.steveice10.mc.protocol.data.game.PlayerListEntry;
-import com.github.steveice10.mc.protocol.data.game.PlayerListEntryAction;
-import com.github.steveice10.mc.protocol.data.game.entity.player.GameMode;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundPlayerInfoRemovePacket;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundPlayerInfoUpdatePacket;
-import com.github.steveice10.packetlib.Session;
-import com.github.steveice10.packetlib.event.session.DisconnectedEvent;
-import com.github.steveice10.packetlib.packet.Packet;
+import org.geysermc.mcprotocollib.network.Session;
+import org.geysermc.mcprotocollib.network.event.session.DisconnectedEvent;
+import org.geysermc.mcprotocollib.network.packet.Packet;
+import org.geysermc.mcprotocollib.protocol.data.game.PlayerListEntry;
+import org.geysermc.mcprotocollib.protocol.data.game.PlayerListEntryAction;
+import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundPlayerInfoRemovePacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundPlayerInfoUpdatePacket;
import me.chayapak1.chomens_bot.Bot;
import me.chayapak1.chomens_bot.data.PlayerEntry;
import net.kyori.adventure.text.Component;
diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/PositionPlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/PositionPlugin.java
index e168a2f..2a6fe43 100644
--- a/src/main/java/me/chayapak1/chomens_bot/plugins/PositionPlugin.java
+++ b/src/main/java/me/chayapak1/chomens_bot/plugins/PositionPlugin.java
@@ -1,15 +1,15 @@
package me.chayapak1.chomens_bot.plugins;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.ClientboundMoveEntityPosPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.ClientboundMoveEntityPosRotPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.ClientboundMoveEntityRotPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.ClientboundRemoveEntitiesPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.player.ClientboundPlayerPositionPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.spawn.ClientboundAddEntityPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.serverbound.level.ServerboundAcceptTeleportationPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerPosPacket;
-import com.github.steveice10.packetlib.Session;
-import com.github.steveice10.packetlib.packet.Packet;
+import org.geysermc.mcprotocollib.network.Session;
+import org.geysermc.mcprotocollib.network.packet.Packet;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.ClientboundMoveEntityPosPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.ClientboundMoveEntityPosRotPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.ClientboundMoveEntityRotPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.ClientboundRemoveEntitiesPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.player.ClientboundPlayerPositionPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.spawn.ClientboundAddEntityPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.level.ServerboundAcceptTeleportationPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerPosPacket;
import me.chayapak1.chomens_bot.Bot;
import me.chayapak1.chomens_bot.data.Rotation;
import me.chayapak1.chomens_bot.data.PlayerEntry;
diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/SelfCarePlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/SelfCarePlugin.java
index 77eb9db..8b5f54d 100644
--- a/src/main/java/me/chayapak1/chomens_bot/plugins/SelfCarePlugin.java
+++ b/src/main/java/me/chayapak1/chomens_bot/plugins/SelfCarePlugin.java
@@ -1,19 +1,19 @@
package me.chayapak1.chomens_bot.plugins;
-import com.github.steveice10.mc.protocol.data.game.ClientCommand;
-import com.github.steveice10.mc.protocol.data.game.entity.EntityEvent;
-import com.github.steveice10.mc.protocol.data.game.entity.player.GameMode;
-import com.github.steveice10.mc.protocol.data.game.level.notify.GameEvent;
-import com.github.steveice10.mc.protocol.data.game.level.notify.GameEventValue;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundLoginPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.ClientboundEntityEventPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.inventory.ClientboundOpenScreenPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.level.ClientboundGameEventPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.serverbound.ServerboundClientCommandPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.serverbound.inventory.ServerboundContainerClosePacket;
-import com.github.steveice10.packetlib.Session;
-import com.github.steveice10.packetlib.event.session.DisconnectedEvent;
-import com.github.steveice10.packetlib.packet.Packet;
+import org.geysermc.mcprotocollib.network.Session;
+import org.geysermc.mcprotocollib.network.event.session.DisconnectedEvent;
+import org.geysermc.mcprotocollib.network.packet.Packet;
+import org.geysermc.mcprotocollib.protocol.data.game.ClientCommand;
+import org.geysermc.mcprotocollib.protocol.data.game.entity.EntityEvent;
+import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode;
+import org.geysermc.mcprotocollib.protocol.data.game.level.notify.GameEvent;
+import org.geysermc.mcprotocollib.protocol.data.game.level.notify.GameEventValue;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundLoginPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.ClientboundEntityEventPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.inventory.ClientboundOpenScreenPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level.ClientboundGameEventPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.ServerboundClientCommandPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.inventory.ServerboundContainerClosePacket;
import me.chayapak1.chomens_bot.Bot;
import me.chayapak1.chomens_bot.Configuration;
import net.kyori.adventure.text.Component;
diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/ServerPluginsManagerPlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/ServerPluginsManagerPlugin.java
index 49766d3..5153fea 100644
--- a/src/main/java/me/chayapak1/chomens_bot/plugins/ServerPluginsManagerPlugin.java
+++ b/src/main/java/me/chayapak1/chomens_bot/plugins/ServerPluginsManagerPlugin.java
@@ -1,7 +1,7 @@
package me.chayapak1.chomens_bot.plugins;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundCommandSuggestionsPacket;
-import com.github.steveice10.packetlib.event.session.ConnectedEvent;
+import org.geysermc.mcprotocollib.network.event.session.ConnectedEvent;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundCommandSuggestionsPacket;
import me.chayapak1.chomens_bot.Bot;
import java.util.ArrayList;
diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/TPSPlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/TPSPlugin.java
index 8e65caf..c50ace4 100644
--- a/src/main/java/me/chayapak1/chomens_bot/plugins/TPSPlugin.java
+++ b/src/main/java/me/chayapak1/chomens_bot/plugins/TPSPlugin.java
@@ -1,11 +1,11 @@
package me.chayapak1.chomens_bot.plugins;
-import com.github.steveice10.mc.protocol.data.game.BossBarColor;
-import com.github.steveice10.mc.protocol.data.game.BossBarDivision;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundLoginPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.level.ClientboundSetTimePacket;
-import com.github.steveice10.packetlib.Session;
-import com.github.steveice10.packetlib.packet.Packet;
+import org.geysermc.mcprotocollib.network.Session;
+import org.geysermc.mcprotocollib.network.packet.Packet;
+import org.geysermc.mcprotocollib.protocol.data.game.BossBarColor;
+import org.geysermc.mcprotocollib.protocol.data.game.BossBarDivision;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundLoginPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level.ClientboundSetTimePacket;
import me.chayapak1.chomens_bot.Bot;
import me.chayapak1.chomens_bot.data.BotBossBar;
import me.chayapak1.chomens_bot.util.MathUtilities;
@@ -141,7 +141,7 @@ public class TPSPlugin extends Bot.Listener {
float sumTickRates = 0.0f;
for (double tickRate : tickRates) {
if (tickRate > 0) {
- sumTickRates += tickRate;
+ sumTickRates += (float) tickRate;
numTicks++;
}
}
diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/TabCompletePlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/TabCompletePlugin.java
index ab5fcc4..01d4144 100644
--- a/src/main/java/me/chayapak1/chomens_bot/plugins/TabCompletePlugin.java
+++ b/src/main/java/me/chayapak1/chomens_bot/plugins/TabCompletePlugin.java
@@ -1,9 +1,9 @@
package me.chayapak1.chomens_bot.plugins;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundCommandSuggestionsPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.serverbound.ServerboundCommandSuggestionPacket;
-import com.github.steveice10.packetlib.Session;
-import com.github.steveice10.packetlib.packet.Packet;
+import org.geysermc.mcprotocollib.network.Session;
+import org.geysermc.mcprotocollib.network.packet.Packet;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundCommandSuggestionsPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.ServerboundCommandSuggestionPacket;
import me.chayapak1.chomens_bot.Bot;
import java.util.HashMap;
diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/TeamPlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/TeamPlugin.java
index d93f4c4..9e86ddc 100644
--- a/src/main/java/me/chayapak1/chomens_bot/plugins/TeamPlugin.java
+++ b/src/main/java/me/chayapak1/chomens_bot/plugins/TeamPlugin.java
@@ -1,8 +1,8 @@
package me.chayapak1.chomens_bot.plugins;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.scoreboard.ClientboundSetPlayerTeamPacket;
-import com.github.steveice10.packetlib.Session;
-import com.github.steveice10.packetlib.packet.Packet;
+import org.geysermc.mcprotocollib.network.Session;
+import org.geysermc.mcprotocollib.network.packet.Packet;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.scoreboard.ClientboundSetPlayerTeamPacket;
import me.chayapak1.chomens_bot.Bot;
import me.chayapak1.chomens_bot.data.Team;
diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/VoiceChatPlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/VoiceChatPlugin.java
index 967e1b3..503b956 100644
--- a/src/main/java/me/chayapak1/chomens_bot/plugins/VoiceChatPlugin.java
+++ b/src/main/java/me/chayapak1/chomens_bot/plugins/VoiceChatPlugin.java
@@ -1,11 +1,12 @@
package me.chayapak1.chomens_bot.plugins;
-import com.github.steveice10.mc.protocol.packet.common.clientbound.ClientboundCustomPayloadPacket;
-import com.github.steveice10.mc.protocol.packet.common.serverbound.ServerboundCustomPayloadPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundLoginPacket;
-import com.github.steveice10.packetlib.Session;
-import com.github.steveice10.packetlib.event.session.DisconnectedEvent;
-import com.github.steveice10.packetlib.packet.Packet;
+import net.kyori.adventure.key.Key;
+import org.geysermc.mcprotocollib.network.Session;
+import org.geysermc.mcprotocollib.network.event.session.DisconnectedEvent;
+import org.geysermc.mcprotocollib.network.packet.Packet;
+import org.geysermc.mcprotocollib.protocol.packet.common.clientbound.ClientboundCustomPayloadPacket;
+import org.geysermc.mcprotocollib.protocol.packet.common.serverbound.ServerboundCustomPayloadPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundLoginPacket;
import io.netty.buffer.Unpooled;
import me.chayapak1.chomens_bot.Bot;
import me.chayapak1.chomens_bot.data.voiceChat.ClientGroup;
@@ -15,7 +16,7 @@ import me.chayapak1.chomens_bot.voiceChat.InitializationData;
import me.chayapak1.chomens_bot.voiceChat.NetworkMessage;
import me.chayapak1.chomens_bot.voiceChat.customPayload.JoinGroupPacket;
import me.chayapak1.chomens_bot.voiceChat.customPayload.SecretPacket;
-import land.chipmunk.chayapak.chomens_bot.voiceChat.packets.*;
+import me.chayapak1.chomens_bot.voiceChat.packets.*;
import me.chayapak1.chomens_bot.voiceChat.packets.*;
import java.net.*;
@@ -51,17 +52,17 @@ public class VoiceChatPlugin extends Bot.Listener {
public void packetReceived(ClientboundLoginPacket ignored) {
// totally didn't use a real minecraft client with voicechat mod to get this
bot.session.send(new ServerboundCustomPayloadPacket(
- "minecraft:brand",
+ Key.key("minecraft:brand"),
"\u0006fabric".getBytes() // should i use fabric here?
));
bot.session.send(new ServerboundCustomPayloadPacket(
- "voicechat:request_secret",
+ Key.key("voicechat:request_secret"),
new FriendlyByteBuf(Unpooled.buffer()).writeInt(17).array()
));
bot.session.send(new ServerboundCustomPayloadPacket(
- "voicechat:update_state",
+ Key.key("voicechat:update_state"),
new FriendlyByteBuf(Unpooled.buffer()).writeBoolean(false).array()
));
@@ -69,7 +70,7 @@ public class VoiceChatPlugin extends Bot.Listener {
}
public void packetReceived(ClientboundCustomPayloadPacket _packet) {
- if (_packet.getChannel().equals("voicechat:secret")) { // fard
+ if (_packet.getChannel().equals(Key.key("voicechat:secret"))) { // fard
final byte[] bytes = _packet.getData();
final FriendlyByteBuf buf = new FriendlyByteBuf(Unpooled.wrappedBuffer(bytes));
@@ -112,14 +113,14 @@ public class VoiceChatPlugin extends Bot.Listener {
thread.setName("Simple Voice Chat Thread");
thread.start();
- } else if (_packet.getChannel().equals("voicechat:add_group")) {
+ } else if (_packet.getChannel().equals(Key.key("voicechat:add_group"))) {
final byte[] bytes = _packet.getData();
final FriendlyByteBuf buf = new FriendlyByteBuf(Unpooled.wrappedBuffer(bytes));
final ClientGroup group = ClientGroup.fromBytes(buf);
groups.add(group);
- } else if (_packet.getChannel().equals("voicechat:remove_group")) {
+ } else if (_packet.getChannel().equals(Key.key("voicechat:remove_group"))) {
final byte[] bytes = _packet.getData();
final FriendlyByteBuf buf = new FriendlyByteBuf(Unpooled.wrappedBuffer(bytes));
@@ -144,7 +145,7 @@ public class VoiceChatPlugin extends Bot.Listener {
new JoinGroupPacket(clientGroup.id(), password).toBytes(buf);
bot.session.send(new ServerboundCustomPayloadPacket(
- "voicechat:set_group",
+ Key.key("voicechat:set_group"),
buf.array()
));
}
diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/WorldPlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/WorldPlugin.java
index 299026e..ada6820 100644
--- a/src/main/java/me/chayapak1/chomens_bot/plugins/WorldPlugin.java
+++ b/src/main/java/me/chayapak1/chomens_bot/plugins/WorldPlugin.java
@@ -1,12 +1,11 @@
package me.chayapak1.chomens_bot.plugins;
-import com.github.steveice10.mc.protocol.packet.configuration.clientbound.ClientboundRegistryDataPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundLoginPacket;
-import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundRespawnPacket;
-import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
-import com.github.steveice10.opennbt.tag.builtin.Tag;
-import com.github.steveice10.packetlib.Session;
-import com.github.steveice10.packetlib.packet.Packet;
+import net.kyori.adventure.key.Key;
+import org.geysermc.mcprotocollib.network.Session;
+import org.geysermc.mcprotocollib.network.packet.Packet;
+import org.geysermc.mcprotocollib.protocol.packet.configuration.clientbound.ClientboundRegistryDataPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundLoginPacket;
+import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundRespawnPacket;
import me.chayapak1.chomens_bot.Bot;
import java.util.ArrayList;
@@ -19,7 +18,7 @@ public class WorldPlugin extends Bot.Listener {
public int minY = 0;
public int maxY = 256;
- public CompoundTag registry = null;
+ public Key registry = null;
private final List listeners = new ArrayList<>();
@@ -36,22 +35,25 @@ public class WorldPlugin extends Bot.Listener {
else if (packet instanceof ClientboundRegistryDataPacket) packetReceived((ClientboundRegistryDataPacket) packet);
}
- @SuppressWarnings("unchecked")
- private void worldChanged (String dimension) {
- final Tag dimensionType = ((LinkedHashMap) registry.get("minecraft:dimension_type").getValue()).get("value");
-
- final ArrayList dimensions = (ArrayList) dimensionType.getValue();
-
- final CompoundTag currentDimension = dimensions.stream()
- .filter((eachDimension) -> eachDimension.get("name").getValue().equals(dimension))
- .toArray(CompoundTag[]::new)[0];
-
- final CompoundTag element = currentDimension.get("element");
-
- minY = (int) element.get("min_y").getValue();
- maxY = (int) element.get("height").getValue();
-
- for (Listener listener : listeners) listener.worldChanged(dimension);
+// @SuppressWarnings("unchecked")
+ private void worldChanged (int dimension) {
+ // FIXME
+ bot.logger.info(registry.value());
+ bot.logger.info(registry.toString());
+// final Key dimensionType = ((LinkedHashMap) registry.get("minecraft:dimension_type").asString()).get("value");
+//
+// final ArrayList dimensions = (ArrayList) dimensionType.asString();
+//
+// final Key currentDimension = dimensions.stream()
+// .filter((eachDimension) -> eachDimension.get("name").getValue().equals(dimension))
+// .toArray(Key[]::new)[0];
+//
+// final Key element = currentDimension.get("element");
+//
+// minY = (int) element.get("min_y").getValue();
+// maxY = (int) element.get("height").getValue();
+//
+// for (Listener listener : listeners) listener.worldChanged(dimension);
}
public void packetReceived (ClientboundRegistryDataPacket packet) {
diff --git a/src/main/java/me/chayapak1/chomens_bot/song/MidiConverter.java b/src/main/java/me/chayapak1/chomens_bot/song/MidiConverter.java
index be3e3db..c0ac989 100644
--- a/src/main/java/me/chayapak1/chomens_bot/song/MidiConverter.java
+++ b/src/main/java/me/chayapak1/chomens_bot/song/MidiConverter.java
@@ -11,7 +11,7 @@ import java.util.*;
import static javax.sound.midi.ShortMessage.SYSTEM_RESET;
// Author: hhhzzzsss
-// i modified this and some codes are stolen from https://github.com/RaphiMC/NoteBlockLib so thanks to them uwu
+// i modified this and some codes are stolen from https://github.com/RaphiMC/NoteBlockLib so thanks to them
public class MidiConverter implements Converter {
public static final int TEXT = 0x01;
public static final int TRACK_NAME = 0x03;
diff --git a/src/main/java/me/chayapak1/chomens_bot/util/ComponentUtilities.java b/src/main/java/me/chayapak1/chomens_bot/util/ComponentUtilities.java
index 3ed8f04..1dc830d 100644
--- a/src/main/java/me/chayapak1/chomens_bot/util/ComponentUtilities.java
+++ b/src/main/java/me/chayapak1/chomens_bot/util/ComponentUtilities.java
@@ -283,16 +283,16 @@ public class ComponentUtilities {
} else {
String idxStr = matcher.group(1);
int idx = idxStr == null ? i++ : (Integer.parseInt(idxStr) - 1);
- if (idx >= 0 && idx < message.args().size()) {
+ if (idx >= 0 && idx < message.arguments().size()) {
matcher.appendReplacement(
sb,
Matcher.quoteReplacement(
motd ?
- stringifyMotd(message.args().get(idx)) + color :
+ stringifyMotd(message.arguments().get(idx).asComponent()) + color :
(
ansi ?
- stringifyAnsi(message.args().get(idx)) + color :
- stringify(message.args().get(idx))
+ stringifyAnsi(message.arguments().get(idx).asComponent()) + color :
+ stringify(message.arguments().get(idx).asComponent())
)
)
);
diff --git a/src/main/java/me/chayapak1/chomens_bot/util/UUIDUtilities.java b/src/main/java/me/chayapak1/chomens_bot/util/UUIDUtilities.java
index c7e07ab..17274f6 100644
--- a/src/main/java/me/chayapak1/chomens_bot/util/UUIDUtilities.java
+++ b/src/main/java/me/chayapak1/chomens_bot/util/UUIDUtilities.java
@@ -1,6 +1,8 @@
package me.chayapak1.chomens_bot.util;
-import com.github.steveice10.opennbt.tag.builtin.IntArrayTag;
+import org.cloudburstmc.nbt.NbtMap;
+import org.cloudburstmc.nbt.NbtMapBuilder;
+
import java.util.UUID;
import java.nio.ByteBuffer;
@@ -19,8 +21,12 @@ public class UUIDUtilities {
return intArray;
}
- public static IntArrayTag tag (UUID uuid) {
- return new IntArrayTag("", intArray(uuid));
+ public static NbtMap tag (UUID uuid) {
+ final NbtMapBuilder builder = NbtMap.builder();
+
+ builder.putIntArray("", intArray(uuid));
+
+ return builder.build();
}
public static String snbt (UUID uuid) {
diff --git a/src/main/java/me/chayapak1/chomens_bot/voiceChat/NetworkMessage.java b/src/main/java/me/chayapak1/chomens_bot/voiceChat/NetworkMessage.java
index 486aec6..7fa49f0 100644
--- a/src/main/java/me/chayapak1/chomens_bot/voiceChat/NetworkMessage.java
+++ b/src/main/java/me/chayapak1/chomens_bot/voiceChat/NetworkMessage.java
@@ -4,7 +4,7 @@ import io.netty.buffer.Unpooled;
import me.chayapak1.chomens_bot.data.voiceChat.RawUdpPacket;
import me.chayapak1.chomens_bot.util.AESUtilities;
import me.chayapak1.chomens_bot.util.FriendlyByteBuf;
-import land.chipmunk.chayapak.chomens_bot.voiceChat.packets.*;
+import me.chayapak1.chomens_bot.voiceChat.packets.*;
import me.chayapak1.chomens_bot.voiceChat.packets.*;
import javax.crypto.BadPaddingException;
diff --git a/src/main/resources/default-config.yml b/src/main/resources/default-config.yml
index 363fd1f..17a54dc 100644
--- a/src/main/resources/default-config.yml
+++ b/src/main/resources/default-config.yml
@@ -48,7 +48,7 @@ irc:
localhost:25565: '#chomens-localhost' # channel name
music:
- URLRatelimit:
+ urlRatelimit:
seconds: 15
limit: 7