forked from Upstream/CommandPanels
3.16.2.5
This commit is contained in:
parent
9dc1f1bacb
commit
3ca6fde19e
@ -1,4 +1,4 @@
|
||||
version: 3.16.2.4
|
||||
version: 3.16.2.5
|
||||
main: me.rockyhawk.commandpanels.CommandPanels
|
||||
name: CommandPanels
|
||||
author: RockyHawk
|
||||
|
@ -1,14 +1,12 @@
|
||||
package me.rockyhawk.commandpanels;
|
||||
|
||||
import me.rockyhawk.commandpanels.api.Panel;
|
||||
import me.rockyhawk.commandpanels.commandtags.PaywallOutput;
|
||||
import me.rockyhawk.commandpanels.interactives.input.PlayerInput;
|
||||
import me.rockyhawk.commandpanels.openpanelsmanager.PanelPosition;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.inventory.*;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
@ -132,33 +130,16 @@ public class Utils implements Listener {
|
||||
}
|
||||
}
|
||||
commands = commandsAfterSequence;
|
||||
plugin.commandTags.runCommands(panel,position,p,commands,e.getClick());
|
||||
/*for (int i = 0; commands.size() - 1 >= i; i++) {
|
||||
commands.set(i,plugin.commandTags.hasCorrectClick(commands.get(i),e.getClick()));
|
||||
if(commands.get(i).equals("")){
|
||||
//click type is wrong
|
||||
continue;
|
||||
}
|
||||
//start custom command placeholders
|
||||
|
||||
for (int i = 0; commands.size() > i; i++) {
|
||||
try {
|
||||
commands.set(i, commands.get(i).replaceAll("%cp-clicked%", clicked.getType().toString()));
|
||||
commands.set(i, commands.get(i).replaceAll("%cp-clicked%", e.getCurrentItem().getType().toString()));
|
||||
} catch (Exception mate) {
|
||||
commands.set(i, commands.get(i).replaceAll("%cp-clicked%", "Air"));
|
||||
commands.set(i, commands.get(i).replaceAll("%cp-clicked%", "AIR"));
|
||||
}
|
||||
}
|
||||
|
||||
//end custom command PlaceHolders
|
||||
|
||||
//make the command
|
||||
String command = plugin.tex.placeholders(panel,position,p,commands.get(i));
|
||||
|
||||
PaywallOutput val = plugin.commandTags.commandPayWall(panel,p,command);
|
||||
if(val == PaywallOutput.Blocked){
|
||||
return;
|
||||
}
|
||||
if(val == PaywallOutput.NotApplicable){
|
||||
plugin.commandTags.runCommand(panel,position, p, commands.get(i));
|
||||
}
|
||||
}*/
|
||||
plugin.commandTags.runCommands(panel,position,p,commands,e.getClick());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -30,6 +30,13 @@ public class CreateText {
|
||||
}
|
||||
}
|
||||
|
||||
//CommandPanels send message function without the tag
|
||||
public void sendString(Panel panel,PanelPosition position, Player p, String message){
|
||||
if(!message.equals("")) {
|
||||
p.sendMessage(placeholders(panel,position, p,message));
|
||||
}
|
||||
}
|
||||
|
||||
//CommandPanels send message function without the tag
|
||||
public void sendString(Player p, String message){
|
||||
if(!message.equals("")) {
|
||||
|
@ -50,7 +50,7 @@ public class BasicTags implements Listener {
|
||||
}
|
||||
if(e.name.equalsIgnoreCase("msg=")) {
|
||||
e.commandTagUsed();
|
||||
e.p.sendMessage(String.join(" ",e.args));
|
||||
plugin.tex.sendString(e.panel,e.pos,e.p,String.join(" ",e.args));
|
||||
return;
|
||||
}
|
||||
if(e.name.equalsIgnoreCase("op=")) {
|
||||
|
Loading…
Reference in New Issue
Block a user