mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-11-14 22:25:22 +01:00
Added null check.
This commit is contained in:
parent
eca32be192
commit
59b2b3e6b0
@ -109,7 +109,7 @@ public class DataManager extends DataManagerAbstract {
|
||||
|
||||
public void createHostEntity(ColdEntityStack stack) {
|
||||
this.queueAsync(() -> this.databaseConnector.connect(connection -> {
|
||||
if (stack.getHostUniqueId() == null) return;
|
||||
if (stack == null || stack.getHostUniqueId() == null) return;
|
||||
String createSerializedEntity = "INSERT INTO " + this.getTablePrefix() + "host_entities (uuid, create_duplicates) VALUES (?, ?)";
|
||||
try (PreparedStatement statement = connection.prepareStatement(createSerializedEntity)) {
|
||||
statement.setString(1, stack.getHostUniqueId().toString());
|
||||
|
Loading…
Reference in New Issue
Block a user