replaced version-number-check with failsafe ClassNotFound-check
Fixes Ticket 1 :)
This commit is contained in:
parent
8c719cccdb
commit
dd87aef066
1 changed files with 5 additions and 2 deletions
|
@ -21,7 +21,6 @@ import java.util.logging.Logger;
|
||||||
import org.bukkit.plugin.PluginDescriptionFile;
|
import org.bukkit.plugin.PluginDescriptionFile;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
import static de.jaschastarke.minecraft.utils.Util.versionCompare;
|
|
||||||
import static de.jaschastarke.minecraft.utils.Locale.L;
|
import static de.jaschastarke.minecraft.utils.Locale.L;
|
||||||
import de.jaschastarke.minecraft.utils.Locale;
|
import de.jaschastarke.minecraft.utils.Locale;
|
||||||
|
|
||||||
|
@ -44,7 +43,11 @@ public class LimitedCreativeCore extends JavaPlugin {
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
plugin = this;
|
plugin = this;
|
||||||
config = new Configuration(this);
|
config = new Configuration(this);
|
||||||
serializeFallBack = versionCompare(getServer().getBukkitVersion().replaceAll("-.*$", ""), "1.1") < 0;
|
try {
|
||||||
|
Class.forName("org.bukkit.configuration.file.YamlConstructor", false, getClassLoader());
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
serializeFallBack = true;
|
||||||
|
}
|
||||||
|
|
||||||
new Locale(this);
|
new Locale(this);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue