Solved Help with my plugin regarding MCMMO

Discussion in 'Plugin Development' started by SantaClawz69, Aug 17, 2015.

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

    SantaClawz69

    Hello, so basically my problem isn't an error or anything. It's just something that I would prefer.

    My problem is this: I've made myself a bending plugin, it has taken a while. But I have MCMMO with my bending plugin, and whenever people use skills with my bending plugin it always levels up the MCMMO levels. Is there a way to disable such a thing? I've tried to do this myself but I really need help with this.

    Thanks Bukkit!!!
     
  2. Offline

    Synapz

    @SantaClawz69
    I had the same issue when I was an Admin on a server. Just my issue was they were getting mcmmo xp in Mob Arena. I found out you can disable xp gaining by removing their permissions to gaining xp temporarily. For example: mcmmo.skills.acrobatics is the acrobatics gaining skill that is added to everyone on default. If you disable that then they don't gain acrobatics.

    List of all permissions: https://github.com/mcMMO-Dev/mcMMO/wiki/List-of-permissions.

    You can remove those permissions from the player when they use your bending plugin skills using.
    Code:
    Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender, "manudelp notch mcmmo.skills.acrobatics");
    The problem I found with this is a lot of players are using your bending skills, console will be spammed. To disable that you can even create a AsyncChatEvent to disable sending messages if the sender instanceof Console and if the player sending the messages is contained in the message then cancel it. Its complex but I don't know another way around it. Then when they finish you can add the permission back. Also you might want to add PEX or GroupManager as a need for sending commands. Then check which plugin the server has installed and then send the correct command

    Edit: this was way more complex that i realized at first
     
  3. Offline

    SantaClawz69

    Thank you so much for your help. I'll get to work immediately.
     
Thread Status:
Not open for further replies.

Share This Page