function listNote(pl: offline player,p: player, page: number):
set {_liststart} to 45*{_page}
set {_i} to 1
set {_a} to 0
wait 3 ticks
create gui with virtual chest with size 6 named "{@i-t}":
loop {notelist::%{_pl}%::*}:
set {_id} to loop-index
set {_v} to loop-value
set {_vlist::*} to {_v} split at "["
(loop-index parsed as integer) > {_liststart}
if {notify::%{_pl}%::%{_id}%} is true:
make gui slot {_a} with shiny paper named "{@n-f}" with lore "{@t-c}[%{_vlist::3}%||{@t-c}[%{_vlist::2}%||{@l-c}Sift+L-click to toggle Note Notify||{@l-c}Shift+R-click to delete":
if gui-click-action is left mouse button with shift:
noteNotify({_pl}, {_p}, {_id})
listNote({_pl}, {_p}, 0)
if gui-click-action is right mouse button with shift:
delNote({_pl}, {_p}, {_id})
listNote({_pl}, {_p}, 0)
else:
make gui slot {_a} with paper named "{@n-f}" with lore "{@t-c}[%{_vlist::3}%||{@t-c}[%{_vlist::2}%||{@l-c}Sift+L-click to toggle Note Notify||{@l-c}Shift+R-click to delete":
if gui-click-action is left mouse button with shift:
noteNotify({_pl}, {_p}, {_id})
listNote({_pl}, {_p}, 0)
if gui-click-action is right mouse button with shift:
delNote({_pl}, {_p}, {_id})
listNote({_pl}, {_p}, 0)
if "%loop-value%" contains "Jailed" or "Jail":
if {notify::%{_pl}%::%{_id}%} is true:
make gui slot {_a} with shiny bars named "{@n-f}" with lore "{@t-c}[%{_vlist::3}%||{@t-c}[%{_vlist::2}%||{@l-c}Sift+L-click to toggle Note Notify||{@l-c}Shift+R-click to delete":
if gui-click-action is left mouse button with shift:
noteNotify({_pl}, {_p}, {_id})
listNote({_pl}, {_p}, 0)
if gui-click-action is right mouse button with shift:
delNote({_pl}, {_p}, {_id})
listNote({_pl}, {_p}, 0)
else:
make gui slot {_a} with bars named "{@n-f}" with lore "{@t-c}[%{_vlist::3}%||{@t-c}[%{_vlist::2}%||{@l-c}Sift+L-click to toggle Note Notify||{@l-c}Shift+R-click to delete":
if gui-click-action is left mouse button with shift:
noteNotify({_pl}, {_p}, {_id})
listNote({_pl}, {_p}, 0)
if gui-click-action is right mouse button with shift:
delNote({_pl}, {_p}, {_id})
listNote({_pl}, {_p}, 0)
if "%loop-value%" contains "Muted" or "Mute":
if {notify::%{_pl}%::%{_id}%} is true:
make gui slot {_a} with shiny record named "{@n-f}" with lore "{@t-c}[%{_vlist::3}%||{@t-c}[%{_vlist::2}%||{@l-c}Sift+L-click to toggle Note Notify||{@l-c}Shift+R-click to delete":
if gui-click-action is left mouse button with shift:
noteNotify({_pl}, {_p}, {_id})
listNote({_pl}, {_p}, 0)
if gui-click-action is right mouse button with shift:
delNote({_pl}, {_p}, {_id})
listNote({_pl}, {_p}, 0)
else:
make gui slot {_a} with record named "{@n-f}" with lore "{@t-c}[%{_vlist::3}%||{@t-c}[%{_vlist::2}%||{@l-c}Sift+L-click to toggle Note Notify||{@l-c}Shift+R-click to delete":
if gui-click-action is left mouse button with shift:
noteNotify({_pl}, {_p}, {_id})
listNote({_pl}, {_p}, 0)
if gui-click-action is right mouse button with shift:
delNote({_pl}, {_p}, {_id})
listNote({_pl}, {_p}, 0)
if "%loop-value%" contains "Banned", "Ban", "Temp-Banned", "Tempbanned" or "Temp banned":
if {notify::%{_pl}%::%{_id}%} is true:
make gui slot {_a} with shiny barrier named "{@n-f}" with lore "{@t-c}[%{_vlist::3}%||{@t-c}[%{_vlist::2}%||{@l-c}Sift+L-click to toggle Note Notify||{@l-c}Shift+R-click to delete":
if gui-click-action is left mouse button with shift:
noteNotify({_pl}, {_p}, {_id})
listNote({_pl}, {_p}, 0)
if gui-click-action is right mouse button with shift:
delNote({_pl}, {_p}, {_id})
listNote({_pl}, {_p}, 0)
else:
make gui slot {_a} with barrier named "{@n-f}" with lore "{@t-c}[%{_vlist::3}%||{@t-c}[%{_vlist::2}%||{@l-c}Sift+L-click to toggle Note Notify||{@l-c}Shift+R-click to delete":
if gui-click-action is left mouse button with shift:
noteNotify({_pl}, {_p}, {_id})
listNote({_pl}, {_p}, 0)
if gui-click-action is right mouse button with shift:
delNote({_pl}, {_p}, {_id})
listNote({_pl}, {_p}, 0)
if "%loop-value%" contains "TicketOpen:":
if {notify::%{_pl}%::%{_id}%} is true:
make gui slot {_a} with shiny light green banner item named "{@t-c}[%{_vlist::3}%||{@t-c}[%{_vlist::2}%||{@l-c}Sift+L-click to toggle Note Notify||{@l-c}Shift+R-click to delete":
if gui-click-action is left mouse button with shift:
noteNotify({_pl}, {_p}, {_id})
listNote({_pl}, {_p}, 0)
if gui-click-action is right mouse button with shift:
delNote({_pl}, {_p}, {_id})
listNote({_pl}, {_p}, 0)
else:
make gui slot {_a} with light green banner item named "{@n-f}" with lore "{@t-c}[%{_vlist::3}%||{@t-c}[%{_vlist::2}%||{@l-c}Sift+L-click to toggle Note Notify||{@l-c}Shift+R-click to delete":
if gui-click-action is left mouse button with shift:
noteNotify({_pl}, {_p}, {_id})
listNote({_pl}, {_p}, 0)
if gui-click-action is right mouse button with shift:
delNote({_pl}, {_p}, {_id})
listNote({_pl}, {_p}, 0)
if "%loop-value%" contains "TicketClosed":
make gui slot {_a} with red banner item named "{@n-f}" with lore "{@t-c}[%{_vlist::3}%||{@t-c}[%{_vlist::2}%||{@l-c}Shift+R-click to delete":
if gui-click-action is right mouse button with shift:
delNote({_pl}, {_p}, {_id})
listNote({_pl}, {_p}, 0)
add 1 to {_a}
if {_a} = ((45*{_i})):
exit loop
make gui slot 48 with eye of ender named "{@g-c}Refresh":
listNote({_pl}, {_p}, 0)
make gui slot 50 with fire charge named "{@g-c}Delete All Notes":
delAll({_pl}, {_p})
if size of {notelist::%{_pl}%::*} > {_liststart} + 45:
make gui slot 53 with emerald named "{@g-c}Next Page":
listNote({_pl}, {_p}, ({_page} + 1))
if {_page} > 0:
make gui slot 45 with emerald named "{@g-c}Previous Page":
listNote({_pl}, {_p}, ({_page} - 1))
open last gui to {_p}