forked from Upstream/CommandPanels
3.10.4 Fixes
This commit is contained in:
parent
c71a54c765
commit
41a2e29777
@ -1,5 +1,5 @@
|
||||
version: 3.10.3
|
||||
main: me.rockyhawk.commandPanels.commandpanels
|
||||
version: 3.10.4
|
||||
main: me.rockyhawk.commandpanels.CommandPanels
|
||||
name: CommandPanels
|
||||
author: RockyHawk
|
||||
api-version: '1.13'
|
||||
|
@ -1,4 +1,4 @@
|
||||
package me.rockyhawk.commandPanels;
|
||||
package me.rockyhawk.commandpanels;
|
||||
|
||||
import com.Ben12345rocks.VotingPlugin.UserManager.UserManager;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
@ -16,26 +16,26 @@ import java.util.regex.Pattern;
|
||||
|
||||
import me.clip.placeholderapi.PlaceholderAPI;
|
||||
import me.realized.tokenmanager.api.TokenManager;
|
||||
import me.rockyhawk.commandPanels.ClassResources.*;
|
||||
import me.rockyhawk.commandPanels.commands.*;
|
||||
import me.rockyhawk.commandPanels.completeTabs.cpTabComplete;
|
||||
import me.rockyhawk.commandPanels.generatePanels.commandpanelsgenerate;
|
||||
import me.rockyhawk.commandPanels.generatePanels.newGenUtils;
|
||||
import me.rockyhawk.commandPanels.generatePanels.tabCompleteGenerate;
|
||||
import me.rockyhawk.commandPanels.ingameEditor.cpIngameEditCommand;
|
||||
import me.rockyhawk.commandPanels.ingameEditor.cpTabCompleteIngame;
|
||||
import me.rockyhawk.commandPanels.ingameEditor.editorUserInput;
|
||||
import me.rockyhawk.commandPanels.ingameEditor.editorUtils;
|
||||
import me.rockyhawk.commandpanels.classresources.*;
|
||||
import me.rockyhawk.commandpanels.commands.*;
|
||||
import me.rockyhawk.commandpanels.completetabs.CpTabComplete;
|
||||
import me.rockyhawk.commandpanels.generatepanels.Commandpanelsgenerate;
|
||||
import me.rockyhawk.commandpanels.generatepanels.NewGenUtils;
|
||||
import me.rockyhawk.commandpanels.generatepanels.TabCompleteGenerate;
|
||||
import me.rockyhawk.commandpanels.ingameeditor.CpIngameEditCommand;
|
||||
import me.rockyhawk.commandpanels.ingameeditor.CpTabCompleteIngame;
|
||||
import me.rockyhawk.commandpanels.ingameeditor.EditorUserInput;
|
||||
import me.rockyhawk.commandpanels.ingameeditor.EditorUtils;
|
||||
|
||||
import me.rockyhawk.commandPanels.ioClasses.sequence_1_13;
|
||||
import me.rockyhawk.commandPanels.ioClasses.sequence_1_14;
|
||||
import me.rockyhawk.commandpanels.ioclasses.Sequence_1_13;
|
||||
import me.rockyhawk.commandpanels.ioclasses.Sequence_1_14;
|
||||
|
||||
import me.rockyhawk.commandPanels.openWithItem.utilsOpenWithItem;
|
||||
import me.rockyhawk.commandPanels.panelBlocks.blocksTabComplete;
|
||||
import me.rockyhawk.commandPanels.panelBlocks.commandpanelblocks;
|
||||
import me.rockyhawk.commandPanels.panelBlocks.panelBlockOnClick;
|
||||
import me.rockyhawk.commandPanels.premium.commandpanelUserInput;
|
||||
import me.rockyhawk.commandPanels.premium.commandpanelrefresher;
|
||||
import me.rockyhawk.commandpanels.openwithitem.UtilsOpenWithItem;
|
||||
import me.rockyhawk.commandpanels.panelblocks.BlocksTabComplete;
|
||||
import me.rockyhawk.commandpanels.panelblocks.Commandpanelblocks;
|
||||
import me.rockyhawk.commandpanels.panelblocks.PanelBlockOnClick;
|
||||
import me.rockyhawk.commandpanels.premium.CommandpanelUserInput;
|
||||
import me.rockyhawk.commandpanels.premium.Commandpanelrefresher;
|
||||
import net.milkbowl.vault.economy.Economy;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@ -49,7 +49,7 @@ import org.bukkit.inventory.meta.*;
|
||||
import org.bukkit.plugin.RegisteredServiceProvider;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public class commandpanels extends JavaPlugin {
|
||||
public class CommandPanels extends JavaPlugin {
|
||||
public YamlConfiguration config;
|
||||
public Economy econ = null;
|
||||
public boolean update = false;
|
||||
@ -73,7 +73,7 @@ public class commandpanels extends JavaPlugin {
|
||||
public File panelsf;
|
||||
public YamlConfiguration blockConfig; //where panel block locations are stored
|
||||
|
||||
public commandpanels() {
|
||||
public CommandPanels() {
|
||||
this.panelsf = new File(this.getDataFolder() + File.separator + "panels");
|
||||
this.blockConfig = YamlConfiguration.loadConfiguration(new File(getDataFolder() + File.separator + "blocks.yml"));
|
||||
}
|
||||
@ -84,29 +84,29 @@ public class commandpanels extends JavaPlugin {
|
||||
this.setupEconomy();
|
||||
this.getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");
|
||||
new Metrics(this);
|
||||
Objects.requireNonNull(this.getCommand("commandpanel")).setExecutor(new commandpanel(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpanel")).setTabCompleter(new cpTabComplete(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpanelblock")).setTabCompleter(new blocksTabComplete(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpanelgenerate")).setTabCompleter(new tabCompleteGenerate(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpaneledit")).setTabCompleter(new cpTabCompleteIngame(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpanelgenerate")).setExecutor(new commandpanelsgenerate(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpanelreload")).setExecutor(new commandpanelsreload(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpaneldebug")).setExecutor(new commandpanelsdebug(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpanelclose")).setExecutor(new commandpanelclose(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpanelversion")).setExecutor(new commandpanelversion(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpaneladdons")).setExecutor(new commandpanelresources(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpanellist")).setExecutor(new commandpanelslist(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpaneledit")).setExecutor(new cpIngameEditCommand(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpanelblock")).setExecutor(new commandpanelblocks(this));
|
||||
this.getServer().getPluginManager().registerEvents(new utils(this), this);
|
||||
this.getServer().getPluginManager().registerEvents(new utilsOpenWithItem(this), this);
|
||||
this.getServer().getPluginManager().registerEvents(new editorUtils(this), this);
|
||||
this.getServer().getPluginManager().registerEvents(new newGenUtils(this), this);
|
||||
this.getServer().getPluginManager().registerEvents(new commandpanelcustom(this), this);
|
||||
this.getServer().getPluginManager().registerEvents(new commandpanelUserInput(this), this);
|
||||
this.getServer().getPluginManager().registerEvents(new editorUserInput(this), this);
|
||||
this.getServer().getPluginManager().registerEvents(new commandpanelrefresher(this), this);
|
||||
this.getServer().getPluginManager().registerEvents(new panelBlockOnClick(this), this);
|
||||
Objects.requireNonNull(this.getCommand("commandpanel")).setExecutor(new Commandpanel(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpanel")).setTabCompleter(new CpTabComplete(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpanelblock")).setTabCompleter(new BlocksTabComplete(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpanelgenerate")).setTabCompleter(new TabCompleteGenerate(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpaneledit")).setTabCompleter(new CpTabCompleteIngame(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpanelgenerate")).setExecutor(new Commandpanelsgenerate(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpanelreload")).setExecutor(new Commandpanelsreload(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpaneldebug")).setExecutor(new Commandpanelsdebug(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpanelclose")).setExecutor(new Commandpanelclose(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpanelversion")).setExecutor(new Commandpanelversion(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpaneladdons")).setExecutor(new Commandpanelresources(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpanellist")).setExecutor(new Commandpanelslist(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpaneledit")).setExecutor(new CpIngameEditCommand(this));
|
||||
Objects.requireNonNull(this.getCommand("commandpanelblock")).setExecutor(new Commandpanelblocks(this));
|
||||
this.getServer().getPluginManager().registerEvents(new Utils(this), this);
|
||||
this.getServer().getPluginManager().registerEvents(new UtilsOpenWithItem(this), this);
|
||||
this.getServer().getPluginManager().registerEvents(new EditorUtils(this), this);
|
||||
this.getServer().getPluginManager().registerEvents(new NewGenUtils(this), this);
|
||||
this.getServer().getPluginManager().registerEvents(new Commandpanelcustom(this), this);
|
||||
this.getServer().getPluginManager().registerEvents(new CommandpanelUserInput(this), this);
|
||||
this.getServer().getPluginManager().registerEvents(new EditorUserInput(this), this);
|
||||
this.getServer().getPluginManager().registerEvents(new Commandpanelrefresher(this), this);
|
||||
this.getServer().getPluginManager().registerEvents(new PanelBlockOnClick(this), this);
|
||||
|
||||
//save the config.yml file
|
||||
File configFile = new File(this.getDataFolder() + File.separator + "config.yml");
|
||||
@ -161,10 +161,10 @@ public class commandpanels extends JavaPlugin {
|
||||
Inventory i;
|
||||
if (onOpen != 3) {
|
||||
//use the regular inventory
|
||||
i = Bukkit.createInventory(null, Integer.parseInt(Objects.requireNonNull(pconfig.getString("panels." + panels + ".rows"))) * 9, papi( Objects.requireNonNull(pconfig.getString("panels." + panels + ".title"))));
|
||||
i = Bukkit.createInventory(null, Integer.parseInt(Objects.requireNonNull(pconfig.getString("panels." + panels + ".rows"))) * 9, papi(p, Objects.requireNonNull(pconfig.getString("panels." + panels + ".title"))));
|
||||
} else {
|
||||
//this means it is the Editor window
|
||||
i = Bukkit.createInventory(null, Integer.parseInt(Objects.requireNonNull(pconfig.getString("panels." + panels + ".rows"))) * 9, papi( ChatColor.GRAY + "Editing Panel: " + pconfig.getString("panels." + panels + ".title")));
|
||||
i = Bukkit.createInventory(null, Integer.parseInt(Objects.requireNonNull(pconfig.getString("panels." + panels + ".rows"))) * 9, papi(p, ChatColor.GRAY + "Editing Panel: " + pconfig.getString("panels." + panels + ".title")));
|
||||
}
|
||||
String item = "";
|
||||
|
||||
@ -608,9 +608,9 @@ public class commandpanels extends JavaPlugin {
|
||||
public Reader getReaderFromStream(InputStream initialStream) throws IOException {
|
||||
//this reads the encrypted resource files in the jar file
|
||||
if(Bukkit.getVersion().contains("1.13")){
|
||||
return new sequence_1_13().getReaderFromStream(initialStream);
|
||||
return new Sequence_1_13().getReaderFromStream(initialStream);
|
||||
}else{
|
||||
return new sequence_1_14().getReaderFromStream(initialStream);
|
||||
return new Sequence_1_14().getReaderFromStream(initialStream);
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package me.rockyhawk.commandPanels;
|
||||
package me.rockyhawk.commandpanels;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
@ -1,4 +1,4 @@
|
||||
package me.rockyhawk.commandPanels;
|
||||
package me.rockyhawk.commandpanels;
|
||||
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
@ -14,9 +14,9 @@ import org.bukkit.inventory.ItemStack;
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
|
||||
public class utils implements Listener {
|
||||
commandpanels plugin;
|
||||
public utils(commandpanels pl) {
|
||||
public class Utils implements Listener {
|
||||
CommandPanels plugin;
|
||||
public Utils(CommandPanels pl) {
|
||||
this.plugin = pl;
|
||||
}
|
||||
@EventHandler
|
@ -1,9 +1,9 @@
|
||||
package me.rockyhawk.commandPanels.ClassResources;
|
||||
package me.rockyhawk.commandpanels.classresources;
|
||||
|
||||
import com.google.common.io.ByteArrayDataOutput;
|
||||
import com.google.common.io.ByteStreams;
|
||||
import me.realized.tokenmanager.api.TokenManager;
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -15,8 +15,8 @@ import java.io.File;
|
||||
import java.util.Objects;
|
||||
|
||||
public class CommandTags {
|
||||
commandpanels plugin;
|
||||
public CommandTags(commandpanels pl) {
|
||||
CommandPanels plugin;
|
||||
public CommandTags(CommandPanels pl) {
|
||||
this.plugin = pl;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package me.rockyhawk.commandPanels.ClassResources;
|
||||
package me.rockyhawk.commandpanels.classresources;
|
||||
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@ -12,8 +12,8 @@ import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class ExecuteOpenVoids {
|
||||
commandpanels plugin;
|
||||
public ExecuteOpenVoids(commandpanels pl) {
|
||||
CommandPanels plugin;
|
||||
public ExecuteOpenVoids(CommandPanels pl) {
|
||||
this.plugin = pl;
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
package me.rockyhawk.commandPanels.ClassResources;
|
||||
package me.rockyhawk.commandpanels.classresources;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.authlib.properties.Property;
|
||||
import com.mojang.authlib.properties.PropertyMap;
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
@ -13,8 +13,8 @@ import java.lang.reflect.Field;
|
||||
import java.util.UUID;
|
||||
|
||||
public class GetCustomHeads {
|
||||
commandpanels plugin;
|
||||
public GetCustomHeads(commandpanels pl) {
|
||||
CommandPanels plugin;
|
||||
public GetCustomHeads(CommandPanels pl) {
|
||||
this.plugin = pl;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package me.rockyhawk.commandPanels.ClassResources;
|
||||
package me.rockyhawk.commandpanels.classresources;
|
||||
|
||||
import me.arcaniax.hdb.api.HeadDatabaseAPI;
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
@ -21,8 +21,8 @@ import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
|
||||
public class ItemCreation {
|
||||
commandpanels plugin;
|
||||
public ItemCreation(commandpanels pl) {
|
||||
CommandPanels plugin;
|
||||
public ItemCreation(CommandPanels pl) {
|
||||
plugin = pl;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package me.rockyhawk.commandPanels.ClassResources;
|
||||
package me.rockyhawk.commandpanels.classresources;
|
||||
|
||||
import me.arcaniax.hdb.api.HeadDatabaseAPI;
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
@ -20,8 +20,8 @@ import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class OpenEditorGuis {
|
||||
commandpanels plugin;
|
||||
public OpenEditorGuis(commandpanels pl) {
|
||||
CommandPanels plugin;
|
||||
public OpenEditorGuis(CommandPanels pl) {
|
||||
plugin = pl;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package me.rockyhawk.commandPanels.commands;
|
||||
package me.rockyhawk.commandpanels.commands;
|
||||
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
@ -8,15 +8,14 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
|
||||
public class commandpanel implements CommandExecutor {
|
||||
commandpanels plugin;
|
||||
public class Commandpanel implements CommandExecutor {
|
||||
CommandPanels plugin;
|
||||
|
||||
public commandpanel(commandpanels pl) {
|
||||
public Commandpanel(CommandPanels pl) {
|
||||
this.plugin = pl;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package me.rockyhawk.commandPanels.commands;
|
||||
package me.rockyhawk.commandpanels.commands;
|
||||
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
@ -8,9 +8,9 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
||||
public class commandpanelclose implements CommandExecutor {
|
||||
commandpanels plugin;
|
||||
public commandpanelclose(commandpanels pl) { this.plugin = pl; }
|
||||
public class Commandpanelclose implements CommandExecutor {
|
||||
CommandPanels plugin;
|
||||
public Commandpanelclose(CommandPanels pl) { this.plugin = pl; }
|
||||
|
||||
@EventHandler
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
@ -1,6 +1,6 @@
|
||||
package me.rockyhawk.commandPanels.commands;
|
||||
package me.rockyhawk.commandpanels.commands;
|
||||
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -13,9 +13,9 @@ import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.Objects;
|
||||
|
||||
public class commandpanelcustom implements Listener {
|
||||
commandpanels plugin;
|
||||
public commandpanelcustom(commandpanels pl) {
|
||||
public class Commandpanelcustom implements Listener {
|
||||
CommandPanels plugin;
|
||||
public Commandpanelcustom(CommandPanels pl) {
|
||||
this.plugin = pl;
|
||||
}
|
||||
@EventHandler
|
@ -1,15 +1,15 @@
|
||||
package me.rockyhawk.commandPanels.commands;
|
||||
package me.rockyhawk.commandpanels.commands;
|
||||
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
||||
public class commandpanelresources implements CommandExecutor {
|
||||
commandpanels plugin;
|
||||
public commandpanelresources(commandpanels pl) { this.plugin = pl; }
|
||||
public class Commandpanelresources implements CommandExecutor {
|
||||
CommandPanels plugin;
|
||||
public Commandpanelresources(CommandPanels pl) { this.plugin = pl; }
|
||||
|
||||
@EventHandler
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
@ -1,15 +1,15 @@
|
||||
package me.rockyhawk.commandPanels.commands;
|
||||
package me.rockyhawk.commandpanels.commands;
|
||||
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
||||
public class commandpanelsdebug implements CommandExecutor {
|
||||
commandpanels plugin;
|
||||
public commandpanelsdebug(commandpanels pl) { this.plugin = pl; }
|
||||
public class Commandpanelsdebug implements CommandExecutor {
|
||||
CommandPanels plugin;
|
||||
public Commandpanelsdebug(CommandPanels pl) { this.plugin = pl; }
|
||||
|
||||
@EventHandler
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
@ -1,6 +1,6 @@
|
||||
package me.rockyhawk.commandPanels.commands;
|
||||
package me.rockyhawk.commandpanels.commands;
|
||||
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
@ -13,9 +13,9 @@ import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
|
||||
|
||||
public class commandpanelslist implements CommandExecutor {
|
||||
commandpanels plugin;
|
||||
public commandpanelslist(commandpanels pl) { this.plugin = pl; }
|
||||
public class Commandpanelslist implements CommandExecutor {
|
||||
CommandPanels plugin;
|
||||
public Commandpanelslist(CommandPanels pl) { this.plugin = pl; }
|
||||
|
||||
@EventHandler
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
@ -1,6 +1,6 @@
|
||||
package me.rockyhawk.commandPanels.commands;
|
||||
package me.rockyhawk.commandpanels.commands;
|
||||
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
@ -11,9 +11,9 @@ import org.bukkit.event.EventHandler;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
public class commandpanelsreload implements CommandExecutor {
|
||||
commandpanels plugin;
|
||||
public commandpanelsreload(commandpanels pl) { this.plugin = pl; }
|
||||
public class Commandpanelsreload implements CommandExecutor {
|
||||
CommandPanels plugin;
|
||||
public Commandpanelsreload(CommandPanels pl) { this.plugin = pl; }
|
||||
|
||||
@EventHandler
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
@ -1,15 +1,15 @@
|
||||
package me.rockyhawk.commandPanels.commands;
|
||||
package me.rockyhawk.commandpanels.commands;
|
||||
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
||||
public class commandpanelversion implements CommandExecutor {
|
||||
commandpanels plugin;
|
||||
public commandpanelversion(commandpanels pl) { this.plugin = pl; }
|
||||
public class Commandpanelversion implements CommandExecutor {
|
||||
CommandPanels plugin;
|
||||
public Commandpanelversion(CommandPanels pl) { this.plugin = pl; }
|
||||
|
||||
@EventHandler
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
@ -1,12 +1,11 @@
|
||||
package me.rockyhawk.commandPanels.completeTabs;
|
||||
package me.rockyhawk.commandpanels.completetabs;
|
||||
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.TabCompleter;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.yaml.snakeyaml.scanner.ScannerException;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
@ -14,9 +13,9 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class cpTabComplete implements TabCompleter {
|
||||
commandpanels plugin;
|
||||
public cpTabComplete(commandpanels pl) { this.plugin = pl; }
|
||||
public class CpTabComplete implements TabCompleter {
|
||||
CommandPanels plugin;
|
||||
public CpTabComplete(CommandPanels pl) { this.plugin = pl; }
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
if(sender instanceof Player && args.length == 1){
|
@ -1,6 +1,6 @@
|
||||
package me.rockyhawk.commandPanels.generatePanels;
|
||||
package me.rockyhawk.commandpanels.generatepanels;
|
||||
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
@ -12,9 +12,9 @@ import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.InventoryHolder;
|
||||
|
||||
|
||||
public class commandpanelsgenerate implements CommandExecutor {
|
||||
commandpanels plugin;
|
||||
public commandpanelsgenerate(commandpanels pl) { this.plugin = pl; }
|
||||
public class Commandpanelsgenerate implements CommandExecutor {
|
||||
CommandPanels plugin;
|
||||
public Commandpanelsgenerate(CommandPanels pl) { this.plugin = pl; }
|
||||
|
||||
@EventHandler
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
@ -1,6 +1,6 @@
|
||||
package me.rockyhawk.commandPanels.generatePanels;
|
||||
package me.rockyhawk.commandpanels.generatepanels;
|
||||
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
@ -24,10 +24,10 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
public class newGenUtils implements Listener {
|
||||
public class NewGenUtils implements Listener {
|
||||
public YamlConfiguration tempEdit;
|
||||
commandpanels plugin;
|
||||
public newGenUtils(commandpanels pl) {
|
||||
CommandPanels plugin;
|
||||
public NewGenUtils(CommandPanels pl) {
|
||||
this.plugin = pl;
|
||||
this.tempEdit = YamlConfiguration.loadConfiguration(new File(plugin.getDataFolder() + File.separator + "temp.yml"));
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
package me.rockyhawk.commandPanels.generatePanels;
|
||||
package me.rockyhawk.commandpanels.generatepanels;
|
||||
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.TabCompleter;
|
||||
@ -10,9 +10,9 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class tabCompleteGenerate implements TabCompleter {
|
||||
commandpanels plugin;
|
||||
public tabCompleteGenerate(commandpanels pl) { this.plugin = pl; }
|
||||
public class TabCompleteGenerate implements TabCompleter {
|
||||
CommandPanels plugin;
|
||||
public TabCompleteGenerate(CommandPanels pl) { this.plugin = pl; }
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
if(sender instanceof Player && args.length == 1){
|
@ -1,6 +1,6 @@
|
||||
package me.rockyhawk.commandPanels.ingameEditor;
|
||||
package me.rockyhawk.commandpanels.ingameeditor;
|
||||
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
@ -12,10 +12,10 @@ import org.bukkit.event.EventHandler;
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
|
||||
public class cpIngameEditCommand implements CommandExecutor {
|
||||
commandpanels plugin;
|
||||
public class CpIngameEditCommand implements CommandExecutor {
|
||||
CommandPanels plugin;
|
||||
|
||||
public cpIngameEditCommand(commandpanels pl) {
|
||||
public CpIngameEditCommand(CommandPanels pl) {
|
||||
this.plugin = pl;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package me.rockyhawk.commandPanels.ingameEditor;
|
||||
package me.rockyhawk.commandpanels.ingameeditor;
|
||||
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.TabCompleter;
|
||||
@ -14,9 +14,9 @@ import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
public class cpTabCompleteIngame implements TabCompleter {
|
||||
commandpanels plugin;
|
||||
public cpTabCompleteIngame(commandpanels pl) { this.plugin = pl; }
|
||||
public class CpTabCompleteIngame implements TabCompleter {
|
||||
CommandPanels plugin;
|
||||
public CpTabCompleteIngame(CommandPanels pl) { this.plugin = pl; }
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
if(sender instanceof Player && args.length == 1){
|
@ -1,6 +1,6 @@
|
||||
package me.rockyhawk.commandPanels.ingameEditor;
|
||||
package me.rockyhawk.commandpanels.ingameeditor;
|
||||
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
@ -15,9 +15,9 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class editorUserInput implements Listener {
|
||||
commandpanels plugin;
|
||||
public editorUserInput(commandpanels pl) {
|
||||
public class EditorUserInput implements Listener {
|
||||
CommandPanels plugin;
|
||||
public EditorUserInput(CommandPanels pl) {
|
||||
this.plugin = pl;
|
||||
}
|
||||
@EventHandler
|
@ -1,6 +1,6 @@
|
||||
package me.rockyhawk.commandPanels.ingameEditor;
|
||||
package me.rockyhawk.commandpanels.ingameeditor;
|
||||
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
@ -18,11 +18,11 @@ import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Objects;
|
||||
|
||||
public class editorUtils implements Listener {
|
||||
public class EditorUtils implements Listener {
|
||||
public YamlConfiguration tempEdit;
|
||||
public ArrayList<String> inventoryItemSettingsOpening = new ArrayList<>();
|
||||
commandpanels plugin;
|
||||
public editorUtils(commandpanels pl) {
|
||||
CommandPanels plugin;
|
||||
public EditorUtils(CommandPanels pl) {
|
||||
this.plugin = pl;
|
||||
this.tempEdit = YamlConfiguration.loadConfiguration(new File(plugin.getDataFolder() + File.separator + "temp.yml"));
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package me.rockyhawk.commandPanels.ioClasses;
|
||||
package me.rockyhawk.commandpanels.ioclasses;
|
||||
|
||||
//1.13 Imports
|
||||
import org.apache.commons.io.IOUtils;
|
||||
@ -8,7 +8,7 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Reader;
|
||||
|
||||
public class sequence_1_13{
|
||||
public class Sequence_1_13 {
|
||||
public Reader getReaderFromStream(InputStream initialStream) throws IOException {
|
||||
//this reads the encrypted resource files in the jar file
|
||||
byte[] buffer = IOUtils.toByteArray(initialStream);
|
@ -1,4 +1,4 @@
|
||||
package me.rockyhawk.commandPanels.ioClasses;
|
||||
package me.rockyhawk.commandpanels.ioclasses;
|
||||
|
||||
//1.14+ Imports
|
||||
import org.bukkit.craftbukkit.libs.org.apache.commons.io.IOUtils;
|
||||
@ -8,7 +8,7 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Reader;
|
||||
|
||||
public class sequence_1_14{
|
||||
public class Sequence_1_14 {
|
||||
public Reader getReaderFromStream(InputStream initialStream) throws IOException {
|
||||
//this reads the encrypted resource files in the jar file
|
||||
byte[] buffer = IOUtils.toByteArray(initialStream);
|
@ -1,6 +1,6 @@
|
||||
package me.rockyhawk.commandPanels.openWithItem;
|
||||
package me.rockyhawk.commandpanels.openwithitem;
|
||||
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -19,9 +19,9 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class utilsOpenWithItem implements Listener {
|
||||
commandpanels plugin;
|
||||
public utilsOpenWithItem(commandpanels pl) {
|
||||
public class UtilsOpenWithItem implements Listener {
|
||||
CommandPanels plugin;
|
||||
public UtilsOpenWithItem(CommandPanels pl) {
|
||||
this.plugin = pl;
|
||||
}
|
||||
@EventHandler
|
@ -1,6 +1,6 @@
|
||||
package me.rockyhawk.commandPanels.panelBlocks;
|
||||
package me.rockyhawk.commandpanels.panelblocks;
|
||||
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.TabCompleter;
|
||||
@ -14,9 +14,9 @@ import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
public class blocksTabComplete implements TabCompleter {
|
||||
commandpanels plugin;
|
||||
public blocksTabComplete(commandpanels pl) { this.plugin = pl; }
|
||||
public class BlocksTabComplete implements TabCompleter {
|
||||
CommandPanels plugin;
|
||||
public BlocksTabComplete(CommandPanels pl) { this.plugin = pl; }
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
if(sender instanceof Player){
|
@ -1,6 +1,6 @@
|
||||
package me.rockyhawk.commandPanels.panelBlocks;
|
||||
package me.rockyhawk.commandpanels.panelblocks;
|
||||
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
@ -15,9 +15,9 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Objects;
|
||||
|
||||
public class commandpanelblocks implements CommandExecutor {
|
||||
commandpanels plugin;
|
||||
public commandpanelblocks(commandpanels pl) { this.plugin = pl; }
|
||||
public class Commandpanelblocks implements CommandExecutor {
|
||||
CommandPanels plugin;
|
||||
public Commandpanelblocks(CommandPanels pl) { this.plugin = pl; }
|
||||
|
||||
@EventHandler
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
@ -52,7 +52,7 @@ public class commandpanelblocks implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
Location blockLocation = blockType.getLocation();
|
||||
String configValue = "blocks." + Objects.requireNonNull(blockLocation.getWorld()).getName() + "_" + blockLocation.getBlockX() + "_" + blockLocation.getBlockY() + "_" + blockLocation.getBlockZ() + ".panel";
|
||||
String configValue = "blocks." + Objects.requireNonNull(blockLocation.getWorld()).getName().replaceAll("_", "%dash%") + "_" + blockLocation.getBlockX() + "_" + blockLocation.getBlockY() + "_" + blockLocation.getBlockZ() + ".panel";
|
||||
plugin.blockConfig.set(configValue, args[1]);
|
||||
try {
|
||||
plugin.blockConfig.save(new File(plugin.getDataFolder() + File.separator + "blocks.yml"));
|
||||
@ -86,7 +86,7 @@ public class commandpanelblocks implements CommandExecutor {
|
||||
}
|
||||
Block blockType = p.getTargetBlock(null, 5);
|
||||
Location blockLocation = blockType.getLocation();
|
||||
String configValue = "blocks." + Objects.requireNonNull(blockLocation.getWorld()).getName() + "_" + blockLocation.getBlockX() + "_" + blockLocation.getBlockY() + "_" + blockLocation.getBlockZ() + ".panel";
|
||||
String configValue = "blocks." + Objects.requireNonNull(blockLocation.getWorld()).getName().replaceAll("_", "%dash%") + "_" + blockLocation.getBlockX() + "_" + blockLocation.getBlockY() + "_" + blockLocation.getBlockZ() + ".panel";
|
||||
if(plugin.blockConfig.contains(configValue)){
|
||||
plugin.blockConfig.set(configValue.replace(".panel",""), null);
|
||||
try {
|
@ -1,6 +1,6 @@
|
||||
package me.rockyhawk.commandPanels.panelBlocks;
|
||||
package me.rockyhawk.commandpanels.panelblocks;
|
||||
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
@ -13,9 +13,9 @@ import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import java.io.File;
|
||||
import java.util.Objects;
|
||||
|
||||
public class panelBlockOnClick implements Listener {
|
||||
commandpanels plugin;
|
||||
public panelBlockOnClick(commandpanels pl) {
|
||||
public class PanelBlockOnClick implements Listener {
|
||||
CommandPanels plugin;
|
||||
public PanelBlockOnClick(CommandPanels pl) {
|
||||
this.plugin = pl;
|
||||
}
|
||||
@EventHandler
|
||||
@ -35,7 +35,7 @@ public class panelBlockOnClick implements Listener {
|
||||
}
|
||||
for (String configLocation : Objects.requireNonNull(plugin.blockConfig.getConfigurationSection("blocks")).getKeys(false)) {
|
||||
String[] loc = configLocation.split("_");
|
||||
Location tempLocation = new Location(plugin.getServer().getWorld(loc[0]),Double.parseDouble(loc[1]),Double.parseDouble(loc[2]),Double.parseDouble(loc[3]));
|
||||
Location tempLocation = new Location(plugin.getServer().getWorld(loc[0].replaceAll("%dash%","_")),Double.parseDouble(loc[1]),Double.parseDouble(loc[2]),Double.parseDouble(loc[3]));
|
||||
if(tempLocation.equals(block.getLocation())){
|
||||
e.setCancelled(true);
|
||||
YamlConfiguration cf = null;
|
@ -1,16 +1,16 @@
|
||||
package me.rockyhawk.commandPanels.premium;
|
||||
package me.rockyhawk.commandpanels.premium;
|
||||
|
||||
import me.rockyhawk.commandPanels.ClassResources.CommandTags;
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.classresources.CommandTags;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class commandpanelUserInput implements Listener {
|
||||
commandpanels plugin;
|
||||
public commandpanelUserInput(commandpanels pl) {
|
||||
public class CommandpanelUserInput implements Listener {
|
||||
CommandPanels plugin;
|
||||
public CommandpanelUserInput(CommandPanels pl) {
|
||||
this.plugin = pl;
|
||||
}
|
||||
@EventHandler
|
@ -1,6 +1,6 @@
|
||||
package me.rockyhawk.commandPanels.premium;
|
||||
package me.rockyhawk.commandpanels.premium;
|
||||
|
||||
import me.rockyhawk.commandPanels.commandpanels;
|
||||
import me.rockyhawk.commandpanels.CommandPanels;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.HumanEntity;
|
||||
@ -14,9 +14,9 @@ import org.bukkit.scheduler.BukkitRunnable;
|
||||
import java.io.File;
|
||||
import java.util.Objects;
|
||||
|
||||
public class commandpanelrefresher implements Listener {
|
||||
commandpanels plugin;
|
||||
public commandpanelrefresher(commandpanels pl) {
|
||||
public class Commandpanelrefresher implements Listener {
|
||||
CommandPanels plugin;
|
||||
public Commandpanelrefresher(CommandPanels pl) {
|
||||
this.plugin = pl;
|
||||
}
|
||||
@EventHandler
|
Loading…
Reference in New Issue
Block a user