()
| 37 | private static Impl impl; |
| 38 | |
| 39 | public static void init() { |
| 40 | version = Bukkit.getBukkitVersion().split("-")[0]; |
| 41 | impl = VERSIONS.getOrDefault(version(), new NMS_Default()); |
| 42 | |
| 43 | if (impl instanceof NMS_Default) { |
| 44 | Adapt.error("Failed to bind NMS for Version " + version() + "!"); |
| 45 | } else { |
| 46 | Adapt.info("Successfully bound NMS for Version " + version() + "."); |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | public static String version() { |
| 51 | return version; |