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