#potion apply
1 messages · Page 1 of 1 (latest)
- Code blocks
- Explain your error
- Use
attackerandvictimfor theon death:event
if victim has permission "voucher":
set {_potion1} to infinite potion effect of strength of tier 2
set {_potion2} to infinite potion effect of speed of tier 2
set {_potion3} to infinite potion effect of fire resistance of tier 1
apply {_potion1} to player
apply {_potion2} to player
apply {_potion3} to player```
i switched to this
but it doesnt work either
okay,
notice how you still have player in some parts?
you can also use a list to apply all the potions at once
um i have 1 problem
when i die i get the effects but only for like 1 second even though they show for infinite duration
probably because you die, and minecraft (by default) removes potion effects when that happens. You can use on respawn: instead
can i also ask 1 more thing?
if player is holding a paper named "&etest":
if player doesn't have permission "voucher":
execute console command "lp user %player% permission set voucher"
remove 1 paper named "&etest" from player's inventory
else:
cancel event```
no errors but doenst work
i dont get permission paper doesnt go
(even tho i dotn have the perm)
- You can use
on right-click with paper:to filter the event to only:
- right-clicks (as opposed to left-clicks and inventory-clicks as well)
- trigger when the player's tool = paper
- (A little more advanced), consider using a custom NBT tag to check for the voucher, that way players cant rename normal paper and cheese the system
- You can try debugging, such as
broadcast "You have the permission"in the if statement, andbroadcast "You dont have the permission"in the else
okey tysm