Speed server start up
Dieser Commit ist enthalten in:
Ursprung
1b17b513d2
Commit
021a189823
@ -2,6 +2,7 @@ package de.steamwar.core;
|
|||||||
|
|
||||||
import de.steamwar.core.events.ChattingEvent;
|
import de.steamwar.core.events.ChattingEvent;
|
||||||
import de.steamwar.core.events.PlayerJoinedEvent;
|
import de.steamwar.core.events.PlayerJoinedEvent;
|
||||||
|
import de.steamwar.core.events.WorldLoadEvent;
|
||||||
import de.steamwar.sql.SQL;
|
import de.steamwar.sql.SQL;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
@ -36,6 +37,7 @@ public class Core extends JavaPlugin{
|
|||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
Bukkit.getPluginManager().registerEvents(new PlayerJoinedEvent(), this);
|
Bukkit.getPluginManager().registerEvents(new PlayerJoinedEvent(), this);
|
||||||
Bukkit.getPluginManager().registerEvents(new ChattingEvent(), this);
|
Bukkit.getPluginManager().registerEvents(new ChattingEvent(), this);
|
||||||
|
Bukkit.getPluginManager().registerEvents(new WorldLoadEvent(), this);
|
||||||
if(version >= 12)
|
if(version >= 12)
|
||||||
ErrorLogger.init();
|
ErrorLogger.init();
|
||||||
}
|
}
|
||||||
|
13
SpigotCore_Main/src/de/steamwar/core/events/WorldLoadEvent.java
Normale Datei
13
SpigotCore_Main/src/de/steamwar/core/events/WorldLoadEvent.java
Normale Datei
@ -0,0 +1,13 @@
|
|||||||
|
package de.steamwar.core.events;
|
||||||
|
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.Listener;
|
||||||
|
import org.bukkit.event.world.WorldInitEvent;
|
||||||
|
|
||||||
|
public class WorldLoadEvent implements Listener {
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onWorldInit(WorldInitEvent e){
|
||||||
|
e.getWorld().setKeepSpawnInMemory(false);
|
||||||
|
}
|
||||||
|
}
|
@ -2,6 +2,7 @@ name: SpigotCore
|
|||||||
version: "2.0"
|
version: "2.0"
|
||||||
author: Lixfel
|
author: Lixfel
|
||||||
api-version: "1.13"
|
api-version: "1.13"
|
||||||
|
load: STARTUP
|
||||||
softdepend:
|
softdepend:
|
||||||
- WorldEdit
|
- WorldEdit
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren