diff --git a/BauSystem_18/src/de/steamwar/bausystem/utils/ProtocolWrapper18.java b/BauSystem_18/src/de/steamwar/bausystem/utils/ProtocolWrapper18.java index c82f70f2..962b8181 100644 --- a/BauSystem_18/src/de/steamwar/bausystem/utils/ProtocolWrapper18.java +++ b/BauSystem_18/src/de/steamwar/bausystem/utils/ProtocolWrapper18.java @@ -22,7 +22,6 @@ package de.steamwar.bausystem.utils; import com.comphenix.tinyprotocol.Reflection; import com.mojang.authlib.GameProfile; import de.steamwar.bausystem.features.util.NoClipCommand; -import de.steamwar.sql.Fight; public class ProtocolWrapper18 implements ProtocolWrapper { diff --git a/BauSystem_19/src/de/steamwar/bausystem/utils/ProtocolWrapper19.java b/BauSystem_19/src/de/steamwar/bausystem/utils/ProtocolWrapper19.java new file mode 100644 index 00000000..3a21ab08 --- /dev/null +++ b/BauSystem_19/src/de/steamwar/bausystem/utils/ProtocolWrapper19.java @@ -0,0 +1,33 @@ +/* + This file is a part of the SteamWar software. + + Copyright (C) 2021 SteamWar.de-Serverteam + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero 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 Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ + +package de.steamwar.bausystem.utils; + +import com.comphenix.tinyprotocol.Reflection; +import com.mojang.authlib.GameProfile; +import de.steamwar.bausystem.features.util.NoClipCommand; + +public class ProtocolWrapper19 implements ProtocolWrapper { + + private static final Reflection.ConstructorInvoker playerInfoDataConstructor = Reflection.getConstructor(NoClipCommand.playerInfoDataClass, GameProfile.class, int.class, NoClipCommand.enumGamemode, NoClipCommand.iChatBaseComponent, Reflection.getClass("net.minecraft.world.entity.player.ProfilePublicKey$a")); + @Override + public Object playerInfoDataConstructor(Object packet, GameProfile profile, Object mode) { + return playerInfoDataConstructor.invoke(profile, 0, mode, null, null); + } +}