-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Milestone
Description
There should be a way to allow and disallow actions such as block break, place and interact.
This would be useful for both singleplayer and multiplayer.
In singleplayer it could be useful for making dungeon that can be modified only after player has conquered it or a village houses that player can only interact with but not modify them.
In multiplayer it would be usefull for stuff like plots, and restricted areas made by players or srv admins.
Example (if single returns false dissallow action):
BlockEvents.registerBlockBreakContition("example_block_break_condition", piority_int, (player, blockState, zone, x, y, z) -> {
return !(x==0 || y==0 || z==0);
});
BlockEvents.registerBlockPlaceContition("example_block_place_condition", piority_int,, (player, blockState, zone, x, y, z) -> {
return !(x==0 || y==0 || z==0);
});
BlockEvents.registerBlockInteractContition("example_block_interact_condition", piority_int,, (player, blockState, zone, x, y, z) -> {
return !(x==0 || y==0 || z==0);
});In those example there is no variable called was_canceled, but there could be use for option to check was event canceled cause mayby other condition might want to override it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels