takie coś ma być?
# ==========================================
# /banmace – daje buławę (perm: banmace.give)
# banmace.use – pozwala używać buławy
# banmace.bypass – gracz odporny na buławę
# ==========================================
options:
nazwa: &4&lBan Mace
cooldown: 600
powod: Zostałeś trafiony Ban Mace!
prefix: &8[&4BanMace&8]&r
lore1: &7PPM na gracza: &cinstant kill + ban
lore2: &7Cooldown: &e10 minut
lore3: &8&oBanMace-ID
command /banmace [<player>]:
permission: banmace.give
permission message: {@prefix} &cNie masz uprawnień!
trigger:
set {_p} to arg-1 ? player
give {_p} mace named "{@nazwa}" with lore "{@lore1}", "{@lore2}" and "{@lore3}"
send "{@prefix} &aOtrzymałeś Ban Mace!" to {_p}
on right click on entity:
event-entity is a player
name of player's tool is "{@nazwa}"
player's tool is a mace
lore of player's tool contains "{@lore3}"
cancel event
if player doesn't have permission "banmace.use":
send "{@prefix} &cNie możesz używać tej broni!" to player
stop
set {_teraz} to unix timestamp of now
set {_minelo} to {_teraz} - ({banmace::cd::%player's uuid%} ? 0)
if {_minelo} < {@cooldown}:
# PPM odpala event dla obu rąk – nie spamujemy wiadomością
{_minelo} >= 1
set {_zostalo} to ceil({@cooldown} - {_minelo})
set {_min} to floor({_zostalo} / 60)
set {_sek} to mod({_zostalo}, 60)
send "{@prefix} &cCooldown! Poczekaj jeszcze &e%{_min}%m %{_sek}%s&c." to player
stop
set {_cel} to event-entity
if {_cel} has permission "banmace.bypass":
send "{@prefix} &cTen gracz jest odporny na Ban Mace!" to player
stop
set {banmace::cd::%player's uuid%} to {_teraz}
kill {_cel}
strike lightning effect at {_cel}
ban {_cel} due to "{@powod}"
kick {_cel} due to "&4&lZostałeś zbanowany!%nl%&7Trafiony Ban Mace przez &c%player%"