This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Hi I'm using Extrahardmode and in this plugin the mining of stone is hard, so the dispensers here destroy easy the stone but I want the Extrahardmode feature, can you do something? Thanks, I love this plugin :D .
I dont see any way to include Extrahardmode in my plugin, best i can do is give config options to disable,enable each tool type separately.
I intend the fact of use the same feature of extra hard mode for disable tunneling for implement the hard mining of stone in this plugin.
You could call a custom event like SmartItemsDispenserEvent including the tool, dispenser block and block the tool is being used on. I could listen to that event and apply my hardened stone logic. Adding events would allow other plugins to hook into your events without you having to do much. I wonder if players can use dispensers to break blocks in protected areas?
@Diemex: Go
The Protected areas in would guard should be safe. I'm not sure how to make an event public for other plugins.
You can create an event like so and call the event like this:
EhmPlayerInventoryLossEvent inventoryLossEvent = new EhmPlayerInventoryLossEvent(event, drops, removedDrops); plugin.getServer().getPluginManager().callEvent(inventoryLossEvent);
The event will broadcast globally and other plugins can listen to them like they would to normal bukkit events.
You can also create FakeEvents like I did here. I call a fake entity explode event with the appropriate entity, before I actually create the explosion. Bukkit doesn't provide methods to create explosions with an entity. That's why I had to do this workaround so protection plugins can block ehm explosions.
Then you would just do a depend [smart_items] and listen for SmartItemsDispenserEvent?
How do you get the SmartItemsDispenserEvent.class file in your mod?
No I dont [softdepend] or worse yet [depend] on smartitems. That would mean ehm needs smartitems to function correctly which it doesnt.
I would add the SmartItems.jar to my classpath and import the Events.
To post a comment, please login or register a new account.