diff --git a/api/src/main/java/ru/nanit/limbo/protocol/registry/State.java b/api/src/main/java/ru/nanit/limbo/protocol/registry/State.java
deleted file mode 100644
index 2e419fc9..00000000
--- a/api/src/main/java/ru/nanit/limbo/protocol/registry/State.java
+++ /dev/null
@@ -1,343 +0,0 @@
-/*
- * Copyright (C) 2020 Nan1t
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package ru.nanit.limbo.protocol.registry;
-
-import ru.nanit.limbo.protocol.Packet;
-import ru.nanit.limbo.protocol.packets.PacketHandshake;
-import ru.nanit.limbo.protocol.packets.login.*;
-import ru.nanit.limbo.protocol.packets.play.*;
-import ru.nanit.limbo.protocol.packets.status.PacketStatusPing;
-import ru.nanit.limbo.protocol.packets.status.PacketStatusRequest;
-import ru.nanit.limbo.protocol.packets.status.PacketStatusResponse;
-
-import java.util.*;
-import java.util.function.Supplier;
-
-import static ru.nanit.limbo.protocol.registry.Version.*;
-
-public enum State {
-
- HANDSHAKING(0) {
- {
- serverBound.register(PacketHandshake::new,
- map(0x00, Version.getMin(), Version.getMax())
- );
- }
- },
- STATUS(1) {
- {
- serverBound.register(PacketStatusRequest::new,
- map(0x00, Version.getMin(), Version.getMax())
- );
- serverBound.register(PacketStatusPing::new,
- map(0x01, Version.getMin(), Version.getMax())
- );
- clientBound.register(PacketStatusResponse::new,
- map(0x00, Version.getMin(), Version.getMax())
- );
- clientBound.register(PacketStatusPing::new,
- map(0x01, Version.getMin(), Version.getMax())
- );
- }
- },
- LOGIN(2) {
- {
- serverBound.register(PacketLoginStart::new,
- map(0x00, Version.getMin(), Version.getMax())
- );
- serverBound.register(PacketLoginPluginResponse::new,
- map(0x02, Version.getMin(), Version.getMax())
- );
- clientBound.register(PacketDisconnect::new,
- map(0x00, Version.getMin(), Version.getMax())
- );
- clientBound.register(PacketLoginSuccess::new,
- map(0x02, Version.getMin(), Version.getMax())
- );
- clientBound.register(PacketLoginPluginRequest::new,
- map(0x04, Version.getMin(), Version.getMax())
- );
- }
- },
- PLAY(3) {
- {
- serverBound.register(PacketKeepAlive::new,
- map(0x00, V1_8, V1_8),
- map(0x0B, V1_9, V1_11_1),
- map(0x0C, V1_12, V1_12),
- map(0x0B, V1_12_1, V1_12_2),
- map(0x0E, V1_13, V1_13_2),
- map(0x0F, V1_14, V1_15_2),
- map(0x10, V1_16, V1_16_4),
- map(0x0F, V1_17, V1_18_2),
- map(0x11, V1_19, V1_19),
- map(0x12, V1_19_1, V1_19_1)
- );
-
- clientBound.register(PacketDeclareCommands::new,
- map(0x11, V1_13, V1_14_4),
- map(0x12, V1_15, V1_15_2),
- map(0x11, V1_16, V1_16_1),
- map(0x10, V1_16_2, V1_16_4),
- map(0x12, V1_17, V1_18_2),
- map(0x0F, V1_19, V1_19_1)
- );
- clientBound.register(PacketJoinGame::new,
- map(0x01, V1_8, V1_8),
- map(0x23, V1_9, V1_12_2),
- map(0x25, V1_13, V1_14_4),
- map(0x26, V1_15, V1_15_2),
- map(0x25, V1_16, V1_16_1),
- map(0x24, V1_16_2, V1_16_4),
- map(0x26, V1_17, V1_18_2),
- map(0x23, V1_19, V1_19),
- map(0x25, V1_19_1, V1_19_1)
- );
- clientBound.register(PacketPluginMessage::new,
- map(0x19, V1_13, V1_13_2),
- map(0x18, V1_14, V1_14_4),
- map(0x19, V1_15, V1_15_2),
- map(0x18, V1_16, V1_16_1),
- map(0x17, V1_16_2, V1_16_4),
- map(0x18, V1_17, V1_18_2),
- map(0x15, V1_19, V1_19),
- map(0x16, V1_19_1, V1_19_1)
- );
- clientBound.register(PacketPlayerAbilities::new,
- map(0x39, V1_8, V1_8),
- map(0x2B, V1_9, V1_12),
- map(0x2C, V1_12_1, V1_12_2),
- map(0x2E, V1_13, V1_13_2),
- map(0x31, V1_14, V1_14_4),
- map(0x32, V1_15, V1_15_2),
- map(0x31, V1_16, V1_16_1),
- map(0x30, V1_16_2, V1_16_4),
- map(0x32, V1_17, V1_18_2),
- map(0x2F, V1_19, V1_19),
- map(0x31, V1_19_1, V1_19_1)
- );
- clientBound.register(PacketPlayerPositionAndLook::new,
- map(0x08, V1_8, V1_8),
- map(0x2E, V1_9, V1_12),
- map(0x2F, V1_12_1, V1_12_2),
- map(0x32, V1_13, V1_13_2),
- map(0x35, V1_14, V1_14_4),
- map(0x36, V1_15, V1_15_2),
- map(0x35, V1_16, V1_16_1),
- map(0x34, V1_16_2, V1_16_4),
- map(0x38, V1_17, V1_18_2),
- map(0x36, V1_19, V1_19),
- map(0x39, V1_19_1, V1_19_1)
- );
- clientBound.register(PacketKeepAlive::new,
- map(0x00, V1_8, V1_8),
- map(0x1F, V1_9, V1_12_2),
- map(0x21, V1_13, V1_13_2),
- map(0x20, V1_14, V1_14_4),
- map(0x21, V1_15, V1_15_2),
- map(0x20, V1_16, V1_16_1),
- map(0x1F, V1_16_2, V1_16_4),
- map(0x21, V1_17, V1_18_2),
- map(0x1E, V1_19, V1_19),
- map(0x20, V1_19_1, V1_19_1)
- );
- clientBound.register(PacketChatMessage::new,
- map(0x02, V1_8, V1_8),
- map(0x0F, V1_9, V1_12_2),
- map(0x0E, V1_13, V1_14_4),
- map(0x0F, V1_15, V1_15_2),
- map(0x0E, V1_16, V1_16_4),
- map(0x0F, V1_17, V1_18_2),
- map(0x5F, V1_19, V1_19),
- map(0x62, V1_19_1, V1_19_1)
- );
- clientBound.register(PacketBossBar::new,
- map(0x0C, V1_9, V1_14_4),
- map(0x0D, V1_15, V1_15_2),
- map(0x0C, V1_16, V1_16_4),
- map(0x0D, V1_17, V1_18_2),
- map(0x0A, V1_19, V1_19_1)
- );
- clientBound.register(PacketPlayerInfo::new,
- map(0x38, V1_8, V1_8),
- map(0x2D, V1_9, V1_12),
- map(0x2E, V1_12_1, V1_12_2),
- map(0x30, V1_13, V1_13_2),
- map(0x33, V1_14, V1_14_4),
- map(0x34, V1_15, V1_15_2),
- map(0x33, V1_16, V1_16_1),
- map(0x32, V1_16_2, V1_16_4),
- map(0x36, V1_17, V1_18_2),
- map(0x34, V1_19, V1_19),
- map(0x37, V1_19_1, V1_19_1)
- );
- clientBound.register(PacketTitleLegacy::new,
- map(0x45, V1_8, V1_11_1),
- map(0x47, V1_12, V1_12),
- map(0x48, V1_12_1, V1_12_2),
- map(0x4B, V1_13, V1_13_2),
- map(0x4F, V1_14, V1_14_4),
- map(0x50, V1_15, V1_15_2),
- map(0x4F, V1_16, V1_16_4)
- );
- clientBound.register(PacketTitleSetTitle::new,
- map(0x59, V1_17, V1_17_1),
- map(0x5A, V1_18, V1_19),
- map(0x5D, V1_19_1, V1_19_1)
- );
- clientBound.register(PacketTitleSetSubTitle::new,
- map(0x57, V1_17, V1_17_1),
- map(0x58, V1_18, V1_19),
- map(0x5B, V1_19_1, V1_19_1)
- );
- clientBound.register(PacketTitleTimes::new,
- map(0x5A, V1_17, V1_17_1),
- map(0x5B, V1_18, V1_19),
- map(0x5E, V1_19_1, V1_19_1)
- );
- clientBound.register(PacketPlayerListHeader::new,
- map(0x47, V1_8, V1_8),
- map(0x48, V1_9, V1_9_2),
- map(0x47, V1_9_4, V1_11_1),
- map(0x49, V1_12, V1_12),
- map(0x4A, V1_12_1, V1_12_2),
- map(0x4E, V1_13, V1_13_2),
- map(0x53, V1_14, V1_14_4),
- map(0x54, V1_15, V1_15_2),
- map(0x53, V1_16, V1_16_4),
- map(0x5E, V1_17, V1_17_1),
- map(0x5F, V1_18, V1_18_2),
- map(0x60, V1_19, V1_19),
- map(0x63, V1_19_1, V1_19_1)
- );
- }
- };
-
- private static final Map STATE_BY_ID = new HashMap<>();
-
- static {
- for (State registry : values()) {
- STATE_BY_ID.put(registry.stateId, registry);
- }
- }
-
- private final int stateId;
- public final ProtocolMappings serverBound = new ProtocolMappings();
- public final ProtocolMappings clientBound = new ProtocolMappings();
-
- State(int stateId) {
- this.stateId = stateId;
- }
-
- public static State getById(int stateId) {
- return STATE_BY_ID.get(stateId);
- }
-
- public static class ProtocolMappings {
-
- private final Map registry = new HashMap<>();
-
- public PacketRegistry getRegistry(Version version) {
- return registry.getOrDefault(version, registry.get(getMin()));
- }
-
- public void register(Supplier> packet, Mapping... mappings) {
- for (Mapping mapping : mappings) {
- for (Version ver : getRange(mapping)) {
- PacketRegistry reg = registry.computeIfAbsent(ver, PacketRegistry::new);
- reg.register(mapping.packetId, packet);
- }
- }
- }
-
- private Collection getRange(Mapping mapping) {
- Version from = mapping.from;
- Version curr = mapping.to;
-
- if (curr == from)
- return Collections.singletonList(from);
-
- List versions = new LinkedList<>();
-
- while (curr != from) {
- versions.add(curr);
- curr = curr.getPrev();
- }
-
- versions.add(from);
-
- return versions;
- }
-
- }
-
- public static class PacketRegistry {
-
- private final Version version;
- private final Map> packetsById = new HashMap<>();
- private final Map, Integer> packetIdByClass = new HashMap<>();
-
- public PacketRegistry(Version version) {
- this.version = version;
- }
-
- public Version getVersion() {
- return version;
- }
-
- public Packet getPacket(int packetId) {
- Supplier> supplier = packetsById.get(packetId);
- return supplier == null ? null : (Packet) supplier.get();
- }
-
- public int getPacketId(Class> packetClass) {
- return packetIdByClass.getOrDefault(packetClass, -1);
- }
-
- public void register(int packetId, Supplier> supplier) {
- packetsById.put(packetId, supplier);
- packetIdByClass.put(supplier.get().getClass(), packetId);
- }
-
- }
-
- private static class Mapping {
-
- private final int packetId;
- private final Version from;
- private final Version to;
-
- public Mapping(int packetId, Version from, Version to) {
- this.from = from;
- this.to = to;
- this.packetId = packetId;
- }
- }
-
- /**
- * Map packet id to version range
- * @param packetId Packet id
- * @param from Minimal version (include)
- * @param to Last version (include)
- * @return Created mapping
- */
- private static Mapping map(int packetId, Version from, Version to) {
- return new Mapping(packetId, from, to);
- }
-
-}
diff --git a/api/src/main/java/ru/nanit/limbo/LimboConstants.java b/api/src/main/java/ua/nanit/limbo/LimboConstants.java
similarity index 97%
rename from api/src/main/java/ru/nanit/limbo/LimboConstants.java
rename to api/src/main/java/ua/nanit/limbo/LimboConstants.java
index 0c3d5b24..25eb72fc 100644
--- a/api/src/main/java/ru/nanit/limbo/LimboConstants.java
+++ b/api/src/main/java/ua/nanit/limbo/LimboConstants.java
@@ -15,7 +15,7 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo;
+package ua.nanit.limbo;
public final class LimboConstants {
diff --git a/api/src/main/java/ru/nanit/limbo/NanoLimbo.java b/api/src/main/java/ua/nanit/limbo/NanoLimbo.java
similarity index 87%
rename from api/src/main/java/ru/nanit/limbo/NanoLimbo.java
rename to api/src/main/java/ua/nanit/limbo/NanoLimbo.java
index 88a9ae26..8f591c8c 100644
--- a/api/src/main/java/ru/nanit/limbo/NanoLimbo.java
+++ b/api/src/main/java/ua/nanit/limbo/NanoLimbo.java
@@ -15,14 +15,14 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo;
+package ua.nanit.limbo;
import java.nio.file.Paths;
-import ru.nanit.limbo.configuration.YamlLimboConfig;
-import ru.nanit.limbo.server.ConsoleCommandHandler;
-import ru.nanit.limbo.server.LimboServer;
-import ru.nanit.limbo.server.Logger;
+import ua.nanit.limbo.configuration.YamlLimboConfig;
+import ua.nanit.limbo.server.ConsoleCommandHandler;
+import ua.nanit.limbo.server.LimboServer;
+import ua.nanit.limbo.server.Logger;
public final class NanoLimbo {
diff --git a/api/src/main/java/ru/nanit/limbo/configuration/LimboConfig.java b/api/src/main/java/ua/nanit/limbo/configuration/LimboConfig.java
similarity index 76%
rename from api/src/main/java/ru/nanit/limbo/configuration/LimboConfig.java
rename to api/src/main/java/ua/nanit/limbo/configuration/LimboConfig.java
index b5931bd9..253015b0 100644
--- a/api/src/main/java/ru/nanit/limbo/configuration/LimboConfig.java
+++ b/api/src/main/java/ua/nanit/limbo/configuration/LimboConfig.java
@@ -1,12 +1,12 @@
-package ru.nanit.limbo.configuration;
+package ua.nanit.limbo.configuration;
import java.net.SocketAddress;
-import ru.nanit.limbo.server.data.BossBar;
-import ru.nanit.limbo.server.data.InfoForwarding;
-import ru.nanit.limbo.server.data.PingData;
-import ru.nanit.limbo.server.data.Title;
-import ru.nanit.limbo.world.Location;
+import ua.nanit.limbo.server.data.BossBar;
+import ua.nanit.limbo.server.data.InfoForwarding;
+import ua.nanit.limbo.server.data.PingData;
+import ua.nanit.limbo.server.data.Title;
+import ua.nanit.limbo.world.Location;
public interface LimboConfig {
SocketAddress getAddress();
diff --git a/api/src/main/java/ru/nanit/limbo/configuration/SocketAddressSerializer.java b/api/src/main/java/ua/nanit/limbo/configuration/SocketAddressSerializer.java
similarity index 97%
rename from api/src/main/java/ru/nanit/limbo/configuration/SocketAddressSerializer.java
rename to api/src/main/java/ua/nanit/limbo/configuration/SocketAddressSerializer.java
index 18e737e6..66b4d0a0 100644
--- a/api/src/main/java/ru/nanit/limbo/configuration/SocketAddressSerializer.java
+++ b/api/src/main/java/ua/nanit/limbo/configuration/SocketAddressSerializer.java
@@ -15,7 +15,7 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.configuration;
+package ua.nanit.limbo.configuration;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.spongepowered.configurate.ConfigurationNode;
diff --git a/api/src/main/java/ru/nanit/limbo/configuration/YamlLimboConfig.java b/api/src/main/java/ua/nanit/limbo/configuration/YamlLimboConfig.java
similarity index 96%
rename from api/src/main/java/ru/nanit/limbo/configuration/YamlLimboConfig.java
rename to api/src/main/java/ua/nanit/limbo/configuration/YamlLimboConfig.java
index e3f61ddb..a2f12e3b 100644
--- a/api/src/main/java/ru/nanit/limbo/configuration/YamlLimboConfig.java
+++ b/api/src/main/java/ua/nanit/limbo/configuration/YamlLimboConfig.java
@@ -15,7 +15,7 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.configuration;
+package ua.nanit.limbo.configuration;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
@@ -31,12 +31,12 @@
import org.spongepowered.configurate.serialize.TypeSerializerCollection;
import org.spongepowered.configurate.yaml.YamlConfigurationLoader;
-import ru.nanit.limbo.server.data.BossBar;
-import ru.nanit.limbo.server.data.InfoForwarding;
-import ru.nanit.limbo.server.data.PingData;
-import ru.nanit.limbo.server.data.Title;
-import ru.nanit.limbo.util.Colors;
-import ru.nanit.limbo.world.Location;
+import ua.nanit.limbo.server.data.BossBar;
+import ua.nanit.limbo.server.data.InfoForwarding;
+import ua.nanit.limbo.server.data.PingData;
+import ua.nanit.limbo.server.data.Title;
+import ua.nanit.limbo.util.Colors;
+import ua.nanit.limbo.world.Location;
public final class YamlLimboConfig implements LimboConfig {
diff --git a/api/src/main/java/ru/nanit/limbo/connection/ClientChannelInitializer.java b/api/src/main/java/ua/nanit/limbo/connection/ClientChannelInitializer.java
similarity index 85%
rename from api/src/main/java/ru/nanit/limbo/connection/ClientChannelInitializer.java
rename to api/src/main/java/ua/nanit/limbo/connection/ClientChannelInitializer.java
index c3946061..7972e0b0 100644
--- a/api/src/main/java/ru/nanit/limbo/connection/ClientChannelInitializer.java
+++ b/api/src/main/java/ua/nanit/limbo/connection/ClientChannelInitializer.java
@@ -15,17 +15,17 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.connection;
+package ua.nanit.limbo.connection;
import io.netty.channel.Channel;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.handler.timeout.ReadTimeoutHandler;
-import ru.nanit.limbo.connection.pipeline.PacketDecoder;
-import ru.nanit.limbo.connection.pipeline.PacketEncoder;
-import ru.nanit.limbo.connection.pipeline.VarIntFrameDecoder;
-import ru.nanit.limbo.connection.pipeline.VarIntLengthEncoder;
-import ru.nanit.limbo.server.LimboServer;
+import ua.nanit.limbo.connection.pipeline.PacketDecoder;
+import ua.nanit.limbo.connection.pipeline.PacketEncoder;
+import ua.nanit.limbo.connection.pipeline.VarIntFrameDecoder;
+import ua.nanit.limbo.connection.pipeline.VarIntLengthEncoder;
+import ua.nanit.limbo.server.LimboServer;
import java.util.concurrent.TimeUnit;
diff --git a/api/src/main/java/ru/nanit/limbo/connection/ClientConnection.java b/api/src/main/java/ua/nanit/limbo/connection/ClientConnection.java
similarity index 94%
rename from api/src/main/java/ru/nanit/limbo/connection/ClientConnection.java
rename to api/src/main/java/ua/nanit/limbo/connection/ClientConnection.java
index 70761a4a..57f4686a 100644
--- a/api/src/main/java/ru/nanit/limbo/connection/ClientConnection.java
+++ b/api/src/main/java/ua/nanit/limbo/connection/ClientConnection.java
@@ -15,7 +15,7 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.connection;
+package ua.nanit.limbo.connection;
import com.grack.nanojson.JsonArray;
import com.grack.nanojson.JsonObject;
@@ -29,17 +29,19 @@
import org.jetbrains.annotations.NotNull;
-import ru.nanit.limbo.connection.pipeline.PacketDecoder;
-import ru.nanit.limbo.connection.pipeline.PacketEncoder;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.Packet;
+import ua.nanit.limbo.connection.pipeline.PacketDecoder;
+import ua.nanit.limbo.connection.pipeline.PacketEncoder;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.Packet;
import ru.nanit.limbo.protocol.packets.login.*;
import ru.nanit.limbo.protocol.packets.play.*;
-import ru.nanit.limbo.protocol.registry.State;
-import ru.nanit.limbo.protocol.registry.Version;
-import ru.nanit.limbo.server.LimboServer;
-import ru.nanit.limbo.server.Logger;
-import ru.nanit.limbo.util.UuidUtil;
+import ua.nanit.limbo.protocol.registry.State;
+import ua.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.server.LimboServer;
+import ua.nanit.limbo.server.Logger;
+import ua.nanit.limbo.util.UuidUtil;
+import ua.nanit.limbo.protocol.packets.login.PacketDisconnect;
+import ua.nanit.limbo.protocol.packets.play.PacketKeepAlive;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
diff --git a/api/src/main/java/ru/nanit/limbo/connection/GameProfile.java b/api/src/main/java/ua/nanit/limbo/connection/GameProfile.java
similarity index 96%
rename from api/src/main/java/ru/nanit/limbo/connection/GameProfile.java
rename to api/src/main/java/ua/nanit/limbo/connection/GameProfile.java
index 038041c0..b1376457 100644
--- a/api/src/main/java/ru/nanit/limbo/connection/GameProfile.java
+++ b/api/src/main/java/ua/nanit/limbo/connection/GameProfile.java
@@ -15,7 +15,7 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.connection;
+package ua.nanit.limbo.connection;
import java.util.UUID;
diff --git a/api/src/main/java/ru/nanit/limbo/connection/PacketHandler.java b/api/src/main/java/ua/nanit/limbo/connection/PacketHandler.java
similarity index 87%
rename from api/src/main/java/ru/nanit/limbo/connection/PacketHandler.java
rename to api/src/main/java/ua/nanit/limbo/connection/PacketHandler.java
index 48c6aa12..3e22a341 100644
--- a/api/src/main/java/ru/nanit/limbo/connection/PacketHandler.java
+++ b/api/src/main/java/ua/nanit/limbo/connection/PacketHandler.java
@@ -15,20 +15,20 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.connection;
+package ua.nanit.limbo.connection;
import io.netty.buffer.Unpooled;
-import ru.nanit.limbo.LimboConstants;
-import ru.nanit.limbo.protocol.packets.PacketHandshake;
-import ru.nanit.limbo.protocol.packets.login.PacketLoginPluginRequest;
-import ru.nanit.limbo.protocol.packets.login.PacketLoginPluginResponse;
-import ru.nanit.limbo.protocol.packets.login.PacketLoginStart;
-import ru.nanit.limbo.protocol.packets.status.PacketStatusPing;
-import ru.nanit.limbo.protocol.packets.status.PacketStatusRequest;
-import ru.nanit.limbo.protocol.packets.status.PacketStatusResponse;
-import ru.nanit.limbo.server.LimboServer;
-import ru.nanit.limbo.server.Logger;
-import ru.nanit.limbo.util.UuidUtil;
+import ua.nanit.limbo.LimboConstants;
+import ua.nanit.limbo.protocol.packets.PacketHandshake;
+import ua.nanit.limbo.protocol.packets.login.PacketLoginPluginRequest;
+import ua.nanit.limbo.protocol.packets.login.PacketLoginPluginResponse;
+import ua.nanit.limbo.protocol.packets.login.PacketLoginStart;
+import ua.nanit.limbo.protocol.packets.status.PacketStatusPing;
+import ua.nanit.limbo.protocol.packets.status.PacketStatusRequest;
+import ua.nanit.limbo.protocol.packets.status.PacketStatusResponse;
+import ua.nanit.limbo.server.LimboServer;
+import ua.nanit.limbo.server.Logger;
+import ua.nanit.limbo.util.UuidUtil;
import java.util.concurrent.ThreadLocalRandom;
diff --git a/api/src/main/java/ru/nanit/limbo/connection/PacketSnapshots.java b/api/src/main/java/ua/nanit/limbo/connection/PacketSnapshots.java
similarity index 88%
rename from api/src/main/java/ru/nanit/limbo/connection/PacketSnapshots.java
rename to api/src/main/java/ua/nanit/limbo/connection/PacketSnapshots.java
index 100448ba..cde4f38d 100644
--- a/api/src/main/java/ru/nanit/limbo/connection/PacketSnapshots.java
+++ b/api/src/main/java/ua/nanit/limbo/connection/PacketSnapshots.java
@@ -15,15 +15,28 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.connection;
+package ua.nanit.limbo.connection;
-import ru.nanit.limbo.LimboConstants;
-import ru.nanit.limbo.protocol.PacketSnapshot;
-import ru.nanit.limbo.protocol.packets.login.PacketLoginSuccess;
+import ua.nanit.limbo.LimboConstants;
+import ua.nanit.limbo.protocol.PacketSnapshot;
+import ua.nanit.limbo.protocol.packets.login.PacketLoginSuccess;
import ru.nanit.limbo.protocol.packets.play.*;
-import ru.nanit.limbo.server.LimboServer;
-import ru.nanit.limbo.server.data.Title;
-import ru.nanit.limbo.util.UuidUtil;
+import ua.nanit.limbo.server.LimboServer;
+import ua.nanit.limbo.server.data.Title;
+import ua.nanit.limbo.util.UuidUtil;
+import ua.nanit.limbo.protocol.packets.play.PacketBossBar;
+import ua.nanit.limbo.protocol.packets.play.PacketChatMessage;
+import ua.nanit.limbo.protocol.packets.play.PacketDeclareCommands;
+import ua.nanit.limbo.protocol.packets.play.PacketJoinGame;
+import ua.nanit.limbo.protocol.packets.play.PacketPlayerAbilities;
+import ua.nanit.limbo.protocol.packets.play.PacketPlayerInfo;
+import ua.nanit.limbo.protocol.packets.play.PacketPlayerListHeader;
+import ua.nanit.limbo.protocol.packets.play.PacketPlayerPositionAndLook;
+import ua.nanit.limbo.protocol.packets.play.PacketPluginMessage;
+import ua.nanit.limbo.protocol.packets.play.PacketTitleLegacy;
+import ua.nanit.limbo.protocol.packets.play.PacketTitleSetSubTitle;
+import ua.nanit.limbo.protocol.packets.play.PacketTitleSetTitle;
+import ua.nanit.limbo.protocol.packets.play.PacketTitleTimes;
import java.util.Collections;
import java.util.UUID;
diff --git a/api/src/main/java/ru/nanit/limbo/connection/pipeline/PacketDecoder.java b/api/src/main/java/ua/nanit/limbo/connection/pipeline/PacketDecoder.java
similarity index 89%
rename from api/src/main/java/ru/nanit/limbo/connection/pipeline/PacketDecoder.java
rename to api/src/main/java/ua/nanit/limbo/connection/pipeline/PacketDecoder.java
index 8f8ba495..43aaffb5 100644
--- a/api/src/main/java/ru/nanit/limbo/connection/pipeline/PacketDecoder.java
+++ b/api/src/main/java/ua/nanit/limbo/connection/pipeline/PacketDecoder.java
@@ -15,16 +15,16 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.connection.pipeline;
+package ua.nanit.limbo.connection.pipeline;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToMessageDecoder;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.Packet;
-import ru.nanit.limbo.protocol.registry.State;
-import ru.nanit.limbo.protocol.registry.Version;
-import ru.nanit.limbo.server.Logger;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.Packet;
+import ua.nanit.limbo.protocol.registry.State;
+import ua.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.server.Logger;
import java.util.List;
diff --git a/api/src/main/java/ru/nanit/limbo/connection/pipeline/PacketEncoder.java b/api/src/main/java/ua/nanit/limbo/connection/pipeline/PacketEncoder.java
similarity index 88%
rename from api/src/main/java/ru/nanit/limbo/connection/pipeline/PacketEncoder.java
rename to api/src/main/java/ua/nanit/limbo/connection/pipeline/PacketEncoder.java
index 4885aa8e..d3a137c0 100644
--- a/api/src/main/java/ru/nanit/limbo/connection/pipeline/PacketEncoder.java
+++ b/api/src/main/java/ua/nanit/limbo/connection/pipeline/PacketEncoder.java
@@ -15,17 +15,17 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.connection.pipeline;
+package ua.nanit.limbo.connection.pipeline;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.Packet;
-import ru.nanit.limbo.protocol.PacketSnapshot;
-import ru.nanit.limbo.protocol.registry.State;
-import ru.nanit.limbo.protocol.registry.Version;
-import ru.nanit.limbo.server.Logger;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.Packet;
+import ua.nanit.limbo.protocol.PacketSnapshot;
+import ua.nanit.limbo.protocol.registry.State;
+import ua.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.server.Logger;
public class PacketEncoder extends MessageToByteEncoder {
diff --git a/api/src/main/java/ru/nanit/limbo/connection/pipeline/VarIntByteDecoder.java b/api/src/main/java/ua/nanit/limbo/connection/pipeline/VarIntByteDecoder.java
similarity index 97%
rename from api/src/main/java/ru/nanit/limbo/connection/pipeline/VarIntByteDecoder.java
rename to api/src/main/java/ua/nanit/limbo/connection/pipeline/VarIntByteDecoder.java
index 2f9a611b..17a856a7 100644
--- a/api/src/main/java/ru/nanit/limbo/connection/pipeline/VarIntByteDecoder.java
+++ b/api/src/main/java/ua/nanit/limbo/connection/pipeline/VarIntByteDecoder.java
@@ -15,7 +15,7 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.connection.pipeline;
+package ua.nanit.limbo.connection.pipeline;
import io.netty.util.ByteProcessor;
diff --git a/api/src/main/java/ru/nanit/limbo/connection/pipeline/VarIntFrameDecoder.java b/api/src/main/java/ua/nanit/limbo/connection/pipeline/VarIntFrameDecoder.java
similarity index 96%
rename from api/src/main/java/ru/nanit/limbo/connection/pipeline/VarIntFrameDecoder.java
rename to api/src/main/java/ua/nanit/limbo/connection/pipeline/VarIntFrameDecoder.java
index 4160928c..9ee2ac12 100644
--- a/api/src/main/java/ru/nanit/limbo/connection/pipeline/VarIntFrameDecoder.java
+++ b/api/src/main/java/ua/nanit/limbo/connection/pipeline/VarIntFrameDecoder.java
@@ -15,12 +15,12 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.connection.pipeline;
+package ua.nanit.limbo.connection.pipeline;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageDecoder;
-import ru.nanit.limbo.server.Logger;
+import ua.nanit.limbo.server.Logger;
import java.util.List;
diff --git a/api/src/main/java/ru/nanit/limbo/connection/pipeline/VarIntLengthEncoder.java b/api/src/main/java/ua/nanit/limbo/connection/pipeline/VarIntLengthEncoder.java
similarity index 94%
rename from api/src/main/java/ru/nanit/limbo/connection/pipeline/VarIntLengthEncoder.java
rename to api/src/main/java/ua/nanit/limbo/connection/pipeline/VarIntLengthEncoder.java
index 940c42fd..d61fbdf3 100644
--- a/api/src/main/java/ru/nanit/limbo/connection/pipeline/VarIntLengthEncoder.java
+++ b/api/src/main/java/ua/nanit/limbo/connection/pipeline/VarIntLengthEncoder.java
@@ -15,13 +15,13 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.connection.pipeline;
+package ua.nanit.limbo.connection.pipeline;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;
-import ru.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.ByteMessage;
@ChannelHandler.Sharable
public class VarIntLengthEncoder extends MessageToByteEncoder {
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/ByteMessage.java b/api/src/main/java/ua/nanit/limbo/protocol/ByteMessage.java
similarity index 99%
rename from api/src/main/java/ru/nanit/limbo/protocol/ByteMessage.java
rename to api/src/main/java/ua/nanit/limbo/protocol/ByteMessage.java
index be4ef136..6ff3931e 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/ByteMessage.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/ByteMessage.java
@@ -15,7 +15,7 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol;
+package ua.nanit.limbo.protocol;
import io.netty.buffer.*;
import io.netty.handler.codec.DecoderException;
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/Packet.java b/api/src/main/java/ua/nanit/limbo/protocol/Packet.java
similarity index 84%
rename from api/src/main/java/ru/nanit/limbo/protocol/Packet.java
rename to api/src/main/java/ua/nanit/limbo/protocol/Packet.java
index 26638608..002c653f 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/Packet.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/Packet.java
@@ -15,11 +15,11 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol;
+package ua.nanit.limbo.protocol;
-import ru.nanit.limbo.connection.ClientConnection;
-import ru.nanit.limbo.protocol.registry.Version;
-import ru.nanit.limbo.server.LimboServer;
+import ua.nanit.limbo.connection.ClientConnection;
+import ua.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.server.LimboServer;
public interface Packet {
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/PacketIn.java b/api/src/main/java/ua/nanit/limbo/protocol/PacketIn.java
similarity index 91%
rename from api/src/main/java/ru/nanit/limbo/protocol/PacketIn.java
rename to api/src/main/java/ua/nanit/limbo/protocol/PacketIn.java
index ed451974..6d4734bd 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/PacketIn.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/PacketIn.java
@@ -15,9 +15,9 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol;
+package ua.nanit.limbo.protocol;
-import ru.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.protocol.registry.Version;
public interface PacketIn extends Packet {
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/PacketOut.java b/api/src/main/java/ua/nanit/limbo/protocol/PacketOut.java
similarity index 91%
rename from api/src/main/java/ru/nanit/limbo/protocol/PacketOut.java
rename to api/src/main/java/ua/nanit/limbo/protocol/PacketOut.java
index 9d7d9c42..de676272 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/PacketOut.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/PacketOut.java
@@ -15,9 +15,9 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol;
+package ua.nanit.limbo.protocol;
-import ru.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.protocol.registry.Version;
public interface PacketOut extends Packet {
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/PacketSnapshot.java b/api/src/main/java/ua/nanit/limbo/protocol/PacketSnapshot.java
similarity index 97%
rename from api/src/main/java/ru/nanit/limbo/protocol/PacketSnapshot.java
rename to api/src/main/java/ua/nanit/limbo/protocol/PacketSnapshot.java
index 2be6f013..9f0fe0e1 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/PacketSnapshot.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/PacketSnapshot.java
@@ -15,9 +15,9 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol;
+package ua.nanit.limbo.protocol;
-import ru.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.protocol.registry.Version;
import java.util.HashMap;
import java.util.Map;
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/packets/PacketHandshake.java b/api/src/main/java/ua/nanit/limbo/protocol/packets/PacketHandshake.java
similarity index 84%
rename from api/src/main/java/ru/nanit/limbo/protocol/packets/PacketHandshake.java
rename to api/src/main/java/ua/nanit/limbo/protocol/packets/PacketHandshake.java
index 85a23551..fc5ca52b 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/packets/PacketHandshake.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/packets/PacketHandshake.java
@@ -15,14 +15,14 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol.packets;
+package ua.nanit.limbo.protocol.packets;
-import ru.nanit.limbo.connection.ClientConnection;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.PacketIn;
-import ru.nanit.limbo.protocol.registry.State;
-import ru.nanit.limbo.protocol.registry.Version;
-import ru.nanit.limbo.server.LimboServer;
+import ua.nanit.limbo.connection.ClientConnection;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.PacketIn;
+import ua.nanit.limbo.protocol.registry.State;
+import ua.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.server.LimboServer;
public class PacketHandshake implements PacketIn {
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/packets/login/PacketDisconnect.java b/api/src/main/java/ua/nanit/limbo/protocol/packets/login/PacketDisconnect.java
similarity index 85%
rename from api/src/main/java/ru/nanit/limbo/protocol/packets/login/PacketDisconnect.java
rename to api/src/main/java/ua/nanit/limbo/protocol/packets/login/PacketDisconnect.java
index 2ba8b851..38236448 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/packets/login/PacketDisconnect.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/packets/login/PacketDisconnect.java
@@ -15,11 +15,11 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol.packets.login;
+package ua.nanit.limbo.protocol.packets.login;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.PacketOut;
-import ru.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.PacketOut;
+import ua.nanit.limbo.protocol.registry.Version;
public class PacketDisconnect implements PacketOut {
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/packets/login/PacketLoginPluginRequest.java b/api/src/main/java/ua/nanit/limbo/protocol/packets/login/PacketLoginPluginRequest.java
similarity index 88%
rename from api/src/main/java/ru/nanit/limbo/protocol/packets/login/PacketLoginPluginRequest.java
rename to api/src/main/java/ua/nanit/limbo/protocol/packets/login/PacketLoginPluginRequest.java
index 68b80c44..856a001a 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/packets/login/PacketLoginPluginRequest.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/packets/login/PacketLoginPluginRequest.java
@@ -15,12 +15,12 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol.packets.login;
+package ua.nanit.limbo.protocol.packets.login;
import io.netty.buffer.ByteBuf;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.PacketOut;
-import ru.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.PacketOut;
+import ua.nanit.limbo.protocol.registry.Version;
public class PacketLoginPluginRequest implements PacketOut {
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/packets/login/PacketLoginPluginResponse.java b/api/src/main/java/ua/nanit/limbo/protocol/packets/login/PacketLoginPluginResponse.java
similarity index 85%
rename from api/src/main/java/ru/nanit/limbo/protocol/packets/login/PacketLoginPluginResponse.java
rename to api/src/main/java/ua/nanit/limbo/protocol/packets/login/PacketLoginPluginResponse.java
index c0ab46aa..b25e7334 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/packets/login/PacketLoginPluginResponse.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/packets/login/PacketLoginPluginResponse.java
@@ -15,13 +15,13 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol.packets.login;
+package ua.nanit.limbo.protocol.packets.login;
-import ru.nanit.limbo.connection.ClientConnection;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.PacketIn;
-import ru.nanit.limbo.protocol.registry.Version;
-import ru.nanit.limbo.server.LimboServer;
+import ua.nanit.limbo.connection.ClientConnection;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.PacketIn;
+import ua.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.server.LimboServer;
public class PacketLoginPluginResponse implements PacketIn {
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/packets/login/PacketLoginStart.java b/api/src/main/java/ua/nanit/limbo/protocol/packets/login/PacketLoginStart.java
similarity index 81%
rename from api/src/main/java/ru/nanit/limbo/protocol/packets/login/PacketLoginStart.java
rename to api/src/main/java/ua/nanit/limbo/protocol/packets/login/PacketLoginStart.java
index c555a623..5a04dc3a 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/packets/login/PacketLoginStart.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/packets/login/PacketLoginStart.java
@@ -15,13 +15,13 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol.packets.login;
+package ua.nanit.limbo.protocol.packets.login;
-import ru.nanit.limbo.connection.ClientConnection;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.PacketIn;
-import ru.nanit.limbo.protocol.registry.Version;
-import ru.nanit.limbo.server.LimboServer;
+import ua.nanit.limbo.connection.ClientConnection;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.PacketIn;
+import ua.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.server.LimboServer;
public class PacketLoginStart implements PacketIn {
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/packets/login/PacketLoginSuccess.java b/api/src/main/java/ua/nanit/limbo/protocol/packets/login/PacketLoginSuccess.java
similarity index 88%
rename from api/src/main/java/ru/nanit/limbo/protocol/packets/login/PacketLoginSuccess.java
rename to api/src/main/java/ua/nanit/limbo/protocol/packets/login/PacketLoginSuccess.java
index b06d2e07..c5d74ced 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/packets/login/PacketLoginSuccess.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/packets/login/PacketLoginSuccess.java
@@ -15,11 +15,11 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol.packets.login;
+package ua.nanit.limbo.protocol.packets.login;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.PacketOut;
-import ru.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.PacketOut;
+import ua.nanit.limbo.protocol.registry.Version;
import java.util.UUID;
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketBossBar.java b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketBossBar.java
similarity index 86%
rename from api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketBossBar.java
rename to api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketBossBar.java
index 8361ad20..68201a72 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketBossBar.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketBossBar.java
@@ -15,12 +15,12 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol.packets.play;
+package ua.nanit.limbo.protocol.packets.play;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.PacketOut;
-import ru.nanit.limbo.protocol.registry.Version;
-import ru.nanit.limbo.server.data.BossBar;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.PacketOut;
+import ua.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.server.data.BossBar;
import java.util.UUID;
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketChatMessage.java b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketChatMessage.java
similarity index 91%
rename from api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketChatMessage.java
rename to api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketChatMessage.java
index 29e56094..2e1d8ad7 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketChatMessage.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketChatMessage.java
@@ -15,11 +15,11 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol.packets.play;
+package ua.nanit.limbo.protocol.packets.play;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.PacketOut;
-import ru.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.PacketOut;
+import ua.nanit.limbo.protocol.registry.Version;
import java.util.UUID;
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketDeclareCommands.java b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketDeclareCommands.java
similarity index 91%
rename from api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketDeclareCommands.java
rename to api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketDeclareCommands.java
index fa4cf6f3..b0c717d6 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketDeclareCommands.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketDeclareCommands.java
@@ -15,11 +15,11 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol.packets.play;
+package ua.nanit.limbo.protocol.packets.play;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.PacketOut;
-import ru.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.PacketOut;
+import ua.nanit.limbo.protocol.registry.Version;
import java.util.List;
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketJoinGame.java b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketJoinGame.java
similarity index 97%
rename from api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketJoinGame.java
rename to api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketJoinGame.java
index 111ed478..e338dc73 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketJoinGame.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketJoinGame.java
@@ -15,12 +15,12 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol.packets.play;
+package ua.nanit.limbo.protocol.packets.play;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.PacketOut;
-import ru.nanit.limbo.protocol.registry.Version;
-import ru.nanit.limbo.world.dimension.DimensionRegistry;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.PacketOut;
+import ua.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.world.dimension.DimensionRegistry;
public class PacketJoinGame implements PacketOut {
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketKeepAlive.java b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketKeepAlive.java
similarity index 88%
rename from api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketKeepAlive.java
rename to api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketKeepAlive.java
index a92d63a8..3c5f59be 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketKeepAlive.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketKeepAlive.java
@@ -15,11 +15,11 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol.packets.play;
+package ua.nanit.limbo.protocol.packets.play;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.Packet;
-import ru.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.Packet;
+import ua.nanit.limbo.protocol.registry.Version;
public class PacketKeepAlive implements Packet {
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketPlayerAbilities.java b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketPlayerAbilities.java
similarity index 87%
rename from api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketPlayerAbilities.java
rename to api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketPlayerAbilities.java
index 8c65bd0f..f98c1446 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketPlayerAbilities.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketPlayerAbilities.java
@@ -15,11 +15,11 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol.packets.play;
+package ua.nanit.limbo.protocol.packets.play;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.PacketOut;
-import ru.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.PacketOut;
+import ua.nanit.limbo.protocol.registry.Version;
public class PacketPlayerAbilities implements PacketOut {
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketPlayerInfo.java b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketPlayerInfo.java
similarity index 89%
rename from api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketPlayerInfo.java
rename to api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketPlayerInfo.java
index 4bb5fb37..095a9743 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketPlayerInfo.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketPlayerInfo.java
@@ -15,11 +15,11 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol.packets.play;
+package ua.nanit.limbo.protocol.packets.play;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.PacketOut;
-import ru.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.PacketOut;
+import ua.nanit.limbo.protocol.registry.Version;
import java.util.UUID;
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketPlayerListHeader.java b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketPlayerListHeader.java
similarity index 85%
rename from api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketPlayerListHeader.java
rename to api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketPlayerListHeader.java
index c4e4cb61..2fe062ca 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketPlayerListHeader.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketPlayerListHeader.java
@@ -15,11 +15,11 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol.packets.play;
+package ua.nanit.limbo.protocol.packets.play;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.PacketOut;
-import ru.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.PacketOut;
+import ua.nanit.limbo.protocol.registry.Version;
public class PacketPlayerListHeader implements PacketOut {
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketPlayerPositionAndLook.java b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketPlayerPositionAndLook.java
similarity index 91%
rename from api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketPlayerPositionAndLook.java
rename to api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketPlayerPositionAndLook.java
index c195f492..f5a6272a 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketPlayerPositionAndLook.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketPlayerPositionAndLook.java
@@ -15,11 +15,11 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol.packets.play;
+package ua.nanit.limbo.protocol.packets.play;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.PacketOut;
-import ru.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.PacketOut;
+import ua.nanit.limbo.protocol.registry.Version;
public class PacketPlayerPositionAndLook implements PacketOut {
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketPluginMessage.java b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketPluginMessage.java
similarity index 86%
rename from api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketPluginMessage.java
rename to api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketPluginMessage.java
index 1563775d..753b741a 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketPluginMessage.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketPluginMessage.java
@@ -15,11 +15,11 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol.packets.play;
+package ua.nanit.limbo.protocol.packets.play;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.PacketOut;
-import ru.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.PacketOut;
+import ua.nanit.limbo.protocol.registry.Version;
public class PacketPluginMessage implements PacketOut {
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketTitleLegacy.java b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketTitleLegacy.java
similarity index 91%
rename from api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketTitleLegacy.java
rename to api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketTitleLegacy.java
index ff105ac3..f40b85a0 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketTitleLegacy.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketTitleLegacy.java
@@ -15,12 +15,12 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol.packets.play;
+package ua.nanit.limbo.protocol.packets.play;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.PacketOut;
-import ru.nanit.limbo.protocol.registry.Version;
-import ru.nanit.limbo.server.data.Title;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.PacketOut;
+import ua.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.server.data.Title;
public class PacketTitleLegacy implements PacketOut {
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketTitleSetSubTitle.java b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketTitleSetSubTitle.java
similarity index 84%
rename from api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketTitleSetSubTitle.java
rename to api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketTitleSetSubTitle.java
index 845412ab..1800eaff 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketTitleSetSubTitle.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketTitleSetSubTitle.java
@@ -15,11 +15,11 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol.packets.play;
+package ua.nanit.limbo.protocol.packets.play;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.PacketOut;
-import ru.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.PacketOut;
+import ua.nanit.limbo.protocol.registry.Version;
public class PacketTitleSetSubTitle implements PacketOut {
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketTitleSetTitle.java b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketTitleSetTitle.java
similarity index 84%
rename from api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketTitleSetTitle.java
rename to api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketTitleSetTitle.java
index 8c327161..6961201b 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketTitleSetTitle.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketTitleSetTitle.java
@@ -15,11 +15,11 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol.packets.play;
+package ua.nanit.limbo.protocol.packets.play;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.PacketOut;
-import ru.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.PacketOut;
+import ua.nanit.limbo.protocol.registry.Version;
public class PacketTitleSetTitle implements PacketOut {
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketTitleTimes.java b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketTitleTimes.java
similarity index 87%
rename from api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketTitleTimes.java
rename to api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketTitleTimes.java
index 5e46dfff..2530d6a6 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/packets/play/PacketTitleTimes.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/packets/play/PacketTitleTimes.java
@@ -15,11 +15,11 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol.packets.play;
+package ua.nanit.limbo.protocol.packets.play;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.PacketOut;
-import ru.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.PacketOut;
+import ua.nanit.limbo.protocol.registry.Version;
public class PacketTitleTimes implements PacketOut {
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/packets/status/PacketStatusPing.java b/api/src/main/java/ua/nanit/limbo/protocol/packets/status/PacketStatusPing.java
similarity index 81%
rename from api/src/main/java/ru/nanit/limbo/protocol/packets/status/PacketStatusPing.java
rename to api/src/main/java/ua/nanit/limbo/protocol/packets/status/PacketStatusPing.java
index 684ed899..5c07b5d2 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/packets/status/PacketStatusPing.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/packets/status/PacketStatusPing.java
@@ -15,13 +15,13 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol.packets.status;
+package ua.nanit.limbo.protocol.packets.status;
-import ru.nanit.limbo.connection.ClientConnection;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.Packet;
-import ru.nanit.limbo.protocol.registry.Version;
-import ru.nanit.limbo.server.LimboServer;
+import ua.nanit.limbo.connection.ClientConnection;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.Packet;
+import ua.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.server.LimboServer;
public class PacketStatusPing implements Packet {
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/packets/status/PacketStatusRequest.java b/api/src/main/java/ua/nanit/limbo/protocol/packets/status/PacketStatusRequest.java
similarity index 79%
rename from api/src/main/java/ru/nanit/limbo/protocol/packets/status/PacketStatusRequest.java
rename to api/src/main/java/ua/nanit/limbo/protocol/packets/status/PacketStatusRequest.java
index 9865b358..6565a653 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/packets/status/PacketStatusRequest.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/packets/status/PacketStatusRequest.java
@@ -15,13 +15,13 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol.packets.status;
+package ua.nanit.limbo.protocol.packets.status;
-import ru.nanit.limbo.connection.ClientConnection;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.PacketIn;
-import ru.nanit.limbo.protocol.registry.Version;
-import ru.nanit.limbo.server.LimboServer;
+import ua.nanit.limbo.connection.ClientConnection;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.PacketIn;
+import ua.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.server.LimboServer;
public class PacketStatusRequest implements PacketIn {
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/packets/status/PacketStatusResponse.java b/api/src/main/java/ua/nanit/limbo/protocol/packets/status/PacketStatusResponse.java
similarity index 89%
rename from api/src/main/java/ru/nanit/limbo/protocol/packets/status/PacketStatusResponse.java
rename to api/src/main/java/ua/nanit/limbo/protocol/packets/status/PacketStatusResponse.java
index 3655af17..e1e2c440 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/packets/status/PacketStatusResponse.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/packets/status/PacketStatusResponse.java
@@ -15,12 +15,12 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol.packets.status;
+package ua.nanit.limbo.protocol.packets.status;
-import ru.nanit.limbo.protocol.ByteMessage;
-import ru.nanit.limbo.protocol.PacketOut;
-import ru.nanit.limbo.protocol.registry.Version;
-import ru.nanit.limbo.server.LimboServer;
+import ua.nanit.limbo.protocol.ByteMessage;
+import ua.nanit.limbo.protocol.PacketOut;
+import ua.nanit.limbo.protocol.registry.Version;
+import ua.nanit.limbo.server.LimboServer;
public class PacketStatusResponse implements PacketOut {
diff --git a/api/src/main/java/ua/nanit/limbo/protocol/registry/State.java b/api/src/main/java/ua/nanit/limbo/protocol/registry/State.java
new file mode 100644
index 00000000..ca6daa6e
--- /dev/null
+++ b/api/src/main/java/ua/nanit/limbo/protocol/registry/State.java
@@ -0,0 +1,360 @@
+/*
+ * Copyright (C) 2020 Nan1t
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package ua.nanit.limbo.protocol.registry;
+
+import ua.nanit.limbo.protocol.Packet;
+import ua.nanit.limbo.protocol.packets.PacketHandshake;
+import ru.nanit.limbo.protocol.packets.login.*;
+import ru.nanit.limbo.protocol.packets.play.*;
+import ua.nanit.limbo.protocol.packets.play.PacketBossBar;
+import ua.nanit.limbo.protocol.packets.play.PacketChatMessage;
+import ua.nanit.limbo.protocol.packets.play.PacketJoinGame;
+import ua.nanit.limbo.protocol.packets.play.PacketKeepAlive;
+import ua.nanit.limbo.protocol.packets.play.PacketPlayerPositionAndLook;
+import ua.nanit.limbo.protocol.packets.play.PacketPluginMessage;
+import ua.nanit.limbo.protocol.packets.play.PacketTitleSetSubTitle;
+import ua.nanit.limbo.protocol.packets.play.PacketTitleSetTitle;
+import ua.nanit.limbo.protocol.packets.status.PacketStatusPing;
+import ua.nanit.limbo.protocol.packets.status.PacketStatusRequest;
+import ua.nanit.limbo.protocol.packets.status.PacketStatusResponse;
+import ua.nanit.limbo.protocol.packets.login.PacketDisconnect;
+import ua.nanit.limbo.protocol.packets.login.PacketLoginPluginRequest;
+import ua.nanit.limbo.protocol.packets.login.PacketLoginPluginResponse;
+import ua.nanit.limbo.protocol.packets.login.PacketLoginStart;
+import ua.nanit.limbo.protocol.packets.login.PacketLoginSuccess;
+import ua.nanit.limbo.protocol.packets.play.PacketDeclareCommands;
+import ua.nanit.limbo.protocol.packets.play.PacketPlayerAbilities;
+import ua.nanit.limbo.protocol.packets.play.PacketPlayerInfo;
+import ua.nanit.limbo.protocol.packets.play.PacketPlayerListHeader;
+import ua.nanit.limbo.protocol.packets.play.PacketTitleLegacy;
+import ua.nanit.limbo.protocol.packets.play.PacketTitleTimes;
+
+import java.util.*;
+import java.util.function.Supplier;
+
+public enum State {
+
+ HANDSHAKING(0) {
+ {
+ serverBound.register(PacketHandshake::new,
+ map(0x00, Version.getMin(), Version.getMax())
+ );
+ }
+ },
+ STATUS(1) {
+ {
+ serverBound.register(PacketStatusRequest::new,
+ map(0x00, Version.getMin(), Version.getMax())
+ );
+ serverBound.register(PacketStatusPing::new,
+ map(0x01, Version.getMin(), Version.getMax())
+ );
+ clientBound.register(PacketStatusResponse::new,
+ map(0x00, Version.getMin(), Version.getMax())
+ );
+ clientBound.register(PacketStatusPing::new,
+ map(0x01, Version.getMin(), Version.getMax())
+ );
+ }
+ },
+ LOGIN(2) {
+ {
+ serverBound.register(PacketLoginStart::new,
+ map(0x00, Version.getMin(), Version.getMax())
+ );
+ serverBound.register(PacketLoginPluginResponse::new,
+ map(0x02, Version.getMin(), Version.getMax())
+ );
+ clientBound.register(PacketDisconnect::new,
+ map(0x00, Version.getMin(), Version.getMax())
+ );
+ clientBound.register(PacketLoginSuccess::new,
+ map(0x02, Version.getMin(), Version.getMax())
+ );
+ clientBound.register(PacketLoginPluginRequest::new,
+ map(0x04, Version.getMin(), Version.getMax())
+ );
+ }
+ },
+ PLAY(3) {
+ {
+ serverBound.register(PacketKeepAlive::new,
+ map(0x00, Version.V1_8, Version.V1_8),
+ map(0x0B, Version.V1_9, Version.V1_11_1),
+ map(0x0C, Version.V1_12, Version.V1_12),
+ map(0x0B, Version.V1_12_1, Version.V1_12_2),
+ map(0x0E, Version.V1_13, Version.V1_13_2),
+ map(0x0F, Version.V1_14, Version.V1_15_2),
+ map(0x10, Version.V1_16, Version.V1_16_4),
+ map(0x0F, Version.V1_17, Version.V1_18_2),
+ map(0x11, Version.V1_19, Version.V1_19),
+ map(0x12, Version.V1_19_1, Version.V1_19_1)
+ );
+
+ clientBound.register(PacketDeclareCommands::new,
+ map(0x11, Version.V1_13, Version.V1_14_4),
+ map(0x12, Version.V1_15, Version.V1_15_2),
+ map(0x11, Version.V1_16, Version.V1_16_1),
+ map(0x10, Version.V1_16_2, Version.V1_16_4),
+ map(0x12, Version.V1_17, Version.V1_18_2),
+ map(0x0F, Version.V1_19, Version.V1_19_1)
+ );
+ clientBound.register(PacketJoinGame::new,
+ map(0x01, Version.V1_8, Version.V1_8),
+ map(0x23, Version.V1_9, Version.V1_12_2),
+ map(0x25, Version.V1_13, Version.V1_14_4),
+ map(0x26, Version.V1_15, Version.V1_15_2),
+ map(0x25, Version.V1_16, Version.V1_16_1),
+ map(0x24, Version.V1_16_2, Version.V1_16_4),
+ map(0x26, Version.V1_17, Version.V1_18_2),
+ map(0x23, Version.V1_19, Version.V1_19),
+ map(0x25, Version.V1_19_1, Version.V1_19_1)
+ );
+ clientBound.register(PacketPluginMessage::new,
+ map(0x19, Version.V1_13, Version.V1_13_2),
+ map(0x18, Version.V1_14, Version.V1_14_4),
+ map(0x19, Version.V1_15, Version.V1_15_2),
+ map(0x18, Version.V1_16, Version.V1_16_1),
+ map(0x17, Version.V1_16_2, Version.V1_16_4),
+ map(0x18, Version.V1_17, Version.V1_18_2),
+ map(0x15, Version.V1_19, Version.V1_19),
+ map(0x16, Version.V1_19_1, Version.V1_19_1)
+ );
+ clientBound.register(PacketPlayerAbilities::new,
+ map(0x39, Version.V1_8, Version.V1_8),
+ map(0x2B, Version.V1_9, Version.V1_12),
+ map(0x2C, Version.V1_12_1, Version.V1_12_2),
+ map(0x2E, Version.V1_13, Version.V1_13_2),
+ map(0x31, Version.V1_14, Version.V1_14_4),
+ map(0x32, Version.V1_15, Version.V1_15_2),
+ map(0x31, Version.V1_16, Version.V1_16_1),
+ map(0x30, Version.V1_16_2, Version.V1_16_4),
+ map(0x32, Version.V1_17, Version.V1_18_2),
+ map(0x2F, Version.V1_19, Version.V1_19),
+ map(0x31, Version.V1_19_1, Version.V1_19_1)
+ );
+ clientBound.register(PacketPlayerPositionAndLook::new,
+ map(0x08, Version.V1_8, Version.V1_8),
+ map(0x2E, Version.V1_9, Version.V1_12),
+ map(0x2F, Version.V1_12_1, Version.V1_12_2),
+ map(0x32, Version.V1_13, Version.V1_13_2),
+ map(0x35, Version.V1_14, Version.V1_14_4),
+ map(0x36, Version.V1_15, Version.V1_15_2),
+ map(0x35, Version.V1_16, Version.V1_16_1),
+ map(0x34, Version.V1_16_2, Version.V1_16_4),
+ map(0x38, Version.V1_17, Version.V1_18_2),
+ map(0x36, Version.V1_19, Version.V1_19),
+ map(0x39, Version.V1_19_1, Version.V1_19_1)
+ );
+ clientBound.register(PacketKeepAlive::new,
+ map(0x00, Version.V1_8, Version.V1_8),
+ map(0x1F, Version.V1_9, Version.V1_12_2),
+ map(0x21, Version.V1_13, Version.V1_13_2),
+ map(0x20, Version.V1_14, Version.V1_14_4),
+ map(0x21, Version.V1_15, Version.V1_15_2),
+ map(0x20, Version.V1_16, Version.V1_16_1),
+ map(0x1F, Version.V1_16_2, Version.V1_16_4),
+ map(0x21, Version.V1_17, Version.V1_18_2),
+ map(0x1E, Version.V1_19, Version.V1_19),
+ map(0x20, Version.V1_19_1, Version.V1_19_1)
+ );
+ clientBound.register(PacketChatMessage::new,
+ map(0x02, Version.V1_8, Version.V1_8),
+ map(0x0F, Version.V1_9, Version.V1_12_2),
+ map(0x0E, Version.V1_13, Version.V1_14_4),
+ map(0x0F, Version.V1_15, Version.V1_15_2),
+ map(0x0E, Version.V1_16, Version.V1_16_4),
+ map(0x0F, Version.V1_17, Version.V1_18_2),
+ map(0x5F, Version.V1_19, Version.V1_19),
+ map(0x62, Version.V1_19_1, Version.V1_19_1)
+ );
+ clientBound.register(PacketBossBar::new,
+ map(0x0C, Version.V1_9, Version.V1_14_4),
+ map(0x0D, Version.V1_15, Version.V1_15_2),
+ map(0x0C, Version.V1_16, Version.V1_16_4),
+ map(0x0D, Version.V1_17, Version.V1_18_2),
+ map(0x0A, Version.V1_19, Version.V1_19_1)
+ );
+ clientBound.register(PacketPlayerInfo::new,
+ map(0x38, Version.V1_8, Version.V1_8),
+ map(0x2D, Version.V1_9, Version.V1_12),
+ map(0x2E, Version.V1_12_1, Version.V1_12_2),
+ map(0x30, Version.V1_13, Version.V1_13_2),
+ map(0x33, Version.V1_14, Version.V1_14_4),
+ map(0x34, Version.V1_15, Version.V1_15_2),
+ map(0x33, Version.V1_16, Version.V1_16_1),
+ map(0x32, Version.V1_16_2, Version.V1_16_4),
+ map(0x36, Version.V1_17, Version.V1_18_2),
+ map(0x34, Version.V1_19, Version.V1_19),
+ map(0x37, Version.V1_19_1, Version.V1_19_1)
+ );
+ clientBound.register(PacketTitleLegacy::new,
+ map(0x45, Version.V1_8, Version.V1_11_1),
+ map(0x47, Version.V1_12, Version.V1_12),
+ map(0x48, Version.V1_12_1, Version.V1_12_2),
+ map(0x4B, Version.V1_13, Version.V1_13_2),
+ map(0x4F, Version.V1_14, Version.V1_14_4),
+ map(0x50, Version.V1_15, Version.V1_15_2),
+ map(0x4F, Version.V1_16, Version.V1_16_4)
+ );
+ clientBound.register(PacketTitleSetTitle::new,
+ map(0x59, Version.V1_17, Version.V1_17_1),
+ map(0x5A, Version.V1_18, Version.V1_19),
+ map(0x5D, Version.V1_19_1, Version.V1_19_1)
+ );
+ clientBound.register(PacketTitleSetSubTitle::new,
+ map(0x57, Version.V1_17, Version.V1_17_1),
+ map(0x58, Version.V1_18, Version.V1_19),
+ map(0x5B, Version.V1_19_1, Version.V1_19_1)
+ );
+ clientBound.register(PacketTitleTimes::new,
+ map(0x5A, Version.V1_17, Version.V1_17_1),
+ map(0x5B, Version.V1_18, Version.V1_19),
+ map(0x5E, Version.V1_19_1, Version.V1_19_1)
+ );
+ clientBound.register(PacketPlayerListHeader::new,
+ map(0x47, Version.V1_8, Version.V1_8),
+ map(0x48, Version.V1_9, Version.V1_9_2),
+ map(0x47, Version.V1_9_4, Version.V1_11_1),
+ map(0x49, Version.V1_12, Version.V1_12),
+ map(0x4A, Version.V1_12_1, Version.V1_12_2),
+ map(0x4E, Version.V1_13, Version.V1_13_2),
+ map(0x53, Version.V1_14, Version.V1_14_4),
+ map(0x54, Version.V1_15, Version.V1_15_2),
+ map(0x53, Version.V1_16, Version.V1_16_4),
+ map(0x5E, Version.V1_17, Version.V1_17_1),
+ map(0x5F, Version.V1_18, Version.V1_18_2),
+ map(0x60, Version.V1_19, Version.V1_19),
+ map(0x63, Version.V1_19_1, Version.V1_19_1)
+ );
+ }
+ };
+
+ private static final Map STATE_BY_ID = new HashMap<>();
+
+ static {
+ for (State registry : values()) {
+ STATE_BY_ID.put(registry.stateId, registry);
+ }
+ }
+
+ private final int stateId;
+ public final ProtocolMappings serverBound = new ProtocolMappings();
+ public final ProtocolMappings clientBound = new ProtocolMappings();
+
+ State(int stateId) {
+ this.stateId = stateId;
+ }
+
+ public static State getById(int stateId) {
+ return STATE_BY_ID.get(stateId);
+ }
+
+ public static class ProtocolMappings {
+
+ private final Map registry = new HashMap<>();
+
+ public PacketRegistry getRegistry(Version version) {
+ return registry.getOrDefault(version, registry.get(Version.getMin()));
+ }
+
+ public void register(Supplier> packet, Mapping... mappings) {
+ for (Mapping mapping : mappings) {
+ for (Version ver : getRange(mapping)) {
+ PacketRegistry reg = registry.computeIfAbsent(ver, PacketRegistry::new);
+ reg.register(mapping.packetId, packet);
+ }
+ }
+ }
+
+ private Collection getRange(Mapping mapping) {
+ Version from = mapping.from;
+ Version curr = mapping.to;
+
+ if (curr == from)
+ return Collections.singletonList(from);
+
+ List versions = new LinkedList<>();
+
+ while (curr != from) {
+ versions.add(curr);
+ curr = curr.getPrev();
+ }
+
+ versions.add(from);
+
+ return versions;
+ }
+
+ }
+
+ public static class PacketRegistry {
+
+ private final Version version;
+ private final Map> packetsById = new HashMap<>();
+ private final Map, Integer> packetIdByClass = new HashMap<>();
+
+ public PacketRegistry(Version version) {
+ this.version = version;
+ }
+
+ public Version getVersion() {
+ return version;
+ }
+
+ public Packet getPacket(int packetId) {
+ Supplier> supplier = packetsById.get(packetId);
+ return supplier == null ? null : (Packet) supplier.get();
+ }
+
+ public int getPacketId(Class> packetClass) {
+ return packetIdByClass.getOrDefault(packetClass, -1);
+ }
+
+ public void register(int packetId, Supplier> supplier) {
+ packetsById.put(packetId, supplier);
+ packetIdByClass.put(supplier.get().getClass(), packetId);
+ }
+
+ }
+
+ private static class Mapping {
+
+ private final int packetId;
+ private final Version from;
+ private final Version to;
+
+ public Mapping(int packetId, Version from, Version to) {
+ this.from = from;
+ this.to = to;
+ this.packetId = packetId;
+ }
+ }
+
+ /**
+ * Map packet id to version range
+ * @param packetId Packet id
+ * @param from Minimal version (include)
+ * @param to Last version (include)
+ * @return Created mapping
+ */
+ private static Mapping map(int packetId, Version from, Version to) {
+ return new Mapping(packetId, from, to);
+ }
+
+}
diff --git a/api/src/main/java/ru/nanit/limbo/protocol/registry/Version.java b/api/src/main/java/ua/nanit/limbo/protocol/registry/Version.java
similarity index 98%
rename from api/src/main/java/ru/nanit/limbo/protocol/registry/Version.java
rename to api/src/main/java/ua/nanit/limbo/protocol/registry/Version.java
index 388ef510..6d1de8d3 100644
--- a/api/src/main/java/ru/nanit/limbo/protocol/registry/Version.java
+++ b/api/src/main/java/ua/nanit/limbo/protocol/registry/Version.java
@@ -15,7 +15,7 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.protocol.registry;
+package ua.nanit.limbo.protocol.registry;
import java.util.HashMap;
import java.util.Map;
diff --git a/api/src/main/java/ru/nanit/limbo/server/Command.java b/api/src/main/java/ua/nanit/limbo/server/Command.java
similarity index 76%
rename from api/src/main/java/ru/nanit/limbo/server/Command.java
rename to api/src/main/java/ua/nanit/limbo/server/Command.java
index 0d8a8ba7..ea4ad08b 100644
--- a/api/src/main/java/ru/nanit/limbo/server/Command.java
+++ b/api/src/main/java/ua/nanit/limbo/server/Command.java
@@ -1,4 +1,4 @@
-package ru.nanit.limbo.server;
+package ua.nanit.limbo.server;
public interface Command {
diff --git a/api/src/main/java/ru/nanit/limbo/server/CommandHandler.java b/api/src/main/java/ua/nanit/limbo/server/CommandHandler.java
similarity index 85%
rename from api/src/main/java/ru/nanit/limbo/server/CommandHandler.java
rename to api/src/main/java/ua/nanit/limbo/server/CommandHandler.java
index 03722772..d43792a5 100644
--- a/api/src/main/java/ru/nanit/limbo/server/CommandHandler.java
+++ b/api/src/main/java/ua/nanit/limbo/server/CommandHandler.java
@@ -1,4 +1,4 @@
-package ru.nanit.limbo.server;
+package ua.nanit.limbo.server;
import java.util.Collection;
diff --git a/api/src/main/java/ru/nanit/limbo/server/Connections.java b/api/src/main/java/ua/nanit/limbo/server/Connections.java
similarity index 95%
rename from api/src/main/java/ru/nanit/limbo/server/Connections.java
rename to api/src/main/java/ua/nanit/limbo/server/Connections.java
index 61e9c040..710f2006 100644
--- a/api/src/main/java/ru/nanit/limbo/server/Connections.java
+++ b/api/src/main/java/ua/nanit/limbo/server/Connections.java
@@ -15,9 +15,9 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.server;
+package ua.nanit.limbo.server;
-import ru.nanit.limbo.connection.ClientConnection;
+import ua.nanit.limbo.connection.ClientConnection;
import java.util.Collection;
import java.util.Collections;
diff --git a/api/src/main/java/ru/nanit/limbo/server/ConsoleCommandHandler.java b/api/src/main/java/ua/nanit/limbo/server/ConsoleCommandHandler.java
similarity index 87%
rename from api/src/main/java/ru/nanit/limbo/server/ConsoleCommandHandler.java
rename to api/src/main/java/ua/nanit/limbo/server/ConsoleCommandHandler.java
index dbd5bbec..a3c06f01 100644
--- a/api/src/main/java/ru/nanit/limbo/server/ConsoleCommandHandler.java
+++ b/api/src/main/java/ua/nanit/limbo/server/ConsoleCommandHandler.java
@@ -1,9 +1,9 @@
-package ru.nanit.limbo.server;
+package ua.nanit.limbo.server;
-import ru.nanit.limbo.server.commands.CmdConn;
-import ru.nanit.limbo.server.commands.CmdHelp;
-import ru.nanit.limbo.server.commands.CmdMem;
-import ru.nanit.limbo.server.commands.CmdStop;
+import ua.nanit.limbo.server.commands.CmdConn;
+import ua.nanit.limbo.server.commands.CmdHelp;
+import ua.nanit.limbo.server.commands.CmdMem;
+import ua.nanit.limbo.server.commands.CmdStop;
import java.util.*;
diff --git a/api/src/main/java/ru/nanit/limbo/server/LimboServer.java b/api/src/main/java/ua/nanit/limbo/server/LimboServer.java
similarity index 93%
rename from api/src/main/java/ru/nanit/limbo/server/LimboServer.java
rename to api/src/main/java/ua/nanit/limbo/server/LimboServer.java
index b128819c..db17cc5c 100644
--- a/api/src/main/java/ru/nanit/limbo/server/LimboServer.java
+++ b/api/src/main/java/ua/nanit/limbo/server/LimboServer.java
@@ -15,7 +15,7 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.server;
+package ua.nanit.limbo.server;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
@@ -30,12 +30,12 @@
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.util.ResourceLeakDetector;
-import ru.nanit.limbo.configuration.LimboConfig;
-import ru.nanit.limbo.connection.ClientChannelInitializer;
-import ru.nanit.limbo.connection.ClientConnection;
-import ru.nanit.limbo.connection.PacketHandler;
-import ru.nanit.limbo.connection.PacketSnapshots;
-import ru.nanit.limbo.world.dimension.DimensionRegistry;
+import ua.nanit.limbo.configuration.LimboConfig;
+import ua.nanit.limbo.connection.ClientChannelInitializer;
+import ua.nanit.limbo.connection.ClientConnection;
+import ua.nanit.limbo.connection.PacketHandler;
+import ua.nanit.limbo.connection.PacketSnapshots;
+import ua.nanit.limbo.world.dimension.DimensionRegistry;
public final class LimboServer {
private boolean running = false;
diff --git a/api/src/main/java/ru/nanit/limbo/server/Logger.java b/api/src/main/java/ua/nanit/limbo/server/Logger.java
similarity index 98%
rename from api/src/main/java/ru/nanit/limbo/server/Logger.java
rename to api/src/main/java/ua/nanit/limbo/server/Logger.java
index 14a120d0..46ab0bf0 100644
--- a/api/src/main/java/ru/nanit/limbo/server/Logger.java
+++ b/api/src/main/java/ua/nanit/limbo/server/Logger.java
@@ -15,7 +15,7 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.server;
+package ua.nanit.limbo.server;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
diff --git a/api/src/main/java/ru/nanit/limbo/server/commands/CmdConn.java b/api/src/main/java/ua/nanit/limbo/server/commands/CmdConn.java
similarity index 74%
rename from api/src/main/java/ru/nanit/limbo/server/commands/CmdConn.java
rename to api/src/main/java/ua/nanit/limbo/server/commands/CmdConn.java
index a13bb86c..95337f76 100644
--- a/api/src/main/java/ru/nanit/limbo/server/commands/CmdConn.java
+++ b/api/src/main/java/ua/nanit/limbo/server/commands/CmdConn.java
@@ -1,8 +1,8 @@
-package ru.nanit.limbo.server.commands;
+package ua.nanit.limbo.server.commands;
-import ru.nanit.limbo.server.Command;
-import ru.nanit.limbo.server.LimboServer;
-import ru.nanit.limbo.server.Logger;
+import ua.nanit.limbo.server.Command;
+import ua.nanit.limbo.server.LimboServer;
+import ua.nanit.limbo.server.Logger;
public class CmdConn implements Command {
diff --git a/api/src/main/java/ru/nanit/limbo/server/commands/CmdHelp.java b/api/src/main/java/ua/nanit/limbo/server/commands/CmdHelp.java
similarity index 80%
rename from api/src/main/java/ru/nanit/limbo/server/commands/CmdHelp.java
rename to api/src/main/java/ua/nanit/limbo/server/commands/CmdHelp.java
index 91024912..dba53d8f 100644
--- a/api/src/main/java/ru/nanit/limbo/server/commands/CmdHelp.java
+++ b/api/src/main/java/ua/nanit/limbo/server/commands/CmdHelp.java
@@ -1,10 +1,10 @@
-package ru.nanit.limbo.server.commands;
+package ua.nanit.limbo.server.commands;
import java.util.Collection;
-import ru.nanit.limbo.server.Command;
-import ru.nanit.limbo.server.LimboServer;
-import ru.nanit.limbo.server.Logger;
+import ua.nanit.limbo.server.Command;
+import ua.nanit.limbo.server.LimboServer;
+import ua.nanit.limbo.server.Logger;
public class CmdHelp implements Command {
diff --git a/api/src/main/java/ru/nanit/limbo/server/commands/CmdMem.java b/api/src/main/java/ua/nanit/limbo/server/commands/CmdMem.java
similarity index 86%
rename from api/src/main/java/ru/nanit/limbo/server/commands/CmdMem.java
rename to api/src/main/java/ua/nanit/limbo/server/commands/CmdMem.java
index c7b0ab3b..dd3bcb05 100644
--- a/api/src/main/java/ru/nanit/limbo/server/commands/CmdMem.java
+++ b/api/src/main/java/ua/nanit/limbo/server/commands/CmdMem.java
@@ -1,7 +1,7 @@
-package ru.nanit.limbo.server.commands;
+package ua.nanit.limbo.server.commands;
-import ru.nanit.limbo.server.Command;
-import ru.nanit.limbo.server.Logger;
+import ua.nanit.limbo.server.Command;
+import ua.nanit.limbo.server.Logger;
public class CmdMem implements Command {
diff --git a/api/src/main/java/ru/nanit/limbo/server/commands/CmdStop.java b/api/src/main/java/ua/nanit/limbo/server/commands/CmdStop.java
similarity index 78%
rename from api/src/main/java/ru/nanit/limbo/server/commands/CmdStop.java
rename to api/src/main/java/ua/nanit/limbo/server/commands/CmdStop.java
index 6558959e..7ccbccc6 100644
--- a/api/src/main/java/ru/nanit/limbo/server/commands/CmdStop.java
+++ b/api/src/main/java/ua/nanit/limbo/server/commands/CmdStop.java
@@ -1,6 +1,6 @@
-package ru.nanit.limbo.server.commands;
+package ua.nanit.limbo.server.commands;
-import ru.nanit.limbo.server.Command;
+import ua.nanit.limbo.server.Command;
public class CmdStop implements Command {
diff --git a/api/src/main/java/ru/nanit/limbo/server/data/BossBar.java b/api/src/main/java/ua/nanit/limbo/server/data/BossBar.java
similarity index 98%
rename from api/src/main/java/ru/nanit/limbo/server/data/BossBar.java
rename to api/src/main/java/ua/nanit/limbo/server/data/BossBar.java
index d77e89df..aeeab118 100644
--- a/api/src/main/java/ru/nanit/limbo/server/data/BossBar.java
+++ b/api/src/main/java/ua/nanit/limbo/server/data/BossBar.java
@@ -15,13 +15,13 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.server.data;
+package ua.nanit.limbo.server.data;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.spongepowered.configurate.ConfigurationNode;
import org.spongepowered.configurate.serialize.SerializationException;
import org.spongepowered.configurate.serialize.TypeSerializer;
-import ru.nanit.limbo.util.Colors;
+import ua.nanit.limbo.util.Colors;
import java.lang.reflect.Type;
diff --git a/api/src/main/java/ru/nanit/limbo/server/data/InfoForwarding.java b/api/src/main/java/ua/nanit/limbo/server/data/InfoForwarding.java
similarity index 98%
rename from api/src/main/java/ru/nanit/limbo/server/data/InfoForwarding.java
rename to api/src/main/java/ua/nanit/limbo/server/data/InfoForwarding.java
index f96869f9..e20ad7a5 100644
--- a/api/src/main/java/ru/nanit/limbo/server/data/InfoForwarding.java
+++ b/api/src/main/java/ua/nanit/limbo/server/data/InfoForwarding.java
@@ -15,7 +15,7 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.server.data;
+package ua.nanit.limbo.server.data;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.spongepowered.configurate.ConfigurationNode;
diff --git a/api/src/main/java/ru/nanit/limbo/server/data/PingData.java b/api/src/main/java/ua/nanit/limbo/server/data/PingData.java
similarity index 96%
rename from api/src/main/java/ru/nanit/limbo/server/data/PingData.java
rename to api/src/main/java/ua/nanit/limbo/server/data/PingData.java
index 435f13e4..602f5b8c 100644
--- a/api/src/main/java/ru/nanit/limbo/server/data/PingData.java
+++ b/api/src/main/java/ua/nanit/limbo/server/data/PingData.java
@@ -15,12 +15,12 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.server.data;
+package ua.nanit.limbo.server.data;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.spongepowered.configurate.ConfigurationNode;
import org.spongepowered.configurate.serialize.TypeSerializer;
-import ru.nanit.limbo.util.Colors;
+import ua.nanit.limbo.util.Colors;
import java.lang.reflect.Type;
diff --git a/api/src/main/java/ru/nanit/limbo/server/data/Title.java b/api/src/main/java/ua/nanit/limbo/server/data/Title.java
similarity index 97%
rename from api/src/main/java/ru/nanit/limbo/server/data/Title.java
rename to api/src/main/java/ua/nanit/limbo/server/data/Title.java
index 28f94cd2..190e8277 100644
--- a/api/src/main/java/ru/nanit/limbo/server/data/Title.java
+++ b/api/src/main/java/ua/nanit/limbo/server/data/Title.java
@@ -15,12 +15,12 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.server.data;
+package ua.nanit.limbo.server.data;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.spongepowered.configurate.ConfigurationNode;
import org.spongepowered.configurate.serialize.TypeSerializer;
-import ru.nanit.limbo.util.Colors;
+import ua.nanit.limbo.util.Colors;
import java.lang.reflect.Type;
diff --git a/api/src/main/java/ru/nanit/limbo/util/Colors.java b/api/src/main/java/ua/nanit/limbo/util/Colors.java
similarity index 97%
rename from api/src/main/java/ru/nanit/limbo/util/Colors.java
rename to api/src/main/java/ua/nanit/limbo/util/Colors.java
index 0a3e4375..8bf603df 100644
--- a/api/src/main/java/ru/nanit/limbo/util/Colors.java
+++ b/api/src/main/java/ua/nanit/limbo/util/Colors.java
@@ -15,7 +15,7 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.util;
+package ua.nanit.limbo.util;
public final class Colors {
diff --git a/api/src/main/java/ru/nanit/limbo/util/UuidUtil.java b/api/src/main/java/ua/nanit/limbo/util/UuidUtil.java
similarity index 97%
rename from api/src/main/java/ru/nanit/limbo/util/UuidUtil.java
rename to api/src/main/java/ua/nanit/limbo/util/UuidUtil.java
index 54019a76..377fd787 100644
--- a/api/src/main/java/ru/nanit/limbo/util/UuidUtil.java
+++ b/api/src/main/java/ua/nanit/limbo/util/UuidUtil.java
@@ -15,7 +15,7 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.util;
+package ua.nanit.limbo.util;
import java.nio.charset.StandardCharsets;
import java.util.UUID;
diff --git a/api/src/main/java/ru/nanit/limbo/world/Location.java b/api/src/main/java/ua/nanit/limbo/world/Location.java
similarity index 98%
rename from api/src/main/java/ru/nanit/limbo/world/Location.java
rename to api/src/main/java/ua/nanit/limbo/world/Location.java
index 53156094..06b629aa 100644
--- a/api/src/main/java/ru/nanit/limbo/world/Location.java
+++ b/api/src/main/java/ua/nanit/limbo/world/Location.java
@@ -15,7 +15,7 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.world;
+package ua.nanit.limbo.world;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.spongepowered.configurate.ConfigurationNode;
diff --git a/api/src/main/java/ru/nanit/limbo/world/dimension/Dimension.java b/api/src/main/java/ua/nanit/limbo/world/dimension/Dimension.java
similarity index 96%
rename from api/src/main/java/ru/nanit/limbo/world/dimension/Dimension.java
rename to api/src/main/java/ua/nanit/limbo/world/dimension/Dimension.java
index 4198688b..b55c09b5 100644
--- a/api/src/main/java/ru/nanit/limbo/world/dimension/Dimension.java
+++ b/api/src/main/java/ua/nanit/limbo/world/dimension/Dimension.java
@@ -15,7 +15,7 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.world.dimension;
+package ua.nanit.limbo.world.dimension;
import net.kyori.adventure.nbt.CompoundBinaryTag;
diff --git a/api/src/main/java/ru/nanit/limbo/world/dimension/DimensionRegistry.java b/api/src/main/java/ua/nanit/limbo/world/dimension/DimensionRegistry.java
similarity index 98%
rename from api/src/main/java/ru/nanit/limbo/world/dimension/DimensionRegistry.java
rename to api/src/main/java/ua/nanit/limbo/world/dimension/DimensionRegistry.java
index 2727e0e7..399ec60a 100644
--- a/api/src/main/java/ru/nanit/limbo/world/dimension/DimensionRegistry.java
+++ b/api/src/main/java/ua/nanit/limbo/world/dimension/DimensionRegistry.java
@@ -15,7 +15,7 @@
* along with this program. If not, see .
*/
-package ru.nanit.limbo.world.dimension;
+package ua.nanit.limbo.world.dimension;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
@@ -28,7 +28,7 @@
import net.kyori.adventure.nbt.CompoundBinaryTag;
import net.kyori.adventure.nbt.ListBinaryTag;
import net.kyori.adventure.nbt.TagStringIO;
-import ru.nanit.limbo.server.Logger;
+import ua.nanit.limbo.server.Logger;
public final class DimensionRegistry {
diff --git a/bungee/src/main/java/com/ubivashka/limbo/NanoLimboBungee.java b/bungee/src/main/java/com/ubivashka/limbo/NanoLimboBungee.java
index 9126e6c7..491117ae 100644
--- a/bungee/src/main/java/com/ubivashka/limbo/NanoLimboBungee.java
+++ b/bungee/src/main/java/com/ubivashka/limbo/NanoLimboBungee.java
@@ -11,10 +11,10 @@
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.api.plugin.Plugin;
-import ru.nanit.limbo.NanoLimbo;
-import ru.nanit.limbo.server.Command;
-import ru.nanit.limbo.server.CommandHandler;
-import ru.nanit.limbo.server.LimboServer;
+import ua.nanit.limbo.NanoLimbo;
+import ua.nanit.limbo.server.Command;
+import ua.nanit.limbo.server.CommandHandler;
+import ua.nanit.limbo.server.LimboServer;
public class NanoLimboBungee extends Plugin {
static {
diff --git a/bungee/src/main/java/com/ubivashka/limbo/command/ConnectionCountCommand.java b/bungee/src/main/java/com/ubivashka/limbo/command/ConnectionCountCommand.java
index 34aca973..78a53275 100644
--- a/bungee/src/main/java/com/ubivashka/limbo/command/ConnectionCountCommand.java
+++ b/bungee/src/main/java/com/ubivashka/limbo/command/ConnectionCountCommand.java
@@ -8,7 +8,7 @@
import revxrsal.commands.bungee.annotation.CommandPermission;
import revxrsal.commands.command.CommandActor;
import revxrsal.commands.exception.SendMessageException;
-import ru.nanit.limbo.server.LimboServer;
+import ua.nanit.limbo.server.LimboServer;
@Command("limboconn")
public class ConnectionCountCommand {
diff --git a/bungee/src/main/java/com/ubivashka/limbo/command/LampBungeeCommandHandler.java b/bungee/src/main/java/com/ubivashka/limbo/command/LampBungeeCommandHandler.java
index 4b14e638..3b02a291 100644
--- a/bungee/src/main/java/com/ubivashka/limbo/command/LampBungeeCommandHandler.java
+++ b/bungee/src/main/java/com/ubivashka/limbo/command/LampBungeeCommandHandler.java
@@ -9,10 +9,10 @@
import revxrsal.commands.CommandHandler;
import revxrsal.commands.bungee.core.BungeeHandler;
import revxrsal.commands.exception.SendMessageException;
-import ru.nanit.limbo.server.Command;
-import ru.nanit.limbo.server.LimboServer;
+import ua.nanit.limbo.server.Command;
+import ua.nanit.limbo.server.LimboServer;
-public class LampBungeeCommandHandler implements ru.nanit.limbo.server.CommandHandler {
+public class LampBungeeCommandHandler implements ua.nanit.limbo.server.CommandHandler {
private final NanoLimboBungee plugin;
private final CommandHandler commandHandler;
diff --git a/bungee/src/main/java/com/ubivashka/limbo/command/StartCommand.java b/bungee/src/main/java/com/ubivashka/limbo/command/StartCommand.java
index c5becdd4..632e716b 100644
--- a/bungee/src/main/java/com/ubivashka/limbo/command/StartCommand.java
+++ b/bungee/src/main/java/com/ubivashka/limbo/command/StartCommand.java
@@ -8,7 +8,7 @@
import revxrsal.commands.bungee.annotation.CommandPermission;
import revxrsal.commands.command.CommandActor;
import revxrsal.commands.exception.SendMessageException;
-import ru.nanit.limbo.server.LimboServer;
+import ua.nanit.limbo.server.LimboServer;
@Command("limbostart")
public class StartCommand {
diff --git a/bungee/src/main/java/com/ubivashka/limbo/command/StopCommand.java b/bungee/src/main/java/com/ubivashka/limbo/command/StopCommand.java
index 5171f0ad..5e3281c1 100644
--- a/bungee/src/main/java/com/ubivashka/limbo/command/StopCommand.java
+++ b/bungee/src/main/java/com/ubivashka/limbo/command/StopCommand.java
@@ -9,7 +9,7 @@
import revxrsal.commands.bungee.annotation.CommandPermission;
import revxrsal.commands.command.CommandActor;
import revxrsal.commands.exception.SendMessageException;
-import ru.nanit.limbo.server.LimboServer;
+import ua.nanit.limbo.server.LimboServer;
@Command("limbostop")
public class StopCommand {
diff --git a/bungee/src/main/java/com/ubivashka/limbo/config/LimboConfig.java b/bungee/src/main/java/com/ubivashka/limbo/config/LimboConfig.java
index 4fa63293..a93848bb 100644
--- a/bungee/src/main/java/com/ubivashka/limbo/config/LimboConfig.java
+++ b/bungee/src/main/java/com/ubivashka/limbo/config/LimboConfig.java
@@ -14,7 +14,7 @@
import com.ubivashka.limbo.config.model.BungeeLimboServer;
import net.md_5.bungee.api.plugin.Plugin;
-import ru.nanit.limbo.server.Logger;
+import ua.nanit.limbo.server.Logger;
public class LimboConfig {
private List servers;
diff --git a/bungee/src/main/java/com/ubivashka/limbo/config/model/BungeeLimboServer.java b/bungee/src/main/java/com/ubivashka/limbo/config/model/BungeeLimboServer.java
index 01910b71..723910bd 100644
--- a/bungee/src/main/java/com/ubivashka/limbo/config/model/BungeeLimboServer.java
+++ b/bungee/src/main/java/com/ubivashka/limbo/config/model/BungeeLimboServer.java
@@ -11,8 +11,8 @@
import com.ubivashka.limbo.NanoLimboBungee;
import com.ubivashka.limbo.config.ConfigurationUtil;
-import ru.nanit.limbo.configuration.LimboConfig;
-import ru.nanit.limbo.configuration.YamlLimboConfig;
+import ua.nanit.limbo.configuration.LimboConfig;
+import ua.nanit.limbo.configuration.YamlLimboConfig;
public class BungeeLimboServer {
private final LimboConfig limboConfig;
diff --git a/velocity/src/main/java/com/ubivashka/limbo/NanoLimboVelocity.java b/velocity/src/main/java/com/ubivashka/limbo/NanoLimboVelocity.java
index af725f34..a63f5cdb 100644
--- a/velocity/src/main/java/com/ubivashka/limbo/NanoLimboVelocity.java
+++ b/velocity/src/main/java/com/ubivashka/limbo/NanoLimboVelocity.java
@@ -16,10 +16,10 @@
import com.velocitypowered.api.proxy.ProxyServer;
import com.velocitypowered.api.proxy.server.ServerInfo;
-import ru.nanit.limbo.NanoLimbo;
-import ru.nanit.limbo.server.Command;
-import ru.nanit.limbo.server.CommandHandler;
-import ru.nanit.limbo.server.LimboServer;
+import ua.nanit.limbo.NanoLimbo;
+import ua.nanit.limbo.server.Command;
+import ua.nanit.limbo.server.CommandHandler;
+import ua.nanit.limbo.server.LimboServer;
@Plugin(id = "nanolimbovelocity", name = "NanoLimboVelocity", version = "1.0.2", authors = "Ubivashka,Nan1t")
public class NanoLimboVelocity {
diff --git a/velocity/src/main/java/com/ubivashka/limbo/command/ConnectionCountCommand.java b/velocity/src/main/java/com/ubivashka/limbo/command/ConnectionCountCommand.java
index e424f36e..3b60555c 100644
--- a/velocity/src/main/java/com/ubivashka/limbo/command/ConnectionCountCommand.java
+++ b/velocity/src/main/java/com/ubivashka/limbo/command/ConnectionCountCommand.java
@@ -8,7 +8,7 @@
import revxrsal.commands.annotation.Dependency;
import revxrsal.commands.command.CommandActor;
import revxrsal.commands.velocity.annotation.CommandPermission;
-import ru.nanit.limbo.server.LimboServer;
+import ua.nanit.limbo.server.LimboServer;
@Command("limboconn")
public class ConnectionCountCommand {
diff --git a/velocity/src/main/java/com/ubivashka/limbo/command/LampVelocityCommandHandler.java b/velocity/src/main/java/com/ubivashka/limbo/command/LampVelocityCommandHandler.java
index d55a1f46..f2eb95a9 100644
--- a/velocity/src/main/java/com/ubivashka/limbo/command/LampVelocityCommandHandler.java
+++ b/velocity/src/main/java/com/ubivashka/limbo/command/LampVelocityCommandHandler.java
@@ -9,10 +9,10 @@
import revxrsal.commands.CommandHandler;
import revxrsal.commands.velocity.core.VelocityHandler;
-import ru.nanit.limbo.server.Command;
-import ru.nanit.limbo.server.LimboServer;
+import ua.nanit.limbo.server.Command;
+import ua.nanit.limbo.server.LimboServer;
-public class LampVelocityCommandHandler implements ru.nanit.limbo.server.CommandHandler {
+public class LampVelocityCommandHandler implements ua.nanit.limbo.server.CommandHandler {
private final NanoLimboVelocity plugin;
private final CommandHandler commandHandler;
diff --git a/velocity/src/main/java/com/ubivashka/limbo/command/StartCommand.java b/velocity/src/main/java/com/ubivashka/limbo/command/StartCommand.java
index 2270c650..7a7c1e00 100644
--- a/velocity/src/main/java/com/ubivashka/limbo/command/StartCommand.java
+++ b/velocity/src/main/java/com/ubivashka/limbo/command/StartCommand.java
@@ -8,7 +8,7 @@
import revxrsal.commands.annotation.Dependency;
import revxrsal.commands.command.CommandActor;
import revxrsal.commands.velocity.annotation.CommandPermission;
-import ru.nanit.limbo.server.LimboServer;
+import ua.nanit.limbo.server.LimboServer;
@Command("limbostart")
public class StartCommand {
diff --git a/velocity/src/main/java/com/ubivashka/limbo/command/StopCommand.java b/velocity/src/main/java/com/ubivashka/limbo/command/StopCommand.java
index a9a5bdfa..95d28b3c 100644
--- a/velocity/src/main/java/com/ubivashka/limbo/command/StopCommand.java
+++ b/velocity/src/main/java/com/ubivashka/limbo/command/StopCommand.java
@@ -9,7 +9,7 @@
import revxrsal.commands.annotation.Dependency;
import revxrsal.commands.command.CommandActor;
import revxrsal.commands.velocity.annotation.CommandPermission;
-import ru.nanit.limbo.server.LimboServer;
+import ua.nanit.limbo.server.LimboServer;
@Command("limbostop")
public class StopCommand {
diff --git a/velocity/src/main/java/com/ubivashka/limbo/config/LimboConfig.java b/velocity/src/main/java/com/ubivashka/limbo/config/LimboConfig.java
index ce65647d..c6f3220b 100644
--- a/velocity/src/main/java/com/ubivashka/limbo/config/LimboConfig.java
+++ b/velocity/src/main/java/com/ubivashka/limbo/config/LimboConfig.java
@@ -14,7 +14,7 @@
import com.ubivashka.limbo.NanoLimboVelocity;
import com.ubivashka.limbo.config.model.VelocityLimboServer.VelocityLimboServerSerializer;
-import ru.nanit.limbo.server.Logger;
+import ua.nanit.limbo.server.Logger;
public class LimboConfig {
private List servers;
diff --git a/velocity/src/main/java/com/ubivashka/limbo/config/model/VelocityLimboServer.java b/velocity/src/main/java/com/ubivashka/limbo/config/model/VelocityLimboServer.java
index 27b42029..29098d34 100644
--- a/velocity/src/main/java/com/ubivashka/limbo/config/model/VelocityLimboServer.java
+++ b/velocity/src/main/java/com/ubivashka/limbo/config/model/VelocityLimboServer.java
@@ -11,8 +11,8 @@
import com.ubivashka.limbo.NanoLimboVelocity;
import com.ubivashka.limbo.config.ConfigurationUtil;
-import ru.nanit.limbo.configuration.LimboConfig;
-import ru.nanit.limbo.configuration.YamlLimboConfig;
+import ua.nanit.limbo.configuration.LimboConfig;
+import ua.nanit.limbo.configuration.YamlLimboConfig;
public class VelocityLimboServer {
private final LimboConfig limboConfig;