mirror of
https://github.com/songoda/UltimateStacker.git
synced 2025-03-12 14:39:12 +01:00
Fixed random spawnreason issue with older servers.
This commit is contained in:
parent
322fd550f9
commit
b9023eb16f
@ -96,7 +96,8 @@ public class StackingTask extends BukkitRunnable {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Allow spawn if stackreasons are set and match, or if from a spawner
|
// Allow spawn if stackreasons are set and match, or if from a spawner
|
||||||
final String spawnReason = entity.hasMetadata("US_REASON") ? entity.getMetadata("US_REASON").get(0).asString() : null;
|
final String spawnReason = entity.hasMetadata("US_REASON") && !entity.getMetadata("US_REASON").isEmpty()
|
||||||
|
? entity.getMetadata("US_REASON").get(0).asString() : null;
|
||||||
List<String> stackReasons;
|
List<String> stackReasons;
|
||||||
if (Settings.ONLY_STACK_FROM_SPAWNERS.getBoolean()) {
|
if (Settings.ONLY_STACK_FROM_SPAWNERS.getBoolean()) {
|
||||||
// If only stack from spawners is enabled, make sure the entity spawned from a spawner.
|
// If only stack from spawners is enabled, make sure the entity spawned from a spawner.
|
||||||
|
Loading…
Reference in New Issue
Block a user