Anti /pay (essentials)

Status
This thread has been locked.

YMGamer

Unify Prison Owner
Premium
Feedback score
0
Posts
50
Reactions
6
Resources
0
looking for something in which I can give a permission to certain people to deny the ability to be able to receive /pay from people with said permission

basically I have a prison server in which I want the A-J ranks to not receive funds from those above so when people join they wont get rushed into a super high rank and also with those that prestige they will all need to work to at least j before receiving /pay from the rest of the player base
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

GamerKing195

Feedback score
1
Posts
12
Reactions
2
Resources
0
He said he didn't want certain players to receive payments. Say the player is default and another one is ranked, the ranked player has /pay he wants to make it so the ranked player can only pay other ranked players so the default player can't receive a payment from the ranked one. Hope that made sense.

...
Code:
public void onCommand()
{
       if (sender instanceof Player)
       {
               Player payer = (Player) sender;
               //Args checks
               Player payed = Bukkit.getPlayerExact(args[1]);
               if (payed != null && (payed.hasPermission("essentials.pay") || vault group check))
               {
                       return true;
               }
               else
               {
                // stop the command from running
               }
       }
}

Edit:
that's a rough outline of how I would do it, don't point out a million errors if you want me to actually turn that into a plugin I will.
 

Jetterman

Premium
Feedback score
0
Posts
73
Reactions
34
Resources
0
I am glad there isn't any script scrub whos like I can do that for $10. When they could do it in 10 seconds..
 

MrDaGree

Freelance Programmer
Premium
Feedback score
0
Posts
103
Reactions
14
Resources
0

He is currently out to work.

...
Code:
public void onCommand()
{
       if (sender instanceof Player)
       {
               Player payer = (Player) sender;
               //Args checks
               Player payed = Bukkit.getPlayerExact(args[1]);
               if (payed != null && (payed.hasPermission("essentials.pay") || vault group check))
               {
                       return true;
               }
               else
               {
                // stop the command from running
               }
       }
}

Edit:
that's a rough outline of how I would do it, don't point out a million errors if you want me to actually turn that into a plugin I will.

How would you "stop" people from being paid? From what I know onCommand doesnt have a way to cancel it.
 

TheNewTao

Java Developer
Premium
Feedback score
0
Posts
654
Reactions
274
Resources
0
He is currently out to work.



How would you "stop" people from being paid? From what I know onCommand doesnt have a way to cancel it.
PlayerCommandPreprocessEvent, check for the command and then cancel.
 

XxminecraftxX

Feedback score
0
Posts
118
Reactions
19
Resources
0
I can code that plugin for you. I will provide support if you are having problems.
Price: $3
Contact: Pm me in McMarket.
 
Status
This thread has been locked.
Top