Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checking Block Location in block_interact Event vs Player's Location #75

Open
Reeferx7 opened this issue Jul 12, 2024 · 2 comments
Open

Comments

@Reeferx7
Copy link

Reeferx7 commented Jul 12, 2024

Is it possible to check the location of the block_interact event rather than the player's body? For example, if the player is on their plot (using the Towny plugin) with the condition %townyadvanced_player_plot_is_trusted% == true, and they move to the edge of their plot, they can interact with blocks from another plot.

here my event

Events:
paint_wool:
type: block_interact
enabled: true
conditions:
- '%action_type% == RIGHT_CLICK'
- '%townyadvanced_player_plot_is_trusted% == true'
- '%block% contains WOOL'
- '%item% == WHITE_DYE execute white_wool'
actions:
white_wool:
- "console_command: execute at %player% run setblock %block_x% %block_y% %block_z% minecraft:white_wool"

@Ajneb97
Copy link
Owner

Ajneb97 commented Jul 12, 2024

The location of the block interact is provided by the %block_% variables. If you need to check if the block clicked is on a townyadvanced plot, that plugin must provide a variable to check that from a location.

@Reeferx7
Copy link
Author

Thanks for your answer. I don't think the Towny plugin has those placeholders; I'll try to find another solution.

I was thinking if it could be done using ConditionalEvents .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants