panel-title= <value> addition. ONLY WORKS ON STATIC PANELS!

This commit is contained in:
TinyTank800 2024-05-04 12:16:03 -07:00
parent 42e2d252e6
commit 5ce5e3dcfd

View File

@ -70,6 +70,20 @@ public class SpecialTags implements Listener {
}
return;
}
if(e.name.equalsIgnoreCase("panel-title=")) {
e.commandTagUsed();
//added into the 1.20 API
//will set the open panel title to the provided string panel-title= <VALUE>
//AS OF TINYTANK800's pull this only works on static panels!
if(e.args.length >= 1){
StringBuilder title = new StringBuilder();
for(String args : e.args){
title.append(args).append(" ");
}
e.p.getOpenInventory().setTitle(title.toString());
}
return;
}
if(e.name.equalsIgnoreCase("title=")) {
e.commandTagUsed();
//added into the 1.11 API