Search in sources :

Example 1 with TeleporterListener

use of io.github.thebusybiscuit.slimefun4.implementation.listeners.TeleporterListener in project Slimefun4 by Slimefun.

the class SlimefunStartupTask method run.

@Override
public void run() {
    runnable.run();
    // Load all items
    PostSetup.loadItems();
    // Load all worlds
    Slimefun.getWorldSettingsService().load(Bukkit.getWorlds());
    for (World world : Bukkit.getWorlds()) {
        try {
            new BlockStorage(world);
        } catch (Exception x) {
            Slimefun.logger().log(Level.SEVERE, x, () -> "An Error occurred while trying to load World \"" + world.getName() + "\" for Slimefun v" + Slimefun.getVersion());
        }
    }
    // Load/Unload Worlds, only after all plugins have started up. Fixes #2862
    new WorldListener(this.plugin);
    // Only load this Listener if the corresponding items are enabled
    if (isEnabled("ELEVATOR_PLATE", "GPS_ACTIVATION_DEVICE_SHARED", "GPS_ACTIVATION_DEVICE_PERSONAL")) {
        new TeleporterListener(plugin);
    }
}
Also used : TeleporterListener(io.github.thebusybiscuit.slimefun4.implementation.listeners.TeleporterListener) BlockStorage(me.mrCookieSlime.Slimefun.api.BlockStorage) WorldListener(io.github.thebusybiscuit.slimefun4.implementation.listeners.WorldListener) World(org.bukkit.World)

Aggregations

TeleporterListener (io.github.thebusybiscuit.slimefun4.implementation.listeners.TeleporterListener)1 WorldListener (io.github.thebusybiscuit.slimefun4.implementation.listeners.WorldListener)1 BlockStorage (me.mrCookieSlime.Slimefun.api.BlockStorage)1 World (org.bukkit.World)1