forked from Upstream/CommandPanels
3.19.0.3
This commit is contained in:
parent
4333a9903f
commit
fff7fd4226
@ -1,4 +1,4 @@
|
||||
version: 3.19.0.2
|
||||
version: 3.19.0.3
|
||||
main: me.rockyhawk.commandpanels.CommandPanels
|
||||
name: CommandPanels
|
||||
author: RockyHawk
|
||||
|
@ -201,7 +201,7 @@ public class CommandTags {
|
||||
}
|
||||
case "item-paywall=": {
|
||||
//if player uses item-paywall= [Material] [Amount] <id:#> <custom-data:#>
|
||||
//player can use item-paywall= [custom-item]
|
||||
//player can use item-paywall= [custom-item] [Amount]
|
||||
List<ItemStack> cont = new ArrayList<>(Arrays.asList(plugin.inventorySaver.getNormalInventory(p)));
|
||||
List<ItemStack> remCont = new ArrayList<>();
|
||||
String[] args = command.split("\\s");
|
||||
@ -226,6 +226,7 @@ public class CommandTags {
|
||||
ItemStack sellItem;
|
||||
if (Material.matchMaterial(args[1]) == null) {
|
||||
sellItem = plugin.itemCreate.makeCustomItemFromConfig(panel, PanelPosition.Top, panel.getConfig().getConfigurationSection("custom-item." + args[1]), p, true, true, false);
|
||||
sellItem.setAmount(Integer.parseInt(args[2]));
|
||||
} else {
|
||||
sellItem = new ItemStack(Objects.requireNonNull(Material.matchMaterial(args[1])), Integer.parseInt(args[2]));
|
||||
}
|
||||
|
@ -54,7 +54,10 @@ public class UtilsPanelsLoader implements Listener {
|
||||
public void run() {
|
||||
//end the old panel session and copy a new one
|
||||
plugin.openPanels.getOpenPanel(playerName,PanelPosition.Top).isOpen = false;
|
||||
plugin.openPanels.getOpenPanel(playerName,PanelPosition.Top).copy().open(Bukkit.getPlayer(playerName), PanelPosition.Top);
|
||||
Panel reopenedPanel = plugin.openPanels.getOpenPanel(playerName,PanelPosition.Top).copy();
|
||||
//re-add placeholders as they are not transferred in the Panel object
|
||||
reopenedPanel.placeholders.keys = plugin.openPanels.getOpenPanel(playerName,PanelPosition.Top).placeholders.keys;
|
||||
reopenedPanel.open(Bukkit.getPlayer(playerName), PanelPosition.Top);
|
||||
}
|
||||
});
|
||||
return;
|
||||
|
@ -84,6 +84,8 @@ public class Updater implements Listener {
|
||||
HttpURLConnection connection;
|
||||
try {
|
||||
connection = (HttpURLConnection) new URL("https://raw.githubusercontent.com/rockyhawk64/CommandPanels/master/resource/plugin.yml").openConnection();
|
||||
connection.setConnectTimeout(5000); // 5 seconds
|
||||
connection.setReadTimeout(5000); // 5 seconds
|
||||
connection.connect();
|
||||
cachedLatestVersion = new BufferedReader(new InputStreamReader(connection.getInputStream())).readLine().split("\\s")[1];
|
||||
connection.disconnect();
|
||||
|
Loading…
Reference in New Issue
Block a user