mirror of
https://github.com/songoda/UltimateStacker.git
synced 2025-01-29 18:51:21 +01:00
Merge branch 'development'
This commit is contained in:
commit
cbfa58bf17
4
pom.xml
4
pom.xml
@ -2,7 +2,7 @@
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>UltimateStacker</artifactId>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<version>2.2.1</version>
|
||||
<version>2.2.2</version>
|
||||
<build>
|
||||
<defaultGoal>clean install</defaultGoal>
|
||||
<finalName>UltimateStacker-${project.version}</finalName>
|
||||
@ -113,7 +113,7 @@
|
||||
<dependency>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore</artifactId>
|
||||
<version>2.6.12</version>
|
||||
<version>2.6.14-DEV</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -57,7 +57,6 @@ public class DataManager extends DataManagerAbstract {
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
public void createSpawner(SpawnerStack spawnerStack) {
|
||||
this.queueAsync(() -> this.databaseConnector.connect(connection -> {
|
||||
|
||||
@ -88,7 +87,6 @@ public class DataManager extends DataManagerAbstract {
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
public void createBlock(BlockStack blockStack) {
|
||||
this.queueAsync(() -> this.databaseConnector.connect(connection -> {
|
||||
|
||||
@ -108,12 +106,11 @@ public class DataManager extends DataManagerAbstract {
|
||||
}), "create");
|
||||
}
|
||||
|
||||
|
||||
public void createHostEntity(ColdEntityStack stack) {
|
||||
this.queueAsync(() -> this.databaseConnector.connect(connection -> {
|
||||
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)) {
|
||||
if (stack == null || stack.getHostUniqueId() == null) return;
|
||||
statement.setString(1, stack.getHostUniqueId().toString());
|
||||
statement.setInt(2, stack.getCreateDuplicates());
|
||||
statement.executeUpdate();
|
||||
|
@ -297,8 +297,9 @@ public class StackingTask extends BukkitRunnable {
|
||||
}
|
||||
|
||||
// Drop lead if applicable then remove our entity and mark it as processed.
|
||||
if (entity.isLeashed())
|
||||
entity.getWorld().dropItemNaturally(entity.getLocation(), CompatibleMaterial.LEAD.getItem());
|
||||
if (entity.isLeashed()) {
|
||||
Bukkit.getScheduler().runTask(plugin, () -> entity.getWorld().dropItemNaturally(entity.getLocation(), CompatibleMaterial.LEAD.getItem()));
|
||||
}
|
||||
livingEntities.add(entity);
|
||||
Bukkit.getScheduler().runTask(plugin, entity::remove);
|
||||
processed.add(entity.getUniqueId());
|
||||
|
Loading…
Reference in New Issue
Block a user