mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Remove Metadata on reload
Metadata is not meant to persist reload as things break badly with non primitive types This will remove metadata on reload so it does not crash everything if a plugin uses it.
This commit is contained in:
parent
acfd9a39a0
commit
2a04d23940
1 changed files with 8 additions and 0 deletions
|
@ -1005,8 +1005,16 @@ public final class CraftServer implements Server {
|
|||
world.spigotConfig.init(); // Spigot
|
||||
}
|
||||
|
||||
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
|
||||
this.pluginManager.clearPlugins();
|
||||
this.commandMap.clearCommands();
|
||||
// Paper start
|
||||
for (Plugin plugin : pluginClone) {
|
||||
entityMetadata.removeAll(plugin);
|
||||
worldMetadata.removeAll(plugin);
|
||||
playerMetadata.removeAll(plugin);
|
||||
}
|
||||
// Paper end
|
||||
this.reloadData();
|
||||
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
||||
io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
|
||||
|
|
Loading…
Reference in a new issue