mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-11-15 22:55:24 +01:00
Merge branch 'development'
This commit is contained in:
commit
02b8aafc4f
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>UltimateStacker</artifactId>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<version>1.11.2</version>
|
||||
<version>1.11.3</version>
|
||||
<build>
|
||||
<defaultGoal>clean install</defaultGoal>
|
||||
<finalName>UltimateStacker-${project.version}</finalName>
|
||||
|
@ -342,8 +342,10 @@ public class UltimateStacker extends SongodaPlugin {
|
||||
public void updateHologram(SpawnerStack stack) {
|
||||
// are holograms enabled?
|
||||
if(!Settings.SPAWNER_HOLOGRAMS.getBoolean() || !HologramManager.getManager().isEnabled()) return;
|
||||
Block block = stack.getLocation().getBlock();
|
||||
if (block.getType() != CompatibleMaterial.SPAWNER.getBlockMaterial()) return;
|
||||
// grab the spawner block
|
||||
CreatureSpawner creatureSpawner = (CreatureSpawner) stack.getLocation().getBlock().getState();
|
||||
CreatureSpawner creatureSpawner = (CreatureSpawner) block.getState();
|
||||
String name = Methods.compileSpawnerName(creatureSpawner.getSpawnedType(), stack.getAmount());
|
||||
// create the hologram
|
||||
HologramManager.updateHologram(stack.getLocation(), name);
|
||||
|
@ -53,7 +53,8 @@ public class DeathListeners implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
if (!event.getEntity().getWorld().getGameRuleValue(GameRule.DO_MOB_LOOT))
|
||||
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_13)
|
||||
&& !event.getEntity().getWorld().getGameRuleValue(GameRule.DO_MOB_LOOT))
|
||||
drops.clear();
|
||||
|
||||
if (instance.getEntityStackManager().isStacked(event.getEntity()))
|
||||
|
@ -35,6 +35,9 @@ public class DropUtils {
|
||||
if (drop.getCommand() != null)
|
||||
commands.add(drop.getCommand());
|
||||
}
|
||||
|
||||
event.getDrops().clear();
|
||||
|
||||
if (!items.isEmpty())
|
||||
dropItems(items, event);
|
||||
else if (!commands.isEmpty())
|
||||
@ -42,7 +45,6 @@ public class DropUtils {
|
||||
}
|
||||
|
||||
private static void dropItems(List<ItemStack> items, EntityDeathEvent event) {
|
||||
event.getDrops().clear();
|
||||
for (ItemStack item : items)
|
||||
event.getDrops().add(item);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user