Integration with ExtraHardMode #5


  • Enhancment
  • Accepted
Open
Assigned to thesplated
  • _ForgeUser7958856 created this issue May 5, 2013

    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 .

  • _ForgeUser7958856 added the tags New Enhancment May 5, 2013
  • thesplated posted a comment May 6, 2013

    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.

  • thesplated removed a tag New May 6, 2013
  • thesplated added a tag Accepted May 6, 2013
  • _ForgeUser7958856 posted a comment May 8, 2013

    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.

  • thesplated removed a tag Accepted May 15, 2013
  • thesplated added a tag Declined May 15, 2013
  • thesplated closed issue May 15, 2013
  • _ForgeUser8289699 posted a comment May 1, 2014

    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?

  • thesplated posted a comment May 1, 2014

    @Diemex: Go

    The Protected areas in would guard should be safe. I'm not sure how to make an event public for other plugins.

  • thesplated removed a tag Declined May 1, 2014
  • thesplated added a tag Accepted May 1, 2014
  • thesplated reopened issue May 1, 2014
  • _ForgeUser8289699 posted a comment May 11, 2014

    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.

  • thesplated posted a comment May 11, 2014

    Then you would just do a depend [smart_items] and listen for SmartItemsDispenserEvent?

    How do you get the SmartItemsDispenserEvent.class file in your mod?

  • _ForgeUser8289699 posted a comment May 18, 2014

    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.