diff --git a/SpigotCore_14/src/de/steamwar/core/FlatteningWrapper14.java b/SpigotCore_14/src/de/steamwar/core/FlatteningWrapper14.java
index 3a28106..2092669 100644
--- a/SpigotCore_14/src/de/steamwar/core/FlatteningWrapper14.java
+++ b/SpigotCore_14/src/de/steamwar/core/FlatteningWrapper14.java
@@ -222,15 +222,15 @@ public class FlatteningWrapper14 implements FlatteningWrapper.IFlatteningWrapper
renamedLegacy.put("RECORD_12", Material.MUSIC_DISC_WAIT);
}
- private static final Reflection.FieldAccessor> scoreboardName = Reflection.getField(SWScoreboard.scoreboardObjective, Reflection.getClass("{nms}.IChatBaseComponent"), 0);
- private static final Reflection.ConstructorInvoker chatComponentConstructor = Reflection.getConstructor(Reflection.getClass("{nms}.ChatComponentText"), String.class);
+ private static final Reflection.FieldAccessor> scoreboardName = Reflection.getField(SWScoreboard.scoreboardObjective, Reflection.getClass("{nms.network.chat}.IChatBaseComponent"), 0);
+ private static final Reflection.ConstructorInvoker chatComponentConstructor = Reflection.getConstructor(Reflection.getClass("{nms.network.chat}.ChatComponentText"), String.class);
@Override
public void setScoreboardTitle(Object packet, String title) {
scoreboardName.set(packet, chatComponentConstructor.invoke(title));
}
- private static final Class> scoreActionEnum = Reflection.getClass("{nms}.ScoreboardServer$Action");
+ private static final Class> scoreActionEnum = Reflection.getClass("{nms.server}.ScoreboardServer$Action");
private static final Reflection.FieldAccessor> scoreAction = Reflection.getField(SWScoreboard.scoreboardScore, scoreActionEnum, 0);
private static final Object scoreActionChange = scoreActionEnum.getEnumConstants()[0];
diff --git a/SpigotCore_18/build.gradle b/SpigotCore_18/build.gradle
new file mode 100644
index 0000000..c6185e9
--- /dev/null
+++ b/SpigotCore_18/build.gradle
@@ -0,0 +1,50 @@
+/*
+ * 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 .
+ */
+
+plugins {
+ id 'base'
+ id 'java'
+}
+
+group 'steamwar'
+version '1.0'
+
+compileJava.options.encoding = 'UTF-8'
+
+sourceCompatibility = 1.8
+targetCompatibility = 1.8
+
+sourceSets {
+ main {
+ java {
+ srcDirs = ['src/']
+ }
+ resources {
+ srcDirs = ['src/']
+ exclude '**/*.java', '**/*.kt'
+ }
+ }
+}
+
+dependencies {
+ implementation project(":SpigotCore_Main")
+
+ compileOnly 'org.spigotmc:spigot-api:1.18-R0.1-SNAPSHOT'
+ compileOnly files("${project.rootDir}/lib/Spigot-1.18.jar")
+}
diff --git a/SpigotCore_18/settings.gradle b/SpigotCore_18/settings.gradle
new file mode 100644
index 0000000..8943e4f
--- /dev/null
+++ b/SpigotCore_18/settings.gradle
@@ -0,0 +1,20 @@
+/*
+ * This file is a part of the SteamWar software.
+ *
+ * Copyright (C) 2020 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 .
+ */
+
+rootProject.name = 'SpigotCore_18'
\ No newline at end of file
diff --git a/SpigotCore_18/src/de/steamwar/core/CraftbukkitWrapper18.java b/SpigotCore_18/src/de/steamwar/core/CraftbukkitWrapper18.java
new file mode 100644
index 0000000..594fbac
--- /dev/null
+++ b/SpigotCore_18/src/de/steamwar/core/CraftbukkitWrapper18.java
@@ -0,0 +1,42 @@
+/*
+ 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.core;
+
+import net.minecraft.network.protocol.game.ClientboundLevelChunkWithLightPacket;
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.world.level.chunk.Chunk;
+import org.bukkit.craftbukkit.v1_18_R1.CraftChunk;
+import org.bukkit.craftbukkit.v1_18_R1.entity.CraftPlayer;
+import org.bukkit.entity.Player;
+
+public class CraftbukkitWrapper18 implements CraftbukkitWrapper.ICraftbukkitWrapper {
+
+ @Override
+ public void sendChunk(Player p, int chunkX, int chunkZ) {
+ Chunk chunk = ((CraftChunk)p.getWorld().getChunkAt(chunkX, chunkZ)).getHandle();
+ ((CraftPlayer)p).getHandle().b.a(new ClientboundLevelChunkWithLightPacket(chunk, chunk.q.l_(), null, null, false));
+ }
+
+ @Override
+ @SuppressWarnings("deprecation")
+ public double[] getSpigotTPS() {
+ return MinecraftServer.getServer().recentTps;
+ }
+}
diff --git a/SpigotCore_Main/build.gradle b/SpigotCore_Main/build.gradle
index 8e751bf..faeb028 100644
--- a/SpigotCore_Main/build.gradle
+++ b/SpigotCore_Main/build.gradle
@@ -53,7 +53,10 @@ sourceSets {
}
dependencies {
- compileOnly files("${project.rootDir}/lib/Spigot-1.15.jar")
+ compileOnly 'org.spigotmc:spigot-api:1.18-R0.1-SNAPSHOT'
+ compileOnly 'io.netty:netty-all:4.1.68.Final'
+ compileOnly 'com.mojang:authlib:1.5.25'
+ compileOnly 'mysql:mysql-connector-java:5.1.49'
compileOnly files("${project.rootDir}/lib/WorldEdit-1.12.jar")
implementation 'net.wesjd:anvilgui:1.4.0-SNAPSHOT'
diff --git a/SpigotCore_Main/src/SpigotCore.properties b/SpigotCore_Main/src/SpigotCore.properties
index 28628df..acb3749 100644
--- a/SpigotCore_Main/src/SpigotCore.properties
+++ b/SpigotCore_Main/src/SpigotCore.properties
@@ -17,47 +17,83 @@
# along with this program. If not, see .
#
-SCHEM_SELECTOR_TITLE={0} auswählen: {1}
-SCHEM_SELECTOR_BACK=§eZurück
-SCHEM_SELECTOR_DIR=§9Ordner
-SCHEM_SELECTOR_RANK=§8Rang {0}
-SCHEM_SELECTOR_OWN=§7Eigene Schematics
-SCHEM_SELECTOR_PUB=§7Public Schematics
-SCHEM_SELECTOR_SEL_DIR=§7Ordner auswählen
-SCHEM_SELECTOR_NEW_DIR=§7Neuer Ordner
-SCHEM_SELECTOR_FILTER=§7Filter
-SCHEM_SELECTOR_SORTING=§7Sortierung
-SCHEM_SELECTOR_SORTING_CURRENT=§7Aktuell: §e{0}
+SCHEM_SELECTOR_TITLE={0} auswählen: {1}
+SCHEM_SELECTOR_BACK=§eZurück
+SCHEM_SELECTOR_DIR=§9Ordner
+SCHEM_SELECTOR_RANK=§8Rang {0}
+SCHEM_SELECTOR_OWN=§7Eigene Schematics
+SCHEM_SELECTOR_PUB=§7Public Schematics
+SCHEM_SELECTOR_SEL_DIR=§7Ordner auswählen
+SCHEM_SELECTOR_NEW_DIR=§7Neuer Ordner
+SCHEM_SELECTOR_FILTER=§7Filter
+SCHEM_SELECTOR_SORTING=§7Sortierung
+SCHEM_SELECTOR_SORTING_CURRENT=§7Aktuell: §e{0}
SCHEM_SELECTOR_SORTING_NAME=Name
SCHEM_SELECTOR_SORTING_TYPE=Schematic-Typ
SCHEM_SELECTOR_SORTING_UPDATE=Letztes Update
-SCHEM_SELECTOR_SORTING_DIRECTION=§7Richtung: §e{0}
+SCHEM_SELECTOR_SORTING_DIRECTION=§7Richtung: §e{0}
SCHEM_SELECTOR_SORTING_ASC=Aufsteigend
SCHEM_SELECTOR_SORTING_DSC=Absteigend
-SCHEM_SELECTOR_ITEM_NAME=§e{0}
-SCHEM_SELECTOR_ITEM_NAME_FILTER=§7{0}
-SCHEM_SELECTOR_ITEM_REPLACE=§e{0}§7
-SCHEM_SELECTOR_ITEM_LORE_TYPE=§7{0}
+SCHEM_SELECTOR_ITEM_NAME=§e{0}
+SCHEM_SELECTOR_ITEM_NAME_FILTER=§7{0}
+SCHEM_SELECTOR_ITEM_REPLACE=§e{0}§7
+SCHEM_SELECTOR_ITEM_LORE_TYPE=§7{0}
SCHEM_SELECTOR_CREATE_DIR_TITLE=Ordner erstellen
SCHEM_SELECTOR_FILTER_TITLE=Filter
SCHEM_SELECTOR_FILTER_ENTER_NAME=Name eingeben
-SCHEM_SELECTOR_FILTER_NAME=§7Nach Namen suchen...
-SCHEM_SELECTOR_FILTER_NAME_SEARCH=§7Suchbegriff: §e{0}
+SCHEM_SELECTOR_FILTER_NAME=§7Nach Namen suchen...
+SCHEM_SELECTOR_FILTER_NAME_SEARCH=§7Suchbegriff: §e{0}
SCHEM_SELECTOR_FILTER_ENTER_OWNER=Besitzer eingeben
-SCHEM_SELECTOR_FILTER_OWNER=§7Nach Besitzer suchen...
-SCHEM_SELECTOR_FILTER_OWNER_SEARCH=§7Besitzer: §e{0}
-SCHEM_SELECTOR_FILTER_SEL_TYPE=Typ wählen...
-SCHEM_SELECTOR_FILTER_TYPE=§7Nach Typ filtern...
-SCHEM_SELECTOR_FILTER_TYPE_SEARCH=§7Typ: §e{0}
-SCHEM_SELECTOR_FILTER_MAT=§7Nach Item filtern...
-SCHEM_SELECTOR_FILTER_MAT_SEARCH=§7Item: §e{0}
-SCHEM_SELECTOR_CANCEL=§eAbbrechen
-SCHEM_SELECTOR_GO=§eSuchen...
+SCHEM_SELECTOR_FILTER_OWNER=§7Nach Besitzer suchen...
+SCHEM_SELECTOR_FILTER_OWNER_SEARCH=§7Besitzer: §e{0}
+SCHEM_SELECTOR_FILTER_SEL_TYPE=Typ wählen...
+SCHEM_SELECTOR_FILTER_TYPE=§7Nach Typ filtern...
+SCHEM_SELECTOR_FILTER_TYPE_SEARCH=§7Typ: §e{0}
+SCHEM_SELECTOR_FILTER_MAT=§7Nach Item filtern...
+SCHEM_SELECTOR_FILTER_MAT_SEARCH=§7Item: §e{0}
+SCHEM_SELECTOR_CANCEL=§eAbbrechen
+SCHEM_SELECTOR_GO=§eSuchen...
SCHEM_SELECTOR_SCHEMATIC=Schematic
SCHEM_SELECTOR_DIRECTORY=Ordner
SCHEM_SELECTOR_SCHEMATIC_NODE=Schematic/Ordner
-MATERIAL_SELECTOR_TITLE=Material auswählen
\ No newline at end of file
+MATERIAL_SELECTOR_TITLE=Material auswählen
+
+BAN_TEAM={0} §e{1} §7wurde von §e{2} {3} §e§lgebannt§8. §7Grund§8: §f{4}
+BAN_PERMA=§7Du bist §epermanent §e§lgebannt§8. §7Grund§8: §e{0}
+BAN_UNTIL=§7Du bist §ebis zum {0} §e§lgebannt§8. §7Grund§8: §e{1}
+UNBAN_ERROR=§cDer Spieler ist nicht gebannt.
+UNBAN=§7Du hast §e{0} §e§lentbannt.
+
+MUTE_TEAM={0} §e{1} §7wurde von §e{2} {3} §e§lgemuted§8. §7Grund§8: §f{4}
+MUTE_PERMA=§7Du bist §epermanent §e§lgemuted§8. §7Grund§8: §e{0}
+MUTE_UNTIL=§7Du bist §ebis zum {0} §e§lgemuted§8. §7Grund§8: §e{1}
+UNMUTE_ERROR=§cDer Spieler ist nicht gemuted.
+UNMUTE=§7Du hast §e{0} §e§lentmuted.
+
+NOSCHEMRECEIVING_TEAM={0} §e{1} §7wurde von §e{2} {3} §7vom §e§lSchematicerhalten ausgeschlossen§8. §7Grund§8: §f{4}
+NOSCHEMRECEIVING_PERMA=§7Du bist §epermanent §7vom Erhalten von §e§lSchematics ausgeschlossen§8. §7Grund§8: §e{0}
+NOSCHEMRECEIVING_UNTIL=§7Du bist §ebis zum {0} §7vom Erhalten von §e§lSchematics ausgeschlossen§8. §7Grund§8: §e{1}
+UNNOSCHEMRECEIVING_ERROR=§cDer Spieler ist nicht vom Erhalten von Schematics ausgeschlossen.
+UNNOSCHEMRECEIVING=§e{0} §7darf nun wieder §e§lSchematics erhalten§8.
+
+NOSCHEMSHARING_TEAM={0} §e{1} §7wurde von §e{2} {3} §7vom §e§lSchematicverteilen ausgeschlossen§8. §7Grund§8: §f{4}
+NOSCHEMSHARING_PERMA=§7Du bist §epermanent §7vom §e§lVerteilen von Schematics§7 ausgeschlossen§8. §7Grund§8: §e{0}
+NOSCHEMSHARING_UNTIL=§7Du bist §ebis zum {0} §7vom §e§lVerteilen von Schematics§7 ausgeschlossen§8. §7Grund§8: §e{1}
+UNNOSCHEMSHARING_ERROR=§cDer Spieler ist nicht vom Verteilen von Schematics ausgeschlossen.
+UNNOSCHEMSHARING=§e{0} §7darf nun wieder §e§lSchematics verteilen§8.
+
+NOSCHEMSUBMITTING_TEAM={0} §e{1} §7wurde von §e{2} {3} §7vom §e§lSchematiceinsenden ausgeschlossen§8. §7Grund§8: §f{4}
+NOSCHEMSUBMITTING_PERMA=§7Du bist §epermanent §7vom §e§lEinsenden von Schematics§7 ausgeschlossen§8. §7Grund§8: §e{0}
+NOSCHEMSUBMITTING_UNTIL=§7Du bist §ebis zum {0} §7vom §e§lEinsenden von Schematics§7 ausgeschlossen§8. §7Grund§8: §e{1}
+UNNOSCHEMSUBMITTING_ERROR=§cDer Spieler ist nicht vom Einsenden von Schematics ausgeschlossen.
+UNNOSCHEMSUBMITTING=§e{0} §7darf nun wieder §e§lSchematis einsenden§8.
+
+NODEVSERVER_TEAM={0} §e{1} §7hat §e{2} §7mit Grund §f{4}§7 zu generft und hat daher §e§lDevserververbot §7erhalten§8, §e{3}
+NODEVSERVER_PERMA=§7Du bist §epermanent §7vom §e§lDevserver §7ausgeschlossen§8. §7Grund§8: §e{0}
+NODEVSERVER_UNTIL=§7Du bist §ebis zum {0} §7vom §e§lDevserver §7ausgeschlossen§8. §7Grund§8: §e{1}
+UNNODEVSERVER_ERROR=§cDer Spieler ist nicht vom Devserver ausgeschlossen.
+UNNODEVSERVER=§e{0} §7darf nun wieder dem §e§lDevserver beitreten§8.
\ No newline at end of file
diff --git a/SpigotCore_Main/src/com/comphenix/tinyprotocol/Reflection.java b/SpigotCore_Main/src/com/comphenix/tinyprotocol/Reflection.java
index 1e18232..1742df4 100644
--- a/SpigotCore_Main/src/com/comphenix/tinyprotocol/Reflection.java
+++ b/SpigotCore_Main/src/com/comphenix/tinyprotocol/Reflection.java
@@ -1,5 +1,6 @@
package com.comphenix.tinyprotocol;
+import de.steamwar.core.Core;
import org.bukkit.Bukkit;
import java.lang.reflect.Constructor;
@@ -25,7 +26,7 @@ public final class Reflection {
* @param arguments - the arguments to pass to the constructor.
* @return The constructed object.
*/
- public Object invoke(Object... arguments);
+ Object invoke(Object... arguments);
}
/**
@@ -39,7 +40,7 @@ public final class Reflection {
* @param arguments - the arguments to pass to the method.
* @return The return value, or NULL if is void.
*/
- public Object invoke(Object target, Object... arguments);
+ Object invoke(Object target, Object... arguments);
}
/**
@@ -54,7 +55,7 @@ public final class Reflection {
* @param target - the target object, or NULL for a static field.
* @return The value of the field.
*/
- public T get(Object target);
+ T get(Object target);
/**
* Set the content of a field.
@@ -62,7 +63,7 @@ public final class Reflection {
* @param target - the target object, or NULL for a static field.
* @param value - the new value of the field.
*/
- public void set(Object target, Object value);
+ void set(Object target, Object value);
/**
* Determine if the given object has this field.
@@ -70,16 +71,16 @@ public final class Reflection {
* @param target - the object to test.
* @return TRUE if it does, FALSE otherwise.
*/
- public boolean hasField(Object target);
+ boolean hasField(Object target);
}
// Deduce the net.minecraft.server.v* package
- private static String OBC_PREFIX = Bukkit.getServer().getClass().getPackage().getName();
- private static String NMS_PREFIX = OBC_PREFIX.replace("org.bukkit.craftbukkit", "net.minecraft.server");
- private static String VERSION = OBC_PREFIX.replace("org.bukkit.craftbukkit", "").replace(".", "");
+ private static final String OBC_PREFIX = Bukkit.getServer().getClass().getPackage().getName();
+ private static final String NMS_PREFIX = OBC_PREFIX.replace("org.bukkit.craftbukkit", "net.minecraft.server");
+ private static final String VERSION = OBC_PREFIX.replace("org.bukkit.craftbukkit", "").replace(".", "");
// Variable replacement
- private static Pattern MATCH_VARIABLE = Pattern.compile("\\{([^\\}]+)\\}");
+ private static final Pattern MATCH_VARIABLE = Pattern.compile("\\{([^\\}]+)\\}");
private Reflection() {
// Seal class
@@ -148,7 +149,7 @@ public final class Reflection {
try {
return (T) field.get(target);
} catch (IllegalAccessException e) {
- throw new RuntimeException("Cannot access reflection.", e);
+ throw new IllegalArgumentException("Cannot access reflection.", e);
}
}
@@ -157,7 +158,7 @@ public final class Reflection {
try {
field.set(target, value);
} catch (IllegalAccessException e) {
- throw new RuntimeException("Cannot access reflection.", e);
+ throw new IllegalArgumentException("Cannot access reflection.", e);
}
}
@@ -220,17 +221,12 @@ public final class Reflection {
&& Arrays.equals(method.getParameterTypes(), params)) {
method.setAccessible(true);
- return new MethodInvoker() {
-
- @Override
- public Object invoke(Object target, Object... arguments) {
- try {
- return method.invoke(target, arguments);
- } catch (Exception e) {
- throw new RuntimeException("Cannot invoke method " + method, e);
- }
+ return (target, arguments) -> {
+ try {
+ return method.invoke(target, arguments);
+ } catch (Exception e) {
+ throw new IllegalArgumentException("Cannot invoke method " + method, e);
}
-
};
}
}
@@ -267,17 +263,12 @@ public final class Reflection {
if (Arrays.equals(constructor.getParameterTypes(), params)) {
constructor.setAccessible(true);
- return new ConstructorInvoker() {
-
- @Override
- public Object invoke(Object... arguments) {
- try {
- return constructor.newInstance(arguments);
- } catch (Exception e) {
- throw new RuntimeException("Cannot invoke constructor " + constructor, e);
- }
+ return arguments -> {
+ try {
+ return constructor.newInstance(arguments);
+ } catch (Exception e) {
+ throw new IllegalArgumentException("Cannot invoke constructor " + constructor, e);
}
-
};
}
}
@@ -290,8 +281,7 @@ public final class Reflection {
*
* This is useful when looking up fields by a NMS or OBC type.
*
- *
- * @see {@link #getClass()} for more information.
+ *
* @param lookupName - the class name with variables.
* @return The class.
*/
@@ -330,40 +320,10 @@ public final class Reflection {
* @throws IllegalArgumentException If a variable or class could not be found.
*/
public static Class> getClass(String lookupName) {
- return getCanonicalClass(expandVariables(lookupName));
- }
-
- /**
- * Retrieve a class in the net.minecraft.server.VERSION.* package.
- *
- * @param name - the name of the class, excluding the package.
- * @throws IllegalArgumentException If the class doesn't exist.
- */
- public static Class> getMinecraftClass(String name) {
- return getCanonicalClass(NMS_PREFIX + "." + name);
- }
-
- /**
- * Retrieve a class in the org.bukkit.craftbukkit.VERSION.* package.
- *
- * @param name - the name of the class, excluding the package.
- * @throws IllegalArgumentException If the class doesn't exist.
- */
- public static Class> getCraftBukkitClass(String name) {
- return getCanonicalClass(OBC_PREFIX + "." + name);
- }
-
- /**
- * Retrieve a class by its canonical name.
- *
- * @param canonicalName - the canonical name.
- * @return The class.
- */
- private static Class> getCanonicalClass(String canonicalName) {
try {
- return Class.forName(canonicalName);
+ return Class.forName(expandVariables(lookupName));
} catch (ClassNotFoundException e) {
- throw new IllegalArgumentException("Cannot find " + canonicalName, e);
+ throw new IllegalArgumentException("Cannot find " + expandVariables(lookupName), e);
}
}
@@ -379,14 +339,17 @@ public final class Reflection {
while (matcher.find()) {
String variable = matcher.group(1);
- String replacement = "";
+ String replacement;
// Expand all detected variables
- if ("nms".equalsIgnoreCase(variable))
- replacement = NMS_PREFIX;
- else if ("obc".equalsIgnoreCase(variable))
+ if (variable.startsWith("nms")) {
+ if(Core.getVersion() >= 17)
+ replacement = "net.minecraft" + variable.substring(3);
+ else
+ replacement = NMS_PREFIX;
+ } else if ("obc".equals(variable))
replacement = OBC_PREFIX;
- else if ("version".equalsIgnoreCase(variable))
+ else if ("version".equals(variable))
replacement = VERSION;
else
throw new IllegalArgumentException("Unknown variable: " + variable);
@@ -401,6 +364,7 @@ public final class Reflection {
return output.toString();
}
+ @SuppressWarnings("deprecation")
public static Object newInstance(Class> clazz) {
try {
return clazz.newInstance();
diff --git a/SpigotCore_Main/src/com/comphenix/tinyprotocol/TinyProtocol.java b/SpigotCore_Main/src/com/comphenix/tinyprotocol/TinyProtocol.java
index 3d2e41a..c526594 100644
--- a/SpigotCore_Main/src/com/comphenix/tinyprotocol/TinyProtocol.java
+++ b/SpigotCore_Main/src/com/comphenix/tinyprotocol/TinyProtocol.java
@@ -5,6 +5,7 @@ import com.comphenix.tinyprotocol.Reflection.MethodInvoker;
import com.google.common.collect.Lists;
import com.google.common.collect.MapMaker;
import com.mojang.authlib.GameProfile;
+import de.steamwar.core.Core;
import io.netty.channel.*;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
@@ -28,72 +29,88 @@ import java.util.logging.Level;
*
* @author Kristian
*/
-public abstract class TinyProtocol {
+public class TinyProtocol {
private static final AtomicInteger ID = new AtomicInteger(0);
// Used in order to lookup a channel
private static final MethodInvoker getPlayerHandle = Reflection.getMethod("{obc}.entity.CraftPlayer", "getHandle");
- private static final FieldAccessor