Editing plugin, Referencing other plugin commands

Discussion in 'Plugin Development' started by TheSilverSpade, Apr 13, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    TheSilverSpade

    I don't know if this is the right thread but i need help

    So let me start off with this, I have NO java experiance

    With that being said, The other day I bought a resource, DyanimiCombat, A dueling plugin
    Plugin:
    <Edit by Moderator: Redacted not allowed paid resource url>

    It works pretty well, with some problems. I started up my server and immediatly found one problem, Its /party command conflicted with Mcmmo. I opened my dusty, unused Eclipse Neon, and opened up the Plugin.yml and added aliases to it. That was succesful but upon farther testing I found some more problems,

    1: When you login it replaces your inventory with 2 swords, Ranked And Unranked GUI openers, The problem being they replaces your inventory

    2: When selecting one of them, and clicking a gamemode, you enter a duel queue. This replaces your inventory again with a slimeball

    3: When you enter and leave the duel, your inventory isn't restored

    I wanted to solve this problem by
    1: Removing the swords from login, And binding a command to the guis instead, /dc Unranked or /dc Ranked
    2: I want it to teleport you to a queue room while waiting in the queue and save your inventory
    3: I want to add a save inventory plugin, problem is i dont know if i can reference commands in java
    4: Load inventory if Leave queue or Duel Ends

    Basically this is how i want it to start

    Login, Inventory not being replaced
    Player does command /dc Ranked
    Click a gamemode, Inventory saved and enter a queue
    Slimeball replaces inventory, if exit load saved inventory and delete the
    If not Teleport to queue room in other world, multiverse
    Duel starts, no work nessecary,
    Duel finished, both players inventory loaded

    I dont know if referencing another plugin in java is possable, this is a 1.8 plugin, If not do i have to add a inventory saving feature in the plugin, and how would i go about that

    This is a premium plugin, I dont think i can share files
    Any help would be appreciated

    -Andrew
     
  2. Offline

    Zombie_Striker

    @TheSilverSpade
    I think you are almost at an impasse.
    1. The same way you can't share the file itself, you cannot share the code. We also do not want to pay money just to decompile the plugin. Because of that, we cannot tell you what is wrong with the code, so you cannot get much help from us in that regard.
    2. As you said, you have no experience with Java. Now, this is bad enough for plugins you make (If you want to work on bukkit, you should already have a knowledge of Java and how it works) but this is going to make it extremely hard for you detect any mistakes the code may have.
    The only thing I can recommend is creating a ticket for the plugin. The best person to understand and make changes to the plugin is the creator. Hopefully he will be able to fix the problem, or at the very least, help you.
     
  3. Offline

    TheSilverSpade

    I beleive he has discontinued the plugin, Also he is in a timezone really hard to match up with and contact. The thing i wanted to know the most is if you can referance another plugins command in the plugin im working with. So i can replace the code that gives you a sword with a event making console preform the command /inv save {Player} tempduel
    Ect Ect. Is refrencing another plugin possable?
     
  4. Depends, it's the structure that determines it, if it's a form of private class, you can't, if it has existent methods cached in memory (static) then you can. Most likely the methods are not static (static will eat your memory) as it is not supposed to be externally used.
     
  5. Offline

    TheSilverSpade

    Okay so would it be easier to add a class file for saving the inventory into the plugin itself?
     
  6. Legally, you can't edit it, usually. (Depends on the license)
     
  7. Offline

    TheSilverSpade

    I've messaged the author and he says its not against his terms, the problem is he won't respond further
     
  8. Then decompile it, inject your class, and recompile it.
     
Thread Status:
Not open for further replies.

Share This Page