Check

Discussion in 'Plugin Development' started by Simonhansen1999, Feb 6, 2016.

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

    Simonhansen1999

    Hello! How can i do so only specific servers can use my plugins?
    My currently code, that doesn't work:

    Code:
            if (Bukkit.getServer().getIp() != ("xx.xxx.xx.xxx")) {
                Bukkit.getServer().getPluginManager().disablePlugin(this);
    
    i've put that in my onEnable. But it doesn't work correctly. It disables all the time, even if the ip is correct.

    Hope your guys can hope!
     
  2. Online

    timtower Administrator Administrator Moderator

    @Simonhansen1999 Best way is by not sharing the plugin.
    Checks like those are very easy to remove.
     
  3. Offline

    Simonhansen1999

    I've fixed it and no.. I don't publish the project file only the .jar file.
     
  4. Online

    timtower Administrator Administrator Moderator

    Then we can decompile it and replace it anyways.
    There is no way to protect your jars. Not possible, we can easily bypass your checks.
     
  5. Offline

    Simonhansen1999

    Theres 50+ classes and 20+ packages, well.. If you do it then i don't care. ;9
     
  6. Online

    timtower Administrator Administrator Moderator

    But why do you want the check anyways?
     
  7. Offline

    Simonhansen1999

    Because i don't want other people to give it to others. Its made for a server, so they shouldn't could sell it to others..
    and if they decompile it, they can do what they want to.

    Woaw, i can really see my english is so bad right now..
     
  8. Online

    timtower Administrator Administrator Moderator

    To be honest: we can have that gone with 10 minutes where 5 is setting up the project.
    Most servers have somebody available to do that stuff for them if needed.
     
  9. Offline

    Simonhansen1999

    This server doesn't have, but i will give them a chance. I've removed the ip-check.
    I can always stop updating it.
     
Thread Status:
Not open for further replies.

Share This Page