This commit is contained in:
rockyhawk64 2021-07-15 19:29:35 +10:00
parent 5a28956c8f
commit c3274d7193
3 changed files with 16 additions and 1 deletions

View File

@ -1,4 +1,4 @@
version: 3.16.2.1
version: 3.16.2.2
main: me.rockyhawk.commandpanels.CommandPanels
name: CommandPanels
author: RockyHawk

View File

@ -32,6 +32,14 @@ public class UserInputUtils implements Listener {
return;
}
playerInput.get(e.getPlayer()).panel.placeholders.addPlaceholder("player-input",e.getMessage());
//get certain words from the input
int c = 0;
for(String message : e.getMessage().split("\\s")){
playerInput.get(e.getPlayer()).panel.placeholders.addPlaceholder("player-input-" + (c+1),message);
c++;
}
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
public void run() {
plugin.commandTags.runCommands(playerInput.get(e.getPlayer()).panel, PanelPosition.Top,e.getPlayer(), playerInput.get(e.getPlayer()).commands); //I have to do this to run regular Bukkit voids in an ASYNC Event

View File

@ -43,6 +43,13 @@ public class OpenGUI {
}
}else{
i = p.getInventory();
//if middle or bottom position, old items need to be cleared
for (int c = 0; getInvSize(i,position) > c; ++c) {
if(pconfig.getConfigurationSection("item").getKeys(false).contains(String.valueOf(c))){
continue;
}
setItem(null, c, i, p, position);
}
}
Set<String> itemList = pconfig.getConfigurationSection("item").getKeys(false);