Fix ClipboardListener
Dieser Commit ist enthalten in:
Ursprung
30ddf671ae
Commit
2214b7dc3d
@ -38,13 +38,18 @@ public class ClipboardListener implements Listener {
|
|||||||
public void onLogin(PlayerJoinEvent e) {
|
public void onLogin(PlayerJoinEvent e) {
|
||||||
if (!Permission.SUPERVISOR.hasPermission(e.getPlayer())) return;
|
if (!Permission.SUPERVISOR.hasPermission(e.getPlayer())) return;
|
||||||
|
|
||||||
|
SchematicNode schematic;
|
||||||
try {
|
try {
|
||||||
SchematicNode schematic = SchematicNode.getSchematicNode(SteamwarUser.get(e.getPlayer().getUniqueId()).getId(), CLIPBOARD_SCHEMNAME, (Integer) null);
|
schematic = SchematicNode.getSchematicNode(SteamwarUser.get(e.getPlayer().getUniqueId()).getId(), CLIPBOARD_SCHEMNAME, (Integer) null);
|
||||||
if (schematic != null) {
|
} catch (Exception ex) {
|
||||||
new SchematicData(schematic).loadToPlayer(e.getPlayer());
|
return;
|
||||||
}
|
}
|
||||||
|
if (schematic == null) return;
|
||||||
|
try {
|
||||||
|
new SchematicData(schematic).loadToPlayer(e.getPlayer());
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
// ignore cause players do all kind of stuff with schematics.... like massively oversized schems
|
// ignore cause players do all kind of stuff with schematics.... like massively oversized schems
|
||||||
|
schematic.delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren