Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Anti-Portal Trap skript by Fleft
- # /antiportaltrip on/off/toggle
- options:
- # chat color used
- C: §c
- # stops lava flow within 5 blocks of portals
- on flow:
- {AntiPortalTrap} is true
- event-block is lava or flowing lava
- loop blocks in radius 5 around event-block:
- loop-block is portal
- cancel the event
- # prevents lava/fire placement within 5 blocks of portals
- on place:
- {AntiPortalTrap} is true
- event-block is lava or fire
- loop blocks in radius 5 around event-block:
- loop-block is portal
- cancel the event
- # used to remove fire/lava when a player enters a portal
- on portal:
- {AntiPortalTrap} is true
- wait 2 ticks
- loop blocks in radius 5 around event-player:
- loop-block is lava or fire
- set loop-block to air
- # command
- command /antiportaltrap [<text>]:
- aliases: /apt
- permission: skript.portaltrap
- trigger:
- if arg-1 is "on" or "enable":
- broadcast "{@C}Anti-Portal Trap enabled!"
- set {AntiPortalTrap} to true
- else if arg-1 is "off" or "disable":
- broadcast "{@C}Anti-Portal Trap disabled!"
- delete {AntiPortalTrap}
- else if arg-1 is "toggle":
- if {AntiPortalTrap} is true:
- command "/antiportaltrap off"
- else:
- command "/antiportaltrap on"
- else:
- message "{@C}/antiportaltrap on/off"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement