private static NMSVersion extractCurrentVersion() { String nmsVersionName = VersionUtils.extractNMSVersion(); if (nmsVersionName != null) { try { return valueOf(nmsVersionName); } catch (IllegalArgumentException e) { return null; } } else { return null; } }
public static void logDebug(Level level, String msg, Throwable thrown) { if (debug) { log(level, "[Debug] " + msg, thrown); } }
public static boolean isBetween(NMSVersion from, NMSVersion to) { return from.ordinal() <= getCurrent().ordinal() && getCurrent().ordinal() <= to.ordinal(); }
public static boolean isVersionBetweenEqual(String reference, String lowest, String highest) { return isVersionGreaterEqual(reference, lowest) && isVersionLessEqual(reference, highest); }
public static String join(String[] elements, String separator) { return join(elements, separator, 0, elements.length); }
private static double getArmorStandAloneOffset() { if (NMSVersion.getCurrent() == NMSVersion.v1_8_R1) { // When the NBT tag "Marker" was not implemented return -1.25; } else { return -0.29; } }
public static void logDebug(Level level, String msg) { logDebug(level, msg, null); }
public PluginHologram(Location source, Plugin plugin) { super(source); Validator.notNull(plugin, "plugin"); this.plugin = plugin; }
public static boolean isVersionGreaterEqual(String reference, String thanWhat) { return compare(reference, thanWhat) >= 0; }
@Override public void onUpdateFound(final String newVersion) { HolographicDisplays.newVersion = newVersion; ConsoleLogger.log(Level.INFO, "Found a new version available: " + newVersion); ConsoleLogger.log(Level.INFO, "Download it on Bukkit Dev:"); ConsoleLogger.log(Level.INFO, "dev.bukkit.org/bukkit-plugins/holographic-displays"); } });
public static boolean isGreaterEqualThan(NMSVersion other) { return getCurrent().ordinal() >= other.ordinal(); }
private static double getArmorStandWithSlimeOffset() { if (NMSVersion.getCurrent() == NMSVersion.v1_8_R1) { // When the NBT tag "Marker" was not implemented return -1.48; } else { return 0; } }
public CraftVisibilityManager(CraftHologram hologram) { Validator.notNull(hologram, "hologram"); this.hologram = hologram; this.visibleByDefault = true; }
public static boolean isVersionLessEqual(String reference, String thanWhat) { return compare(reference, thanWhat) <= 0; }
public static void log(Level level, String msg) { log(level, msg, null); }
private static double getArmorStandWithItemOffset() { if (NMSVersion.getCurrent() == NMSVersion.v1_8_R1) { // When the NBT tag "Marker" was not implemented return -1.48; } else { return 0; } }
protected CraftHologramLine(double height, CraftHologram parent) { Validator.notNull(parent, "parent hologram"); this.height = height; this.parent = parent; }
public void unregisterPlaceholders(Plugin plugin) { Validator.notNull(plugin, "plugin"); for (String placeholder : getRegisteredPlaceholders(plugin)) { unregisterPlaceholder(plugin, placeholder); } }