feat: remove unstable
This commit is contained in:
parent
13d2b6f497
commit
f31868ccf6
3 changed files with 0 additions and 17 deletions
|
@ -1,9 +1,7 @@
|
||||||
package net.artelnatif.nicko.impl;
|
package net.artelnatif.nicko.impl;
|
||||||
|
|
||||||
import net.artelnatif.nicko.bukkit.NickoBukkit;
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
|
||||||
import java.lang.annotation.Annotation;
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
|
||||||
public class InternalsProvider {
|
public class InternalsProvider {
|
||||||
|
@ -16,13 +14,6 @@ public class InternalsProvider {
|
||||||
final String fullClassName = packageName + "." + bukkitVersion;
|
final String fullClassName = packageName + "." + bukkitVersion;
|
||||||
final Class<?> clazz = Class.forName(fullClassName);
|
final Class<?> clazz = Class.forName(fullClassName);
|
||||||
internals = (Internals) clazz.getConstructors()[0].newInstance();
|
internals = (Internals) clazz.getConstructors()[0].newInstance();
|
||||||
for (Annotation annotation : clazz.getDeclaredAnnotations()) {
|
|
||||||
if (annotation instanceof Unstable) {
|
|
||||||
NickoBukkit.getInstance().getLogger().warning("Version " + Bukkit.getVersion() + " has been marked as unstable.");
|
|
||||||
NickoBukkit.getInstance().getLogger().warning("Nicko might not work at all until the version has been tested extensively.");
|
|
||||||
NickoBukkit.getInstance().getLogger().warning("Proceed with caution!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (InvocationTargetException | ClassNotFoundException | InstantiationException | IllegalAccessException |
|
} catch (InvocationTargetException | ClassNotFoundException | InstantiationException | IllegalAccessException |
|
||||||
ClassCastException exception) {
|
ClassCastException exception) {
|
||||||
internals = null;
|
internals = null;
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
package net.artelnatif.nicko.impl;
|
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
@Target(ElementType.TYPE)
|
|
||||||
public @interface Unstable { }
|
|
|
@ -26,7 +26,6 @@ import org.bukkit.event.player.PlayerTeleportEvent;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@Unstable
|
|
||||||
public class v1_19_R2 implements Internals {
|
public class v1_19_R2 implements Internals {
|
||||||
@Override
|
@Override
|
||||||
public void updateSelf(Player player) {
|
public void updateSelf(Player player) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue