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>
|
<groupId>com.songoda</groupId>
|
||||||
<artifactId>UltimateStacker</artifactId>
|
<artifactId>UltimateStacker</artifactId>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<version>1.11.2</version>
|
<version>1.11.3</version>
|
||||||
<build>
|
<build>
|
||||||
<defaultGoal>clean install</defaultGoal>
|
<defaultGoal>clean install</defaultGoal>
|
||||||
<finalName>UltimateStacker-${project.version}</finalName>
|
<finalName>UltimateStacker-${project.version}</finalName>
|
||||||
|
@ -342,8 +342,10 @@ public class UltimateStacker extends SongodaPlugin {
|
|||||||
public void updateHologram(SpawnerStack stack) {
|
public void updateHologram(SpawnerStack stack) {
|
||||||
// are holograms enabled?
|
// are holograms enabled?
|
||||||
if(!Settings.SPAWNER_HOLOGRAMS.getBoolean() || !HologramManager.getManager().isEnabled()) return;
|
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
|
// grab the spawner block
|
||||||
CreatureSpawner creatureSpawner = (CreatureSpawner) stack.getLocation().getBlock().getState();
|
CreatureSpawner creatureSpawner = (CreatureSpawner) block.getState();
|
||||||
String name = Methods.compileSpawnerName(creatureSpawner.getSpawnedType(), stack.getAmount());
|
String name = Methods.compileSpawnerName(creatureSpawner.getSpawnedType(), stack.getAmount());
|
||||||
// create the hologram
|
// create the hologram
|
||||||
HologramManager.updateHologram(stack.getLocation(), name);
|
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();
|
drops.clear();
|
||||||
|
|
||||||
if (instance.getEntityStackManager().isStacked(event.getEntity()))
|
if (instance.getEntityStackManager().isStacked(event.getEntity()))
|
||||||
|
@ -35,6 +35,9 @@ public class DropUtils {
|
|||||||
if (drop.getCommand() != null)
|
if (drop.getCommand() != null)
|
||||||
commands.add(drop.getCommand());
|
commands.add(drop.getCommand());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
event.getDrops().clear();
|
||||||
|
|
||||||
if (!items.isEmpty())
|
if (!items.isEmpty())
|
||||||
dropItems(items, event);
|
dropItems(items, event);
|
||||||
else if (!commands.isEmpty())
|
else if (!commands.isEmpty())
|
||||||
@ -42,7 +45,6 @@ public class DropUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void dropItems(List<ItemStack> items, EntityDeathEvent event) {
|
private static void dropItems(List<ItemStack> items, EntityDeathEvent event) {
|
||||||
event.getDrops().clear();
|
|
||||||
for (ItemStack item : items)
|
for (ItemStack item : items)
|
||||||
event.getDrops().add(item);
|
event.getDrops().add(item);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user