function openUnbanMenu(p: player, page: integer = 0):
if size of all banned players is 0:
send "&cThere is no one to unban" to {_p}
else if size of all banned players <= 54:
set {_rows} to ceil(size of all banned players / 9)
create a gui with virtual chest inventory with {_rows} rows named "&8Banned Users":
loop all banned players:
set {_player} to loop-offlineplayer
make next gui slot with skull of {_player} named "&c%{_player}%" with lore "&aClick to unban":
unban {_player}
send "&aYou have unbanned %{_player}%" to {_p}
if size of all banned players is 0:
close {_p}'s inventory
else:
openUnbanMenu({_p})
else:
set {_start} to 1 + 45*{_page}
set {_stop} to {_start} + 45
create a gui with virtual chest inventory with 6 rows named "&8Banned Users (%{_page} + 1%/%ceil(size of all banned players / 45)%)":
loop all banned players:
if loop-iteration = {_stop}:
stop loop
if loop-iteration >= {_start}:
set {_player} to loop-offlineplayer
make next gui slot with skull of {_player} named "&c%{_player}%" with lore "&aClick to unban":
unban {_player}
send "&aYou have unbanned %{_player}%" to {_p}
if size of all banned players < {_start}:
openUnbanMenu({_p}, {_page}-1)
else:
openUnbanMenu({_p}, {_page})
make gui slot (integers between 45 and 53) with black stained glass pane named ""
make gui slot 46 with arrow named "&cBack":
openUnbanMenu({_p}, {_page}-1)
if (size of all banned players >= {_stop}):
make gui slot 52 with arrow named "&aNext":
openUnbanMenu({_p}, {_page} + 1)
open last gui to {_p}
on right click with echo shard:
name of player's tool is "&4Revivor"
openUnbanMenu(player)