FabioZumbi12 / Sponge-RankUpper

Plugin to promote players based on requeriments
GNU General Public License v3.0
5 stars 12 forks source link

Remove Multiple Ranks? #6

Closed GershonR closed 7 years ago

GershonR commented 7 years ago

For some reason it prints out every group you are in:

http://i.imgur.com/M7sHyvH.png

Is it possible to only show the rank you need to rankup and requirements? It seems pointless to print all the ranks you are in with the same time played for all of them

GershonR commented 7 years ago

Also this seems to be affecting higher ranks.

For example ranks: 1,2,3

If you are already ranked in 3, it will try to promote you to rank 2 because 1 is the default rank even though you are already in rank 3.

FabioZumbi12 commented 7 years ago

The correct way is you inherit other ranks from default, and not give both default and actual rank at same time (if both is ranked).

GershonR commented 7 years ago

I did do that here is the example:

ranked-groups {
    1 {
        execute-commands=[
            "pex user {player} parent delete group {oldgroup}",
            "pex user {player} parent add group {newgroup}"
        ]
        levels-needed=0
        message-broadcast="&a>> &6{player} &ahas been promoted to {newgroup}!"
        minutes-needed=500
        money-needed=50
        next-group=2
    }
    4 {
        execute-commands=[
            "pex user {player} parent delete group {oldgroup}",
            "pex user {player} parent add group {newgroup}"
        ]
        levels-needed=0
        message-broadcast="&a>> &6{player} &ahas been promoted to {newgroup}!"
        minutes-needed=36000
        money-needed=2000
        next-group=5
    }
    3 {
        execute-commands=[
            "pex user {player} parent delete group {oldgroup}",
            "pex user {player} parent add group {newgroup}"
        ]
        levels-needed=0
        message-broadcast="&a>> &6{player} &ahas been promoted to {newgroup}!"
        minutes-needed=7200
        money-needed=500
        next-group=4
    }
    2 {
        execute-commands=[
            "pex user {player} parent delete group {oldgroup}",
            "pex user {player} parent add group {newgroup}"
        ]
        levels-needed=0
        message-broadcast="&a>> &6{player} &ahas been promoted to {newgroup}!"
        minutes-needed=1440
        money-needed=200
        next-group=3
    }
    default {
        execute-commands=[
            "pex user {player} parent delete group {oldgroup}",
            "pex user {player} parent add group {newgroup}"
        ]
        levels-needed=0
        message-broadcast="&a>> &6{player} &ahas been promoted to {newgroup}!"
        minutes-needed=120
        money-needed=0
        next-group=1
    }
GershonR commented 7 years ago

Also I left the default time to 5 minutes, and when someone gets promoted, it still keeps promoting them every 5 minutes and announcing it to the server.

So basically the broadcast for promotions keeps getting bigger and bigger and including the already promoted users.

yepidoodles commented 7 years ago

I've been getting this too, my config is set so no one can see messages, but I see it do the command more than once in the console.

config: http://www.codesend.com/view/85927e81d05649e19e4110937fa96c4b/

I've been using it to add a default rank to players are PEX hasn't been doing that automaticly: https://github.com/PEXPlugins/PermissionsEx/issues/2665

yepidoodles commented 7 years ago

https://gyazo.com/0394bbb2ec9bf484a49d217fa1271ac7

GershonR commented 7 years ago

Are you still having this issue? I want to give the plugin another try and see if the bugs are fixed

yepidoodles commented 7 years ago

Well it hasn't been updated, so I guess not

FabioZumbi12 commented 7 years ago

Yes, we are working to fix all incompatibilities and you can download dev versions on our discord channel.

FabioZumbi12 commented 7 years ago

Multiple ranks seems to be fixed. Now this depends on what permissions plugin are you using and configuration. Add not ranked groups to exception list too on config.