Added two new flags to Domain:
SNITCH_ON_ENTER
SNITCH_ON_LEAVE
These flags are intended to be added to a Snitch block which will alert the owner (if online) that someone is entering or exiting a field.
The location listed in the snitch alert is the player location as they enter or leave.
A sample snitch block is listed below (don't forget to add it to the config if you use it)
Code (YAML):
base_material
: DEAD_TUBE_CORAL_BLOCK
field_display_material
: LIGHT_BLUE_STAINED_GLASS
field_display_secs
: 30
display_name
: Snitch
block_key
: snitch
lore
: This field will alert the owner
(if online
) when a non-allowed|player enters or exits the field
volume
: 2000
position_1
: CYAN_DYE
position_2
: CYAN_DYE
position_3
: CYAN_DYE
position_4
: CYAN_DYE
position_5
: REDSTONE_BLOCK
position_6
: CYAN_DYE
position_7
: CYAN_DYE
position_8
: CYAN_DYE
position_9
: CYAN_DYE
field_order
: 5
block_in_field
: true
flags:
SNITCH_ON_ENTER
: true
SNITCH_ON_LEAVE
: true
cost_to_place
: 0
cost_to_refund
: 0
cost_to_rent
: 0
rent_days
: 0
default_radius
: 10
default_height_up
: 5
default_height_down
: 5
I'm open to some additional changes to this Snitch functionality, so please reach out if you have any questions, comments or ideas.
Potential changes currently being considered include:
- Allow sneaking to bypass field
- Allow snitch alerts to be queued while owner is offline
- Add a cooldown to snitch alerts