Filled Leveling System for usage of Weapons

Discussion in 'Archived: Plugin Requests' started by Jerry99666, Dec 24, 2013.

  1. Offline

    Jerry99666

    alright I changed it to default, reset my player data but its still not giving me the permission I set when I reach level 10. I have changed it to essentials.kits.* to test but I don't have it given to me when I reach level 10
    Could it because I use PEX?
     
  2. Offline

    rfsantos1996

    I'll test permissions out. Also, the classes thing wasnt buged, was it?
    Only ONE reward of the each type (one permission, one item and one money reward) can be granted at the same level.

    Ok, I tested using EssentialsGroupManager, I always used it. But on the plugin I work with Vault, so the Permission plugin MUST be correcly compatible with Vault. To test, you need to get on the permission level again (if you receive the message, the permission is correcly granted, otherwise its not).

    Download new version on GitHub. I'll post this plugin on BukkitDev tomorrow/later.
     
  3. Offline

    Jerry99666

    Yeah I never say the message about the level but I will test the new one

    Bugs:
    1. Still no broadcast when reaching level 10 nor awarded with permission. Delete folder and restarted server, still nothing. Also there is no reload option. I have Vault installed but still not working

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 5, 2016
  4. Offline

    rfsantos1996

    https://github.com/rfsantos1996/RPGLeveling - players can't use Anvils or Enchantment tables (because the EXP bar is fake, try using [Enchantment] Signs from Essentials if you want to enchantment or repair things, you can put a cost in it as well)

    Also, the announcement will just say "Player is now level x on class className". It worked here, and theres no requirement for that... About the Permission, I used Vault 1.2.27 to program since I didnt noticed the new version, still didnt have ANY change with PEX, I really recommend using GroupManager, the issue isnt with me, its with Vault-PEX...

    And a reload option is a little difficult, try /reload everything, but I really NOT recommend /reload on an open server. I tested this values and worked perfecly:
    Code:
        rewards:
        - 2;permission;essentials.kits.*
        - 20;money;5000
        - 30;item_permission;diamond_sword
        broadcastLevels:
        - '2'
    :/ I really dont know what to do, I hooked into Vault and it did its job on giving me permission on the required level/on login (since it doesnt save properly, I give the permission to the player everytime he logs in).
     
  5. Offline

    Sleaker

    There are a couple different types of permissions adding in Vault, one should save, the other shouldn't what permission system were you using that isn't saving? Just PEX? PEX may have changed stuff in their backend that I haven't accounted for yet (hopefully not). But there can be some inconsistencies. Let me know and I'll try and adjust to make it work. Also PEX used to have a setting that needed to be enabled to work with Bukkit permissions, otherwise it caused problems with permission adding/removal on players not working correctly.

    Do you have code examples on how you're adding the permissions, or is the code on github?

    Also, there shouldn't be any real compatibility differences between Vault versions unless the changelog explicitly mentions bug fixes, or you're attempting to deal with items (which if you're using the Item search functionality you definitely want to stay updated on the server side)
     
  6. Offline

    rfsantos1996

    GroupManager didn't saved for me (at least when changing a permission for a player - not for a group, and using this code) - Link.

    I didnt checked everything because the javadocs for Vault was offline when I tried to attach on NetBeans, didnt tried today though - just tried, samething.

    Yeah, I know about Vault versions changelog (I kind of love reading all changes for a game or anything at all, lol creepy stuff), tried to say something like that ("still didnt have ANY change with PEX"), but never knows...
     
  7. Offline

    Sleaker

    rfsantos1996 - I was doing some work on the webserver, you should be able to attach the javadocs or download them to local now if you need to.

    playerAdd(player, perm) only adds a world-specific permission, I think these have had issues on GM, you may need to explicitly pass in a (world) null. More info on the javadocs for this method.

    EDIT: I doublechecked, and I think both of the methods will add the user permission regardless to the world-specific permissions the player is on for GroupManager. I don't however know if it explicitly saves these permissions I thought it would, as it runs an update in addition to this, but I'll have to re-verify.

    EDIT EDIT: looks like there's no explicit way for me to tell if GM is persisting changes, the data is being added properly, everything else is on essentials if it's not saving properly, it may be necessary to verify with them that permission changes via their API are actually saved.
     
  8. Id's are getting removed?? What does that mean, what will replace them?
     
  9. Offline

    timtower Administrator Administrator Moderator

    The Material class in bukkit will still be used, but the items are moving to names ( just like the textures )
     
    Lionhard likes this.
  10. timtower oh, then I will have to learn to make configs for names, then :D Hope it isn't too hard :D Thanks for that fast answer ;)
     
  11. Offline

    timtower Administrator Administrator Moderator

    Material.valueOf(configvalue)
    Will help you get around :p
    If you need anything else: post something on my profile page
     
    rfsantos1996 and Lionhard like this.
  12. Offline

    rfsantos1996

    Really? :confused: I'm so dumb/blind. I made a loop:
    Material m : Material.values()
    if(m.toString.equalsignorecase(configString)

    @EDIT: nevermind, will still use the loop because of the IgnoreCase()
    Well, beside that (GM didnt saving isnt the greatest issue), is there something I can do to fix the PEX issue that Jerry99666 was having?
     
  13. Offline

    Sleaker

    rfsantos1996 - I checked on the GM issue, and this will happen if a server owner kills the server process or uses X instead of stopping.

    As far as PEX, I never recommend it as it hasn't played nice in the past. Was it working at all? or just no permission when adding?
     
  14. Offline

    rfsantos1996

    Oh... So my mistake, I'm sorry... I was thinking about GM saving WHEN you add the permission. Really sorry.
     
  15. Offline

    Sleaker

    rfsantos1996 - not a problem, GM uses 10 minute (configurable) timed saving so it doesn't slaughter the HD. I checked into PEX and it looks like they only add permissions onto their backend which may or may not even get updated onto the BukkitPerms player, this is an issue that would need to be addressed in PEX. I also didn't check how they handle saving, but I don't really see PEX doing any saving of permission adding when the permission is given to the player.

    rfsantos1996 - what was the reason you needed the permission system to manage the permissions? Generally if you're not needing groups, I would suggest you just keep track of what permissions players should have in your own configuration, and when they join just run player.addPermission, and if they change class etc, player.removePermission.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 5, 2016
  16. Offline

    rfsantos1996

    When a player is at certain level, (based on config) they will receive a permission, on login I check all permissions that they should have and grant it. When they leave the group I remove them, but as Jerry said, he dont have the permission granted using PEX.
    If the permission.playerAdd(player, permission) returns true, I send a player message that he have a new permission, but jerry dont receive the message (so, it returns false) or it isnt even granted (maybe because he failed on configuring? Mine works fine with default... already tested here with the latest vault and groupManager)
     
  17. Offline

    Jerry99666

    I just tested with a fresh install of essentials, groupmanager and vault. I gave myself enough xp to have to kill one zombie but when I became a level 10, there was no announcement nor was I granted the permission. I also am using v0.3 from your page.
     
  18. Offline

    rfsantos1996

    Oh, now I understood what you did. I dont use the atcual EXP bar, I use a variable that I created, so any other plugin wont affect this (sadly) but I'll create commands to give levels to players and manage this things...
    To test the announcement and the rewards, you need to kill mobs/place blocks..

    For testing, try putting like 300 EXP into "Zombie" on killgain and restart your server and try killing zombies.
    PS: the plugin is now on BukkitDev - link.
     
  19. Offline

    Jerry99666

    Please disregard any bugs I had about the plugin not working right, it would help if I gave myself the permission to use it.....I feel like an dumbass but thank you very much for the plugin. I do have a question, is there anyway to add more then one permission per level?
     
  20. Offline

    timtower Administrator Administrator Moderator

    You can also just put everything in upper case first :p But it wasn't looking at casing as far as I know
     
  21. Offline

    rfsantos1996

    I'll add this in the future (;
    You arent a dumbass, you just didnt know, I didnt explained that well too, but I needed to do that when I added the "levelingEquation" that you can make the game more slow/hard.
     
    Jerry99666 likes this.
  22. Offline

    AKS JEFFREY

    Hes True thats what i been doing for my private plugins
     

Share This Page