Probable bug with RuinGenerateEvent
TfT-02 opened this issue ยท 6 comments
When listening to RuinGenerateEvent to edit the loot inside the chests, I encountered some trouble. So I added some debug messages and I noticed how:
event.getChest().getType()
returns Material.AIR
, I'd expect that it would return Material.CHEST
So it would appear that event.getChest() is getting the wrong block.
Using Jenkins dev build: https://diabloplugins.ci.cloudbees.com/job/DiabloDrops/7/
After doing more tests, I noticed that the coordinates are actually correct.
Does this event get called before the chest gets generated?
Is that intentional? Would it be possible to fire the event after the chest is generated?
I suggest that you run a task after catching the generation that will then mess with the contents of the chest, using BukkitScheduler.