Commit b5e6d3b9 authored by Tommy Ang's avatar Tommy Ang 🤣

Implement ways to get chest data to check for double chest

parent 6643c825
......@@ -6,6 +6,11 @@
options:
Prefix: [&6PotatoLock&r]
import:
org.bukkit.block.Block as cBlock
org.bukkit.block.DoubleChest
org.bukkit.event.block.BlockPlaceEvent
command /potatolock <text="help"> [<text>]:
aliases: plock
......@@ -50,8 +55,17 @@ command /potatolock <text="help"> [<text>]:
if {plock.readytounlock.%player%} is 1:
clear {plock.readytounlock.%player%}
message "{@Prefix} &cTimed out."
on BlockPlaceEvent:
# skript-mirror get block data using Bukkit API
set {_blockData} to "%event.getBlockPlaced().getBlockData().getAsString()%"
broadcast "%event.getBlockPlaced().getBlockData().getAsString()%"
# type left and right means double chest
if {_blockData} contains "type=left" or "type=right":
broadcast "Double Chest"
# Chest #
# Chest #
on place of a chest:
if block 1 meter south of event-block is a chest:
set {_lockcheck} to block 1 meter south of event-block
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment