novucs / factions-top

An efficient and comprehensive factions ranking system
MIT License
12 stars 26 forks source link

MergedSpawner Support #66

Open marijnvanderhorst opened 6 years ago

marijnvanderhorst commented 6 years ago

Added MergedSpawner support as requested in issue #60. Please note that the included mergedspawner jar in the repo is a stripped down version containing just the api method. If you need the full version for testing please send me a message.

novucs commented 6 years ago

Thank you for your time to make this pull request. If I am to apply and maintain this, I'll need to have access to test it. I've sent you a personal message on Spigot regarding access to your plugin.

marijnvanderhorst commented 6 years ago

I'm not the creator of the MergedSpawner plugin. If that were the case I wouldn't have had to implement it this way.

novucs commented 6 years ago

Thanks for the offer, though I'll see if I can get the author of merged spawners to give me a license. Adding support for his plugin benefits him more than anyone so I can't see why he wouldn't want to give me a copy. That way I should be able to get all future updates too. I'll update here when I get a response.

AmazedMender16 commented 6 years ago

Hello,

Would love to see support for this.. Mergedspawner has an open API. You can also contact him on discord or spigot. or through hes support ticket system.

https://www.spigotmc.org/resources/mergedspawner-mcmmo-silkspawner-etc-support-included.31982/


`For Developers: If you have a plugin, from which you wish to find out how many spawners are stacked in the spawner, you can invoke the following static method: Code (Text):

MergedSpawner.getCountFor(Block spawner);

If you wish to use an event-driven approach, you can use the follwing events: Code (Text):

@EventHandler public void onMergedSpawnerPlaced(MergedSpawnerPlaceEvent e) { Block spawnerBlock = e.getSpawner(); int newCount = e.getSpawnerCount(); EntityType type = e.getSpawnerType(); ... }

@EventHandler public void onMergedSpawnerBroken(MergedSpawnerBreakEvent e) { Block spawnerBlock = e.getSpawner(); int newCount = e.getSpawnerCount(); EntityType type = e.getSpawnerType(); ... }`