mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 20:00:46 +00:00
Forcibly load OfflinePlayer class per @Byteflux's suggestions to prevent LinkageError
This commit is contained in:
parent
419d2d8282
commit
9c986aa25f
1 changed files with 11 additions and 0 deletions
|
@ -103,6 +103,15 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials {
|
||||||
super(new JavaPluginLoader(server), new PluginDescriptionFile("Essentials", "", "com.earth2me.essentials.Essentials"), null, null);
|
super(new JavaPluginLoader(server), new PluginDescriptionFile("Essentials", "", "com.earth2me.essentials.Essentials"), null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
public void forceLoadClasses() {
|
||||||
|
try {
|
||||||
|
Class.forName(OfflinePlayer.class.getName());
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ISettings getSettings() {
|
public ISettings getSettings() {
|
||||||
return settings;
|
return settings;
|
||||||
|
@ -165,6 +174,8 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
forceLoadClasses();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final EssentialsUpgrade upgrade = new EssentialsUpgrade(this);
|
final EssentialsUpgrade upgrade = new EssentialsUpgrade(this);
|
||||||
upgrade.beforeSettings();
|
upgrade.beforeSettings();
|
||||||
|
|
Loading…
Reference in a new issue