mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 03:52:45 +01:00
Fixed NPE on unloading plugins
By: Nathan Adams <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
ef674c0b83
commit
f22a79981c
1 changed files with 1 additions and 1 deletions
|
@ -242,7 +242,7 @@ public class JavaPluginLoader implements PluginLoader {
|
|||
public void removeClass(String name) {
|
||||
Class<?> clazz = classes.remove(name);
|
||||
|
||||
if (ConfigurationSerializable.class.isAssignableFrom(clazz)) {
|
||||
if ((clazz != null) && (ConfigurationSerializable.class.isAssignableFrom(clazz))) {
|
||||
Class<? extends ConfigurationSerializable> serializable = (Class<? extends ConfigurationSerializable>)clazz;
|
||||
ConfigurationSerialization.unregisterClass(serializable);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue