SteamWar/BauSystem
Archiviert
13
0

Classloader doesnt like multithreading...

Dieser Commit ist enthalten in:
Lixfel 2020-12-24 09:44:28 +01:00
Ursprung f2acd26835
Commit d7a786aad7

Datei anzeigen

@ -19,10 +19,8 @@
package de.steamwar.bausystem.world;
import de.steamwar.bausystem.BauSystem;
import de.steamwar.sql.Schematic;
import de.steamwar.sql.SchematicType;
import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
@ -36,16 +34,14 @@ public class ClipboardListener implements Listener {
@EventHandler
public void onLogin(PlayerJoinEvent e){
Bukkit.getScheduler().runTaskAsynchronously(BauSystem.getPlugin(), () -> {
try {
Schematic schematic = Schematic.getSchemFromDB(CLIPBOARD_SCHEMNAME, e.getPlayer().getUniqueId());
if(schematic != null){
schematic.loadToPlayer(e.getPlayer());
}
} catch (Exception ex) {
//ignore cause players do all kind of stuff with schematics.... like massively oversized schems
try {
Schematic schematic = Schematic.getSchemFromDB(CLIPBOARD_SCHEMNAME, e.getPlayer().getUniqueId());
if(schematic != null){
schematic.loadToPlayer(e.getPlayer());
}
});
} catch (Exception ex) {
//ignore cause players do all kind of stuff with schematics.... like massively oversized schems
}
}
@EventHandler