Merge branch 'development'

This commit is contained in:
Brianna 2019-12-27 08:34:46 -05:00
commit 02b8aafc4f
4 changed files with 9 additions and 4 deletions

View File

@ -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>

View File

@ -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);

View File

@ -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()))

View File

@ -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);
}