forked from Upstream/CommandPanels
3.18.4.1
This commit is contained in:
parent
24e1b3b6e4
commit
d74d0b7051
@ -1,4 +1,4 @@
|
||||
version: 3.18.4.0
|
||||
version: 3.18.4.1
|
||||
main: me.rockyhawk.commandpanels.CommandPanels
|
||||
name: CommandPanels
|
||||
author: RockyHawk
|
||||
|
@ -46,7 +46,7 @@ public class Commandpanel implements CommandExecutor {
|
||||
//below will start the command, once it got the right file and panel
|
||||
if (cmd.getName().equalsIgnoreCase("cp") || cmd.getName().equalsIgnoreCase("commandpanel") || cmd.getName().equalsIgnoreCase("cpanel")) {
|
||||
if(!(sender instanceof Player)) {
|
||||
//do console command command
|
||||
//do console command
|
||||
if(args.length == 2){
|
||||
if(!args[1].equals("item")){
|
||||
plugin.openVoids.openCommandPanel(sender, plugin.getServer().getPlayer(args[1]), panel.copy(), PanelPosition.Top, true);
|
||||
|
@ -275,7 +275,7 @@ public class CommandTags {
|
||||
}
|
||||
}
|
||||
|
||||
//if custom item is an mmo item (1.14+ for the API)
|
||||
//if custom item is a mmo item (1.14+ for the API)
|
||||
try {
|
||||
if (plugin.getServer().getPluginManager().isPluginEnabled("MMOItems") && panel.getConfig().getString("custom-item." + command.split("\\s")[1] + ".material").startsWith("mmo=")) {
|
||||
String customItemMaterial = panel.getConfig().getString("custom-item." + command.split("\\s")[1] + ".material");
|
||||
@ -319,11 +319,13 @@ public class CommandTags {
|
||||
//send message and return
|
||||
if(removedItem == PaywallOutput.Blocked){
|
||||
if(plugin.config.getBoolean("purchase.item.enable")){
|
||||
plugin.tex.sendString(panel, PanelPosition.Top, p, Objects.requireNonNull(plugin.config.getString("purchase.item.success")).replaceAll("%cp-args%", command.split("\\s")[1]));
|
||||
//no item was found
|
||||
plugin.tex.sendString(panel, PanelPosition.Top, p, Objects.requireNonNull(plugin.config.getString("purchase.item.failure")).replaceAll("%cp-args%", command.split("\\s")[1]));
|
||||
}
|
||||
}else{
|
||||
if(plugin.config.getBoolean("purchase.item.enable")){
|
||||
plugin.tex.sendString(panel, PanelPosition.Top, p, Objects.requireNonNull(plugin.config.getString("purchase.item.failure")).replaceAll("%cp-args%", command.split("\\s")[1]));
|
||||
//item was removed
|
||||
plugin.tex.sendString(panel, PanelPosition.Top, p, Objects.requireNonNull(plugin.config.getString("purchase.item.success")).replaceAll("%cp-args%", command.split("\\s")[1]));
|
||||
}
|
||||
}
|
||||
return removedItem;
|
||||
|
@ -254,6 +254,10 @@ public class CPEventHandler implements Listener {
|
||||
plugin.reloadPanelFiles();
|
||||
return;
|
||||
case "panelname":
|
||||
if(panel.getName().equals(playerInput.split("\\s")[0])) {
|
||||
e.getPlayer().sendMessage(ChatColor.RED + "Changed name is not different!");
|
||||
return;
|
||||
}
|
||||
YamlConfiguration newConfig = YamlConfiguration.loadConfiguration(panel.getFile());
|
||||
newConfig.set("panels." + playerInput.split("\\s")[0], panel.getConfig());
|
||||
newConfig.set("panels." + panel.getName(), null);
|
||||
|
Loading…
Reference in New Issue
Block a user