forked from Upstream/CommandPanels
v3.15.3.1
This commit is contained in:
parent
6c0655e6e9
commit
b26a880b00
@ -1,7 +1,7 @@
|
||||
<component name="libraryTable">
|
||||
<library name="MMOLib">
|
||||
<library name="MythicLib-1.0.16">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/../../Tools/Build Tools/Jar Libraries/MMOLib.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/../../Tools/Build Tools/Jar Libraries/MythicLib-1.0.16.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
@ -14,10 +14,10 @@
|
||||
<orderEntry type="library" name="PlaceholderAPI-2.10.8" level="project" />
|
||||
<orderEntry type="library" name="VotingPlugin" level="project" />
|
||||
<orderEntry type="library" name="MMOItems-6.5.1" level="project" />
|
||||
<orderEntry type="library" name="MMOLib" level="project" />
|
||||
<orderEntry type="library" name="spigot-1.16.4" level="project" />
|
||||
<orderEntry type="library" name="spigot-1.13.2" level="project" />
|
||||
<orderEntry type="library" name="CustomItemsAPI_PLACEHOLDER" level="project" />
|
||||
<orderEntry type="library" name="ChestSort" level="project" />
|
||||
<orderEntry type="library" name="MythicLib-1.0.16" level="project" />
|
||||
</component>
|
||||
</module>
|
@ -1,4 +1,4 @@
|
||||
version: 3.15.3.0
|
||||
version: 3.15.3.1
|
||||
main: me.rockyhawk.commandpanels.CommandPanels
|
||||
name: CommandPanels
|
||||
author: RockyHawk
|
||||
|
@ -6,6 +6,7 @@ import java.util.concurrent.Callable;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import io.lumine.mythic.lib.api.item.NBTItem;
|
||||
import me.clip.placeholderapi.PlaceholderAPI;
|
||||
import me.rockyhawk.commandpanels.api.CommandPanelsAPI;
|
||||
import me.rockyhawk.commandpanels.api.Panel;
|
||||
@ -45,7 +46,6 @@ import me.rockyhawk.commandpanels.interactives.CommandpanelUserInput;
|
||||
import me.rockyhawk.commandpanels.interactives.Commandpanelrefresher;
|
||||
import me.rockyhawk.commandpanels.updater.Updater;
|
||||
import net.milkbowl.vault.economy.Economy;
|
||||
import net.mmogroup.mmolib.api.item.NBTItem;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
|
@ -4,6 +4,7 @@ import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
@ -38,12 +39,14 @@ public class Panel{
|
||||
public void setName(String name){
|
||||
this.panelName = name;
|
||||
}
|
||||
|
||||
public void setConfig(ConfigurationSection config){
|
||||
if(config.contains("panels")){
|
||||
config = config.getConfigurationSection("panels." + this.panelName);
|
||||
}
|
||||
this.panelConfig = config;
|
||||
}
|
||||
|
||||
public void setFile(File file){
|
||||
this.panelFile = file;
|
||||
this.panelConfig = YamlConfiguration.loadConfiguration(file).getConfigurationSection("panels." + this.getName());
|
||||
@ -81,6 +84,11 @@ public class Panel{
|
||||
return this.panelConfig.contains("open-with-item");
|
||||
}
|
||||
|
||||
//this will make a preview of the inventory using a certain player
|
||||
public Inventory getInventory(Player p){
|
||||
return plugin.createGUI.openGui(this,p,2,0);
|
||||
}
|
||||
|
||||
//open the panel for the player, it will disable debug mode
|
||||
public void open(Player p){
|
||||
if(plugin.debug.isEnabled(p)){
|
||||
|
@ -69,6 +69,12 @@ public class Commandpanelrefresher implements Listener {
|
||||
}
|
||||
//refresh here
|
||||
if(plugin.openPanels.hasPanelOpen(p.getName(),pn.getName())){
|
||||
if(p.getOpenInventory().getTopInventory().getHolder() != p){
|
||||
//if open inventory is not a panel (owned by the player holder), cancel
|
||||
this.cancel();
|
||||
return;
|
||||
}
|
||||
|
||||
if(c == 0) {
|
||||
//animation counter
|
||||
if(animatevalue != -1) {
|
||||
|
@ -36,10 +36,9 @@ public class OpenGUI {
|
||||
|
||||
Inventory i;
|
||||
if(isNumeric(pconfig.getString("rows"))){
|
||||
i = Bukkit.createInventory(null, pconfig.getInt("rows") * 9, title);
|
||||
|
||||
i = Bukkit.createInventory(p, pconfig.getInt("rows") * 9, title);
|
||||
}else{
|
||||
i = Bukkit.createInventory(null, InventoryType.valueOf(pconfig.getString("rows")), title);
|
||||
i = Bukkit.createInventory(p, InventoryType.valueOf(pconfig.getString("rows")), title);
|
||||
}
|
||||
|
||||
Set<String> itemList = pconfig.getConfigurationSection("item").getKeys(false);
|
||||
|
Loading…
Reference in New Issue
Block a user