What could be causing this conflict?

Discussion in 'Plugin Development' started by ketchupcoke, Nov 15, 2015.

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

    ketchupcoke

    Last edited: Nov 22, 2015
  2. Offline

    ketchupcoke

  3. Offline

    Zombie_Striker

    A) No one wants to download anything.Expecially from a non-bukkit site. Post your code here or in Pastebin.
    B) The fact that you edited work that someone else made is bad. Most likely, you did not get their permission to use/edit their plugin.
    C) The reasons above are most likely why no one wants to respond to this thread.
     
  4. Offline

    ketchupcoke

    @Zombie_Striker
    A) The download is safe, and it would be a hassle for me to upload an entire plugin to pastebin.
    B) I actually do have permission from the author of the plugin to modify his work, as stated in the license. Also, why would you need permission to "use" someone's plugin that they have released to the public domain?
    C) You spelt 'especially' wrong.
    D) Please post something useful.
     
  5. Offline

    Zombie_Striker

    @ketchupcoke
    A)Your words really mean nothing here. You really only need to upload any class that related to the error.

    B)"Use" is different than "Modify".

    C)True

    D) That post was actually useful. I'm telling you people here (such as myself) will not download anything.
    But, if you think that isn't useful..
    Code:
    java.lang.IllegalStateException: Cannot use classinfos until registration is over
    Can you post all code relating to, accessing or using classinfos?
     
  6. Offline

    Scimiguy

    I would have helped, but I don't feel like downloading anything
     
    Zombie_Striker likes this.
  7. Offline

    ketchupcoke

    The problem is, I don't know which class is causing the error. If you really want to be safe, I believe the original Simple Factions code still causes the conflict (in fact I am going to check that now), and that can be found on GitHub.

    I have gone through Skript's source code and have found a variable which seems to trigger this error when "AcceptRegistrations" is set to true. This can be found at checkAllowClassInfoInteraction() from here.

    Here's the full link if you think it's a virus: https://github.com/Njol/Skript/blob...3d1acc30e00ad69/src/main/java/ch/njol/skript/

    Too late, you just downloaded the assets for this forum page :p

    EDIT: I have just found that the conflict is still caused between the un-edited Simple Factions and Skript, therefore no downloading is necessary.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Nov 16, 2015
  8. Offline

    Zombie_Striker

  9. Offline

    ketchupcoke

    But it's not :p read again

    I was probably a bit too enthusiastic about no downloading being necessary.
     
  10. Offline

    Scimiguy

    So what's the problem we're at now?
     
  11. Offline

    ketchupcoke

  12. Offline

    Scimiguy

    You should let the developer of either/both plugins know then
     
  13. Offline

    ketchupcoke

    I have, however both developers are currently busy long-term
     
  14. Offline

    mythbusterma

    @ketchupcoke

    Well we really can't help you then. Try not using that skript.
     
  15. Offline

    ketchupcoke

    All the code is there; I just need help finding the issue. Simply using the error to track what exactly is going on would be really helpful

    Also, Skript fails to load in any skripts, not just one skript that is the issue (or I would not have bothered posting in the first place).
     
  16. Offline

    Scimiguy

    Yeah and it's a lot of code. You're the one developing it, we're not that invested in spending potentially hours tracking through code to find the problem

    Besides, his error isn't the same as his GitHub code
     
  17. Offline

    Koobaczech

    Hey man, in the code he is throwing an exception deliberately based on the return value of an if statement. When an exception is thrown, the stack unwinds until it can be handled with an exception handler. Generally a try catch or throws declaration is used to handle this, routing the code appropriately. The IllegalStateException is not being handled and crashes the plugin->crashing the server.
    Code:
    private final static void checkAllowClassInfoInteraction() {
            if (Skript.isAcceptRegistrations())
                throw new IllegalStateException("Cannot use classinfos until registration is over");
        }
     
  18. Offline

    ketchupcoke

    Thanks for the input @Koobaczech - the thing is Skript works fine without Simple Factions installed, so I think it would need to be Simple Faction's code that needs to be corrected.

    Just wondering - I found some actual JSON classes inside the source folder which are imported to handle all the data saving and loading. Could it be this is overriding Skript's parsing system?
     
  19. Offline

    mythbusterma

  20. Offline

    ketchupcoke

    The thing is, the error is definitely to do with loading in data from the script folder. I've tried looking at class names etc but none are duplicate, so I'm really struggling to locate this error in Simple Factions.
     
  21. Offline

    ketchupcoke

  22. Offline

    Zombie_Striker

    @ketchupcoke
    As has been stated many times before, this is far to much for us to do. This is your job. It is your job to debug your code.

    Here's everything we know:
    1. There errors are not the same
    2. The error you have are caused because the plugin "Cannot use classinfos until registration is over"
    3. The error comes up when you load the script.
    Try looking and/or posting the parts where you actually load the script. Try to find the line/s that deal with "classinfos".
     
  23. Offline

    ketchupcoke

    The problem is to do with Simple Factions stopping Skript from parsing any scripts (that it loads in from a file). Both plugins use JSON to load/save data.

    Here is the part of Simple Factions that parses data.
    Skript is not the issue - it is Simple Factions that is the problem.

    Anyone able to help?
     
  24. Offline

    Coolgamer54

    @Zombie_Striker has a point. Our job is not to debug your plugin. We, The community, are here to help you with any problems you have with your plugin. The plugin conflicts is a problem you should take up with the plugin's Author.
     
  25. Offline

    ketchupcoke

    @Coolgamer54
    I have and as I previously stated, they are unavailable at this time.
    I have narrowed down the issue, so I hope that will make it easier for anyone to take a look at and see what's wrong. It's a conflict error between saving/loading data in two plugins.

    I have located the part of Skript that causes the error message: line 333 here

    Also, I have found that onEnable() for Simple Factions is called after Skript loads. This must mean the loading before onEnable() of Simple Factions is causing some conflict.

    The part of Simple Factions that I believe causes the error is here

    Also, I was wondering if anyone would be able to explain to me how Bukkit loads plugins (before it actually gets to onEnable), and if this would be a point where a conflict could occur.
     
    Last edited: Nov 25, 2015
  26. Offline

    ketchupcoke

  27. Offline

    Evonoucono

    If you are not willing to spend the hours it would take to fix YOUR problem, then what makes you think anyone else would? The point of the forum is for people to quickly share their knowledge to others in need of help, because they cannot find a solution anywhere else. Try and solve this yourself, and then when you say you have, realistically go and try to solve it yourself. Or get the help from the plugin's creator.
     
  28. Offline

    ketchupcoke

    What do you think I'm doing? Sitting here doing nothing?
    I still haven't managed to solve this problem.
    Also, please read my previous messages. I'm tired of people saying the same thing over and over - if you don't want to help, why are you here?
     
  29. Offline

    Zombie_Striker

    If this is the case, state in the plugin.yml that the plugin should load after Skripts has been loaded.

    BTW; @ketchupcoke We are not saying these things because we want to be annoying. Being a coder means you just write code. Being a programmer means you also have to figure out problems. We here are meant to help out with whatever we can, but we can't do everything. You have to Debug, Tell us which lines are actually at fault or are not being read, and while we try to think of why that might be, you have to try whatever you can to fix the problem as well. Unless you have some updated code or you can tell us what you tried, it looks like you have not done anything.
     
  30. Offline

    ketchupcoke

    I have already tried setting dependencies in plugin.yml. I have also tried:
    - Setting different event priorities for the event handler
    - Fixing save and load methods (some didn't save data properly and kept it loaded in - if you compare Simple Factions to Kingdoms, Simple Factions is borderline unusable)
    - Removing periodical saving as I believe saving happens twice - on startup normally as well as on startup as a periodical save
    - Changing the data folder names (I think there were one or two in Skript with the same name)
    - Looking into BufferedWriter and FileWriter, still not sure exactly if they could cause a conflict

    I'm sort of in a bad position right now because I did not make either of the two plugins, so I don't have an in depth understanding of how it works collectively, and how that could cause a conflict.

    I do believe however that the conflict is most likely to do with how Simple Factions loads data - load(Faction/World/Player/Schedules/Config) in the main class (simpleFactions).

    It could also be something to do with this.
     
Thread Status:
Not open for further replies.

Share This Page