Advertisement
L0v0lup

Skript-Reflect ✎ GUIs: Schneller und sicherer #03 Tutorial

Sep 23rd, 2022 (edited)
1,237
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.60 KB | Gaming | 0 0
  1. import:
  2.     org.bukkit.event.inventory.InventoryClickEvent
  3.    
  4. on InventoryClickEvent: #("on inventory click" in Skript)
  5.     set {_p} to event.getWhoClicked()
  6.     set {_slot} to event.getSlot()
  7.     {_slot} != -999
  8.     try event.getView().getTitle() = "Tutorial"
  9.     #event.getClickedInventory() != {_p}.getInventory() #Nicht anzuraten!
  10.     broadcast "%event.getCurrentItem().getType()%"
  11.     if event.getCurrentItem().getType().toString() = "STONE": #Gleich zu "%event.getCurrentItem().getType()%" = "STONE"
  12.         event.setCancelled(true)
  13.  
  14. command test2:
  15.     trigger:
  16.         open chest inventory named "Tutorial" with 3 rows to player
  17.  
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement