Jump to content
  • 0

How do i find the closest player while using a "essentials:" command?


Underatedz

Question

Im making a kinda vanilla server and am making a bank, i want it so that when you click a button it will find the nearest player and take 50 coins away from it. The command i am using is:

"essentials:economy take @p 50"

which would take away 50 coins however the @p argument is not supported on essentials command. Anyone know how to find the closest player on essentials commands?

Thank you in advance

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

If you have essentials, commands need to be like /plugin:command @p so since you did /essentials:eco take @p it should have worked. Maybe try @s instead. @s is the person who activated the command block.

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

  • 0
8 minutes ago, _Tarna_ said:

If you have essentials, commands need to be like /plugin:command @p so since you did /essentials:eco take @p it should have worked. Maybe try @s instead. @s is the person who activated the command block.

nope doesnt work, the error is "Error: Player Not Found." 

Essentials does not support the @ arguments i believe. it only works if the "/minecraft:command" is the plugin spot. is there a essentials argument like this?

 
Link to comment
Share on other sites

  • 0
5 minutes ago, Underatedz said:

nope doesnt work, the error is "Error: Player Not Found." 

Essentials does not support the @ arguments i believe. it only works if the "/minecraft:command" is the plugin spot. is there a essentials argument like this?

Not sure then. You can try using a plugin called skript to make commands that does this instead if you want.

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...