Per Player Reclaim Command

Status
This thread has been locked.

Cranked

Owner of Cranked Factions
Premium
Feedback score
25
Posts
443
Reactions
194
Resources
0
Edit: I know this thread was made a while ago, but I still need this plugin done.
Hi, I need a simple reclaim plugin.

The reclaim will be per player, not via ranks. All it is is add commands to the player so after a reset they can type /reclaim to receive crate keys or run other commands. There should be a placeholder for player within the command, so if that player ever changes their username, they can still reclaim.

/reclaim add (name) (command)
Example: /reclaim add Nick cr give %reclaim_player% magical 1
That is the exact command that console will run on purchase. This player will not be able to use /reclaim as the console on purchase will also provide them with their key. However, after a reset, when an admin does /reclaim reset, then all users will be able to use /reclaim. When Nick does /reclaim, the command "cr give %reclaim_player% magical 1" will be ran through console, with %reclaim_player% obviously being replaced with their IGN. If Nick changes his IGN to NickIsHot next reset, then the command /reclaim will run "cr give %reclaim_player% magical 1" with %reclaim_player% being replaced with NickIsHot using UUIDs.

After doing the command /reclaim add, the target player will not be able to reclaim until the /reclaim reset command is ran.

On a reset, running /reclaim reset will reset all of these commands and allow the players to do /reclaim. After doing /reclaim the player will obviously not be able to until an admin runs /reclaim reset.

The basic idea is if someone buys a rank, they will receive that rank automatically as Buycraft will run through console for example /manuadd {name} king as well as the command /reclaim add {name} manuadd %reclaim_player% king
Since /manuadd was already ran, this player cannot do /reclaim. However, after a reset (/reclaim reset), then players can do reclaim to receive their rank.

Messages:
"&8(&d&l!&8) &fA reclaim command has been added to player &dIGN&f." - command ran to console or admin when doing /reclaim add (player) (command)
"&8(&c&l!&8) &fYou have &calready reclaimed &7your donation perks or do not have any items to reclaim. - Command ran to player when trying to do /reclaim after they've already reclaimed or if they don't have any commands to reclaim. This can also include if a player just bought something and had /reclaim add since they can't use /reclaim until the reset
"&8(&d&l!&8) &dIGN &fjust reclaimed his donator items with &d/reclaim&f!" Command broadcasted to the entire server when someone successfully uses /reclaim.
"&8(&4&l!&8) &4&lAre you sure you want to reset reclaims? Confirm with /reclaim confirm." - Command given to an admin to confirm resetting the reclaims.
"&cNo permission." Command given to a non-opped player or someone without the permission reclaim.admin when they try to do /reclaim add or /reclaim reset or /reclaim confirm.
"&8(&c&l!&8) &fYou need to use &c/reclaim reset &fbefore you can confirm!" Message given to an admin if they try to use /reclaim confirm before doing /reclaim reset.

The plugin should also be able to work with UUIDs if players change their names.

The plugin config should not have a list commands, then check if the player can reclaim or not. Rather, it needs to check for every command individually, not just the player as a whole because they could have reclaimable items then buy something in the shop then not be able to reclaim. Rather, it should check for each command.
Example: Nick buys king rank and Paladin GKit, receiving them instantly but not being able to do /reclaim for them. After /reclaim reset is run, Nick can use /reclaim. However, before he does /reclaim, Nick also buys a Villain GKit. Now, nick does /reclaim. He receives the commands necessary for king rank and Paladin, but not villain and it acts normal and successful, with the broadcast message. If he tries to do it again, he gets the "You have already reclaimed or do not have anything to reclaim..." message seen above.

This is an outline of what the config should look like just to help explain it better. Of course it does not have to look like this at all, I'm just trying to show you how I want it to work.
Code:
cef22805-f022-49bf-9292-6aca5ed7516d:
  - 'manuadd %reclaim_player% king'
    able_to_be_reclaimed: false
  - 'manuaddp %reclaim_player% crazyenchantments.gkitz.paladin'
    able_to_be_reclaimed: false
  - 'manuaddp %reclaim_player% crazyenchantments.gkitz.villain'
    able_to_be_reclaimed: true
randomuuid-f022-49bf-9292-6aca5ed7516d:
  - 'manuadd %reclaim_player% king'
    able_to_be_reclaimed: false
  - 'eco give %reclaim_player% 100000'
    able_to_be_reclaimed: true
For the code, the first player can use /reclaim and will receive permission for the villain gkit. Once doing /reclaim, it will be set to false and they will no longer be able to use /reclaim. After /reclaim reset is ran, everything will be set to true until they do /reclaim again.

PM if you can do this with the price you are looking for.
 
Last edited:
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Dori

Full Stack Developer
Supreme
Feedback score
28
Posts
459
Reactions
198
Resources
0
Add me on Discord: Dori_mon#7242
 

OculusTwist

Deactivated
Feedback score
3
Posts
19
Reactions
3
Resources
0
Add me on discord at Oculus#4137 if you're still looking for a developer to do this.
 
Status
This thread has been locked.
Top