How to put two plugins into one.

Discussion in 'Plugin Development' started by IIxUnderWorldxII, Sep 11, 2014.

Thread Status:
Not open for further replies.
  1. I'm trying to put two plugins into one. I.E You've got two plugins, but don't want them clamming up space. So you decide ah, I can try and put the code from either into one and it'll work. Anyone know?
     
  2. IIxUnderWorldxII It's possible, but insanely frowned upon. I wouldn't recommend it. Firstly, it could break one of the other plugins. Secondly, since there would be two instances of JavaPlugin, you'd have to merge the classes together to prevent it crashing. Thirdly, there's legal implications of code. (So where will you get the code for the other plugin(s)?).

    In short, don't do it. Stick with 2 separate plugins because it works and there's nothing wrong with that.

    And, it says not to do that in this forum section:

     
  3. DJSkepter Ok. I also have another problem. I'm working on a GUI and I have an error. Would you be able to help? Here is the code via pastebin - http://pastebin.com/5aT7xiEh

    Action.PHYSICAL Is giving me the error.
     
  4. IIxUnderWorldxII
    Physical is stepping on a pressure plate or something similar to that
     
  5. Offline

    CraftCreeper6

    Change:
    Code:java
    1. org.bukkit.event.block.Action a = event.getAction();

    to:
    Code:java
    1. Action a = e.getAction();


    And use a different Action.
     
  6. Offline

    artish1

    CraftCreeper6

    That doesn't change anything. It is still using the same Action class (as long as the event's Action class is in the org.bukkit.event.block package).
     
  7. Offline

    Flamedek

    artish1
    You are looking for the InventoryClickEvent, not PlayerIteractEvent. The interact event is fired for left/right clicking in game
     
Thread Status:
Not open for further replies.

Share This Page