Jump to content

Custom Command instructions


itachi1194
 Share

Recommended Posts

Currently running on Java 1.164.

Just looking to see if i can make a custom /shop to teleport anyone that types that in chat to a specific area. 

Also fairly new, so any instructions id need from ground up (need command block, enter console, etc)

We basically want to set an area as a shop but we live far apart.

I have luck perms and essentialsx, not sure if i can use that. 

Thanks in advance. 

Link to comment
Share on other sites

  • 2 weeks later...

First of all, you will have to reference the shop spawn coords

 

command /setshop:

    permission: op

    trigger:

        set {shop} to location of block at location of player

        send "Shop spawn set to %{spawn}%!" to player

 

Then for the /spawn command

 

command /shop:

    trigger:

        teleport player to {shop}

        send "Teleported!" to player

  • Like 1
Link to comment
Share on other sites

3 hours ago, ILIKECAKEBOY said:

First of all, you will have to reference the shop spawn coords

 

command /setshop:

    permission: op

    trigger:

        set {shop} to location of block at location of player

        send "Shop spawn set to %{spawn}%!" to player

 

Then for the /spawn command

 

command /shop:

    trigger:

        teleport player to {shop}

        send "Teleported!" to player

You used two different variables...

command /setshop:
	trigger:
		if player is not op:
			send "OP is required."
			stop
		set {shop::loc} to player's location
		send "Shop Location has been set to {shop::loc}."

command /shop:
	trigger:
		teleport player to {shop::loc}
		send "Warping to shop."

 

Edited by Minehut

Founder - Minehut.xyz

The leading Minehut support website. We aim to provide top quality tutorials, provide answers to top questions, and help in any way we can. Our site is community driven, and we will continue to make it better and better.

Support | 28/08/20 -13/09/20

Senior Support | 13/09/20 - 19/10/20

 

forums.gif.5d3db2db4a05c9465b84fa9bf0293df4.gif

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
 Share



×
×
  • Create New...