Add Plugin Chunk Ticket API
Allows plugins to force certain chunks to be kept loaded for as long as they are enabled. By: Spottedleaf <Spottedleaf@users.noreply.github.com>
This commit is contained in:
@ -21,6 +21,7 @@ import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.PluginCommandYamlParser;
|
||||
import org.bukkit.command.SimpleCommandMap;
|
||||
@ -462,6 +463,14 @@ public final class SimplePluginManager implements PluginManager {
|
||||
} catch (Throwable ex) {
|
||||
server.getLogger().log(Level.SEVERE, "Error occurred (in the plugin loader) while unregistering plugin channels for " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
|
||||
}
|
||||
|
||||
try {
|
||||
for (World world : server.getWorlds()) {
|
||||
world.removePluginChunkTickets(plugin);
|
||||
}
|
||||
} catch (Throwable ex) {
|
||||
server.getLogger().log(Level.SEVERE, "Error occurred (in the plugin loader) while removing chunk tickets for " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user