diff --git a/src/main/java/com/drtshock/playervaults/PlayerVaults.java b/src/main/java/com/drtshock/playervaults/PlayerVaults.java
index 1791304..df11681 100644
--- a/src/main/java/com/drtshock/playervaults/PlayerVaults.java
+++ b/src/main/java/com/drtshock/playervaults/PlayerVaults.java
@@ -25,18 +25,7 @@ import com.drtshock.playervaults.util.Metrics;
import com.drtshock.playervaults.util.Updater;
import com.drtshock.playervaults.vaultmanagement.VaultManager;
import com.drtshock.playervaults.vaultmanagement.VaultViewInfo;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.HashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
import net.milkbowl.vault.economy.Economy;
-
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
@@ -45,6 +34,11 @@ import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;
+import java.io.*;
+import java.util.HashMap;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
public class PlayerVaults extends JavaPlugin {
public static PlayerVaults PLUGIN;
@@ -94,7 +88,7 @@ public class PlayerVaults extends JavaPlugin {
new File(DIRECTORY + File.separator + "backups").mkdirs();
VM = new VaultManager(this);
- if(getConfig().getBoolean("cleanup.enable", false)) {
+ if (getConfig().getBoolean("cleanup.enable", false)) {
getServer().getScheduler().runTaskAsynchronously(this, new Cleanup(getConfig().getInt("cleanup.lastEdit", 30)));
}
}
diff --git a/src/main/java/com/drtshock/playervaults/commands/Commands.java b/src/main/java/com/drtshock/playervaults/commands/Commands.java
index 9f8be9c..a6239b5 100644
--- a/src/main/java/com/drtshock/playervaults/commands/Commands.java
+++ b/src/main/java/com/drtshock/playervaults/commands/Commands.java
@@ -16,12 +16,10 @@
*/
package com.drtshock.playervaults.commands;
-import com.drtshock.playervaults.vaultmanagement.VaultOperations;
-import com.drtshock.playervaults.vaultmanagement.VaultViewInfo;
import com.drtshock.playervaults.PlayerVaults;
import com.drtshock.playervaults.util.Lang;
-import java.util.Set;
-
+import com.drtshock.playervaults.vaultmanagement.VaultOperations;
+import com.drtshock.playervaults.vaultmanagement.VaultViewInfo;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
diff --git a/src/main/java/com/drtshock/playervaults/commands/SignSetInfo.java b/src/main/java/com/drtshock/playervaults/commands/SignSetInfo.java
index 1456f19..9a2ff53 100644
--- a/src/main/java/com/drtshock/playervaults/commands/SignSetInfo.java
+++ b/src/main/java/com/drtshock/playervaults/commands/SignSetInfo.java
@@ -17,8 +17,8 @@
package com.drtshock.playervaults.commands;
/**
- * A class for setting signs. Stores information about the sign owner, number,
- * and whether or not is opens a self vault or another person's vault.
+ * A class for setting signs. Stores information about the sign owner, number, and whether or not is opens a self vault
+ * or another person's vault.
*/
public class SignSetInfo {
@@ -48,8 +48,7 @@ public class SignSetInfo {
}
/**
- * Get whether or not the sign will open their own vault or another
- * person's.
+ * Get whether or not the sign will open their own vault or another person's.
*
* @return Whether or not it is a 'self' sign.
*/
diff --git a/src/main/java/com/drtshock/playervaults/listeners/Listeners.java b/src/main/java/com/drtshock/playervaults/listeners/Listeners.java
index 14d6905..6c43081 100644
--- a/src/main/java/com/drtshock/playervaults/listeners/Listeners.java
+++ b/src/main/java/com/drtshock/playervaults/listeners/Listeners.java
@@ -17,13 +17,10 @@
package com.drtshock.playervaults.listeners;
import com.drtshock.playervaults.PlayerVaults;
-import com.drtshock.playervaults.vaultmanagement.VaultOperations;
-import com.drtshock.playervaults.vaultmanagement.VaultViewInfo;
import com.drtshock.playervaults.util.Lang;
import com.drtshock.playervaults.vaultmanagement.VaultManager;
-
-import java.io.IOException;
-
+import com.drtshock.playervaults.vaultmanagement.VaultOperations;
+import com.drtshock.playervaults.vaultmanagement.VaultViewInfo;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
@@ -40,13 +37,11 @@ import org.bukkit.event.block.BlockPhysicsEvent;
import org.bukkit.event.entity.EntityChangeBlockEvent;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.inventory.InventoryCloseEvent;
-import org.bukkit.event.player.PlayerInteractEntityEvent;
-import org.bukkit.event.player.PlayerInteractEvent;
-import org.bukkit.event.player.PlayerJoinEvent;
-import org.bukkit.event.player.PlayerQuitEvent;
-import org.bukkit.event.player.PlayerTeleportEvent;
+import org.bukkit.event.player.*;
import org.bukkit.inventory.Inventory;
+import java.io.IOException;
+
public class Listeners implements Listener {
public PlayerVaults plugin;
@@ -54,6 +49,7 @@ public class Listeners implements Listener {
public Listeners(PlayerVaults playerVaults) {
this.plugin = playerVaults;
}
+
VaultManager vm = new VaultManager(plugin);
public void saveVault(Player player) {
@@ -203,8 +199,7 @@ public class Listeners implements Listener {
}
/**
- * Check if the location given is a sign, and if so, remove it from the
- * signs.yml file
+ * Check if the location given is a sign, and if so, remove it from the signs.yml file
*
* @param location The location to check
*/
diff --git a/src/main/java/com/drtshock/playervaults/tasks/Cleanup.java b/src/main/java/com/drtshock/playervaults/tasks/Cleanup.java
index a27a4c7..cd00423 100644
--- a/src/main/java/com/drtshock/playervaults/tasks/Cleanup.java
+++ b/src/main/java/com/drtshock/playervaults/tasks/Cleanup.java
@@ -17,11 +17,11 @@ public class Cleanup extends BukkitRunnable {
@Override
public void run() {
File file = new File(PlayerVaults.DIRECTORY);
- if(!file.exists()) return;
+ if (!file.exists()) return;
long time = System.currentTimeMillis();
- for(File f : file.listFiles()) {
- if(time - f.lastModified() > diff) {
+ for (File f : file.listFiles()) {
+ if (time - f.lastModified() > diff) {
f.delete();
PlayerVaults.PLUGIN.getLogger().info("Deleting vault file: " + f.getName());
}
diff --git a/src/main/java/com/drtshock/playervaults/util/Lang.java b/src/main/java/com/drtshock/playervaults/util/Lang.java
index 142ec06..296d586 100644
--- a/src/main/java/com/drtshock/playervaults/util/Lang.java
+++ b/src/main/java/com/drtshock/playervaults/util/Lang.java
@@ -52,6 +52,7 @@ public enum Lang {
/**
* Lang enum constructor.
+ *
* @param path The string path.
* @param start The default string.
*/
@@ -62,6 +63,7 @@ public enum Lang {
/**
* Set the {@code YamlConfiguration} to use.
+ *
* @param config The config to set.
*/
public static void setFile(YamlConfiguration config) {
@@ -77,6 +79,7 @@ public enum Lang {
/**
* Get the default value of the path.
+ *
* @return The default value of the path.
*/
public String getDefault() {
@@ -85,6 +88,7 @@ public enum Lang {
/**
* Get the path to the string.
+ *
* @return The path to the string.
*/
public String getPath() {
diff --git a/src/main/java/com/drtshock/playervaults/util/Metrics.java b/src/main/java/com/drtshock/playervaults/util/Metrics.java
index 046f0c1..9bd2f16 100644
--- a/src/main/java/com/drtshock/playervaults/util/Metrics.java
+++ b/src/main/java/com/drtshock/playervaults/util/Metrics.java
@@ -34,23 +34,12 @@ import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.scheduler.BukkitTask;
-import java.io.BufferedReader;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
+import java.io.*;
import java.net.Proxy;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.Set;
-import java.util.UUID;
+import java.util.*;
import java.util.logging.Level;
import java.util.zip.GZIPOutputStream;
@@ -148,6 +137,7 @@ public class Metrics {
* website. Plotters can be added to the graph object returned.
*
* @param name The name of the graph
+ *
* @return Graph object created. Will never return NULL under normal circumstances unless bad parameters are given
*/
public Graph createGraph(final String name) {
@@ -488,6 +478,7 @@ public class Metrics {
* GZip compress a string of bytes
*
* @param input
+ *
* @return
*/
public static byte[] gzip(String input) {
@@ -529,6 +520,7 @@ public class Metrics {
* @param json
* @param key
* @param value
+ *
* @throws UnsupportedEncodingException
*/
private static void appendJSONPair(StringBuilder json, String key, String value) throws UnsupportedEncodingException {
@@ -561,6 +553,7 @@ public class Metrics {
* Escape a string to create a valid JSON string
*
* @param text
+ *
* @return
*/
private static String escapeJSON(String text) {
@@ -607,6 +600,7 @@ public class Metrics {
* Encode text as UTF-8
*
* @param text the text to encode
+ *
* @return the encoded text, as UTF-8
*/
private static String urlEncode(final String text) throws UnsupportedEncodingException {
diff --git a/src/main/java/com/drtshock/playervaults/util/Updater.java b/src/main/java/com/drtshock/playervaults/util/Updater.java
index fa394fd..1c1cb1b 100644
--- a/src/main/java/com/drtshock/playervaults/util/Updater.java
+++ b/src/main/java/com/drtshock/playervaults/util/Updater.java
@@ -1,5 +1,11 @@
package com.drtshock.playervaults.util;
+import org.bukkit.configuration.file.YamlConfiguration;
+import org.bukkit.plugin.Plugin;
+import org.json.simple.JSONArray;
+import org.json.simple.JSONObject;
+import org.json.simple.JSONValue;
+
import java.io.*;
import java.net.MalformedURLException;
import java.net.URL;
@@ -9,24 +15,18 @@ import java.util.logging.Level;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
-import org.bukkit.configuration.file.YamlConfiguration;
-import org.bukkit.plugin.Plugin;
-import org.json.simple.JSONArray;
-import org.json.simple.JSONObject;
-import org.json.simple.JSONValue;
-
/**
* Check dev.bukkit.org to find updates for a given plugin, and download the updates if needed.
*
- * VERY, VERY IMPORTANT: Because there are no standards for adding auto-update toggles in your plugin's config, this system provides NO CHECK WITH YOUR CONFIG to make sure the user has allowed auto-updating.
- *
- * It is a BUKKIT POLICY that you include a boolean value in your config that prevents the auto-updater from running AT ALL.
- *
- * If you fail to include this option in your config, your plugin will be REJECTED when you attempt to submit it to dev.bukkit.org.
+ * VERY, VERY IMPORTANT: Because there are no standards for adding auto-update toggles in your plugin's config,
+ * this system provides NO CHECK WITH YOUR CONFIG to make sure the user has allowed auto-updating. It is a
+ * BUKKIT POLICY that you include a boolean value in your config that prevents the auto-updater from running
+ * AT ALL. If you fail to include this option in your config, your plugin will be REJECTED when you
+ * attempt to submit it to dev.bukkit.org.
*
- * An example of a good configuration option would be something similar to 'auto-update: true' - if this value is set to false you may NOT run the auto-updater.
- *
- * If you are unsure about these rules, please read the plugin submission guidelines: http://goo.gl/8iU5l
+ * An example of a good configuration option would be something similar to 'auto-update: true' - if this value is set to
+ * false you may NOT run the auto-updater. If you are unsure about these rules, please read the plugin submission
+ * guidelines: http://goo.gl/8iU5l
*
* @author Gravity
*/
@@ -92,7 +92,8 @@ public class Updater {
*/
FAIL_DBO,
/**
- * When running the version check, the file on DBO did not contain the a version in the format 'vVersion' such as 'v1.0'.
+ * When running the version check, the file on DBO did not contain the a version in the format 'vVersion' such
+ * as 'v1.0'.
*/
FAIL_NOVERSION,
/**
@@ -130,10 +131,11 @@ public class Updater {
/**
* Initialize the updater
*
- * @param plugin The plugin that is checking for an update.
- * @param id The dev.bukkit.org id of the project
- * @param file The file that the plugin is running from, get this by doing this.getFile() from within your main class.
- * @param type Specify the type of update this will be. See {@link UpdateType}
+ * @param plugin The plugin that is checking for an update.
+ * @param id The dev.bukkit.org id of the project
+ * @param file The file that the plugin is running from, get this by doing this.getFile() from within your main
+ * class.
+ * @param type Specify the type of update this will be. See {@link UpdateType}
* @param announce True if the program should announce the progress of new updates in console
*/
public Updater(Plugin plugin, int id, File file, Updater.UpdateType type, boolean announce) {
@@ -230,8 +232,8 @@ public class Updater {
}
/**
- * As the result of Updater output depends on the thread's completion, it is necessary to wait for the thread to finish
- * before allowing anyone to check the result.
+ * As the result of Updater output depends on the thread's completion, it is necessary to wait for the thread to
+ * finish before allowing anyone to check the result.
*/
private void waitForThread() {
if (thread != null && thread.isAlive()) {
@@ -378,7 +380,8 @@ public class Updater {
}
/**
- * Check if the name of a jar is one of the plugins currently installed, used for extracting the correct files out of a zip.
+ * Check if the name of a jar is one of the plugins currently installed, used for extracting the correct files out
+ * of a zip.
*/
private boolean pluginFile(String name) {
for (File file : new File("plugins").listFiles()) {
@@ -390,7 +393,8 @@ public class Updater {
}
/**
- * Check to see if the program should continue by evaluation whether the plugin is already updated, or shouldn't be updated
+ * Check to see if the program should continue by evaluation whether the plugin is already updated, or shouldn't be
+ * updated
*/
private boolean versionCheck(String title) {
if (type != Updater.UpdateType.NO_VERSION_CHECK) {
diff --git a/src/main/java/com/drtshock/playervaults/vaultmanagement/EconomyOperations.java b/src/main/java/com/drtshock/playervaults/vaultmanagement/EconomyOperations.java
index 3f96875..e34022f 100644
--- a/src/main/java/com/drtshock/playervaults/vaultmanagement/EconomyOperations.java
+++ b/src/main/java/com/drtshock/playervaults/vaultmanagement/EconomyOperations.java
@@ -18,17 +18,15 @@ package com.drtshock.playervaults.vaultmanagement;
import com.drtshock.playervaults.PlayerVaults;
import com.drtshock.playervaults.util.Lang;
-
-import java.io.File;
-import java.io.IOException;
-
import net.milkbowl.vault.economy.EconomyResponse;
-
import org.bukkit.ChatColor;
import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
+import java.io.File;
+import java.io.IOException;
+
/**
* A class that handles all economy operations.
*/
@@ -48,6 +46,7 @@ public class EconomyOperations {
*
* @param player The player to pay.
* @param number The vault number to open.
+ *
* @return The transaction success.
*/
public static boolean payToOpen(Player player, int number) {
@@ -71,6 +70,7 @@ public class EconomyOperations {
* Have a player pay to create a vault.
*
* @param player The player to pay.
+ *
* @return The transaction success
*/
public static boolean payToCreate(Player player) {
@@ -92,6 +92,7 @@ public class EconomyOperations {
*
* @param player The player to receive the money.
* @param number The vault number to delete.
+ *
* @return The transaction success.
*/
public static boolean refundOnDelete(Player player, int number) {
diff --git a/src/main/java/com/drtshock/playervaults/vaultmanagement/Serialization.java b/src/main/java/com/drtshock/playervaults/vaultmanagement/Serialization.java
index 815b2b0..721c667 100644
--- a/src/main/java/com/drtshock/playervaults/vaultmanagement/Serialization.java
+++ b/src/main/java/com/drtshock/playervaults/vaultmanagement/Serialization.java
@@ -16,13 +16,6 @@
*/
package com.drtshock.playervaults.vaultmanagement;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.configuration.serialization.ConfigurationSerializable;
@@ -33,11 +26,13 @@ import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
+import java.util.*;
+import java.util.Map.Entry;
+
/**
* Fancy JSON serialization mostly by evilmidget38.
*
* @author evilmidget38, gomeow
- *
*/
public class Serialization {
diff --git a/src/main/java/com/drtshock/playervaults/vaultmanagement/VaultHolder.java b/src/main/java/com/drtshock/playervaults/vaultmanagement/VaultHolder.java
index f6afd49..52f9856 100644
--- a/src/main/java/com/drtshock/playervaults/vaultmanagement/VaultHolder.java
+++ b/src/main/java/com/drtshock/playervaults/vaultmanagement/VaultHolder.java
@@ -20,8 +20,7 @@ import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryHolder;
/**
- * Represents a VaultHolder to assist in detection of Player Vaults from other
- * plugins.
+ * Represents a VaultHolder to assist in detection of Player Vaults from other plugins.
*/
public class VaultHolder implements InventoryHolder {
diff --git a/src/main/java/com/drtshock/playervaults/vaultmanagement/VaultManager.java b/src/main/java/com/drtshock/playervaults/vaultmanagement/VaultManager.java
index 6989dbe..84530c0 100644
--- a/src/main/java/com/drtshock/playervaults/vaultmanagement/VaultManager.java
+++ b/src/main/java/com/drtshock/playervaults/vaultmanagement/VaultManager.java
@@ -18,23 +18,20 @@ package com.drtshock.playervaults.vaultmanagement;
import com.drtshock.playervaults.PlayerVaults;
import com.drtshock.playervaults.util.Lang;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
import org.bukkit.Bukkit;
-import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
/**
- * A class for managing actual IO to the files, loading inventories, and saving
- * them.
+ * A class for managing actual IO to the files, loading inventories, and saving them.
*/
public class VaultManager {
@@ -43,6 +40,7 @@ public class VaultManager {
public VaultManager(PlayerVaults instance) {
this.plugin = instance;
}
+
private final String directory = "plugins" + File.separator + "PlayerVaults" + File.separator + "vaults";
/**
@@ -51,6 +49,7 @@ public class VaultManager {
* @param inventory The inventory to be saved.
* @param player The player of whose file to save to.
* @param number The vault number.
+ *
* @throws IOException Uh oh!
*/
public void saveVault(Inventory inventory, String player, int number) throws IOException {
@@ -92,7 +91,7 @@ public class VaultManager {
if (playerFile.getConfigurationSection("vault" + number) == null) {
VaultHolder vaultHolder = new VaultHolder(number);
Player player = Bukkit.getPlayer(holder);
- if(player == null) {
+ if (player == null) {
return null;
}
if (EconomyOperations.payToCreate(player)) {
@@ -145,12 +144,12 @@ public class VaultManager {
}
/**
- * Get an inventory from file. Returns null if the inventory doesn't exist.
- * SHOULD ONLY BE USED INTERNALLY
+ * Get an inventory from file. Returns null if the inventory doesn't exist. SHOULD ONLY BE USED INTERNALLY
*
* @param playerFile the YamlConfiguration file.
* @param size the size of the vault.
* @param number the vault number.
+ *
* @return inventory if exists, otherwise null.
*/
private Inventory getInventory(YamlConfiguration playerFile, int size, int number) {
@@ -167,11 +166,11 @@ public class VaultManager {
}
/**
- * Gets an inventory without storing references to it. Used for dropping a
- * players inventories on death.
+ * Gets an inventory without storing references to it. Used for dropping a players inventories on death.
*
* @param holder The holder of the vault.
* @param number The vault number.
+ *
* @return The inventory of the specified holder and vault number.
*/
public Inventory getVault(String holder, int number) {
@@ -199,12 +198,13 @@ public class VaultManager {
* @param sender The sender of whom to send messages to.
* @param holder The vault holder.
* @param number The vault number.
+ *
* @throws IOException Uh oh!
*/
public void deleteVault(CommandSender sender, String holder, int number) throws IOException {
String name = holder.toLowerCase();
File file = new File(directory + File.separator + name.toLowerCase() + ".yml");
- if(!file.exists()) {
+ if (!file.exists()) {
return;
}
FileConfiguration playerFile = YamlConfiguration.loadConfiguration(file);
@@ -223,6 +223,7 @@ public class VaultManager {
* Get the holder's vault file. Create if doesn't exist.
*
* @param holder The vault holder.
+ *
* @return The holder's vault config file.
*/
public YamlConfiguration getPlayerVaultFile(String holder) {
@@ -247,6 +248,7 @@ public class VaultManager {
*
* @param holder The vault holder of whose file to save.
* @param yaml The config to save.
+ *
* @throws IOException Uh oh!
*/
public void saveFile(String holder, YamlConfiguration yaml) throws IOException {
diff --git a/src/main/java/com/drtshock/playervaults/vaultmanagement/VaultOperations.java b/src/main/java/com/drtshock/playervaults/vaultmanagement/VaultOperations.java
index 752d7eb..a4d8f80 100644
--- a/src/main/java/com/drtshock/playervaults/vaultmanagement/VaultOperations.java
+++ b/src/main/java/com/drtshock/playervaults/vaultmanagement/VaultOperations.java
@@ -18,23 +18,22 @@ package com.drtshock.playervaults.vaultmanagement;
import com.drtshock.playervaults.PlayerVaults;
import com.drtshock.playervaults.util.Lang;
-
-import java.io.IOException;
-
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
+import java.io.IOException;
+
public class VaultOperations {
/**
- * Check whether or not the player has permission to open the requested
- * vault.
+ * Check whether or not the player has permission to open the requested vault.
*
* @param sender The person to check.
* @param number The vault number.
+ *
* @return Whether or not they have permission.
*/
public static boolean checkPerms(CommandSender sender, int number) {
@@ -53,8 +52,8 @@ public class VaultOperations {
* Get the max size vault a player is allowed to have.
*
* @param player that is having his permissions checked.
- * @return max size as integer. If no max size is set then it will default
- * to 54.
+ *
+ * @return max size as integer. If no max size is set then it will default to 54.
*/
public static int getMaxVaultSize(Player player) {
if (player == null) {
@@ -73,6 +72,7 @@ public class VaultOperations {
*
* @param player The player to open to.
* @param arg The vault number to open.
+ *
* @return Whether or not the player was allowed to open it.
*/
public static boolean openOwnVault(Player player, String arg) {
@@ -107,6 +107,7 @@ public class VaultOperations {
* @param player The player to open to.
* @param holder The user to whom the requested vault belongs.
* @param arg The vault number to open.
+ *
* @return Whether or not the player was allowed to open it.
*/
public static boolean openOtherVault(Player player, String holder, String arg) {
diff --git a/src/main/java/com/drtshock/playervaults/vaultmanagement/VaultViewInfo.java b/src/main/java/com/drtshock/playervaults/vaultmanagement/VaultViewInfo.java
index 03f0d13..c79030d 100644
--- a/src/main/java/com/drtshock/playervaults/vaultmanagement/VaultViewInfo.java
+++ b/src/main/java/com/drtshock/playervaults/vaultmanagement/VaultViewInfo.java
@@ -17,8 +17,7 @@
package com.drtshock.playervaults.vaultmanagement;
/**
- * A class that stores information about a vault viewing including the holder of
- * the vault, and the vault number.
+ * A class that stores information about a vault viewing including the holder of the vault, and the vault number.
*/
public class VaultViewInfo {
diff --git a/src/main/java/org/json/JSONArray.java b/src/main/java/org/json/JSONArray.java
index e45fcc5..b93ddf8 100644
--- a/src/main/java/org/json/JSONArray.java
+++ b/src/main/java/org/json/JSONArray.java
@@ -34,47 +34,30 @@ import java.util.Iterator;
import java.util.Map;
/**
- * A JSONArray is an ordered sequence of values. Its external text form is a
- * string wrapped in square brackets with commas separating the values. The
- * internal form is an object having get and opt
- * methods for accessing the values by index, and put methods for
- * adding or replacing values. The values can be any of these types:
- * Boolean, JSONArray, JSONObject,
- * Number, String, or the
- * JSONObject.NULL object.
- *
- * The constructor can convert a JSON text into a Java object. The
- * toString method converts to JSON text.
- *
- * A get method returns a value if one can be found, and throws an
- * exception if one cannot be found. An opt method returns a
- * default value instead of throwing an exception, and so is useful for
- * obtaining optional values.
- *
- * The generic get() and opt() methods return an
- * object which you can cast or query for type. There are also typed
- * get and opt methods that do type checking and type
- * coercion for you.
- *
- * The texts produced by the toString methods strictly conform to
- * JSON syntax rules. The constructors are more forgiving in the texts they will
- * accept:
- *
- *
An extra , (comma) may appear just
- * before the closing bracket.
- *
The null value will be inserted when there is ,
- * (comma) elision.
- *
Strings may be quoted with ' (single
- * quote).
- *
Strings do not need to be quoted at all if they do not begin with a quote
- * or single quote, and if they do not contain leading or trailing spaces, and
- * if they do not contain any of these characters:
- * { } [ ] / \ : , = ; # and if they do not look like numbers and
- * if they are not the reserved words true, false, or
- * null.
- *
Values can be separated by ; (semicolon) as
- * well as by , (comma).
- *
+ * A JSONArray is an ordered sequence of values. Its external text form is a string wrapped in square brackets with
+ * commas separating the values. The internal form is an object having get and opt methods for
+ * accessing the values by index, and put methods for adding or replacing values. The values can be any of
+ * these types: Boolean, JSONArray, JSONObject, Number,
+ * String, or the JSONObject.NULL object.
+ *
+ * The constructor can convert a JSON text into a Java object. The toString method converts to JSON text.
+ *
+ * A get method returns a value if one can be found, and throws an exception if one cannot be found. An
+ * opt method returns a default value instead of throwing an exception, and so is useful for obtaining
+ * optional values.
+ *
+ * The generic get() and opt() methods return an object which you can cast or query for type.
+ * There are also typed get and opt methods that do type checking and type coercion for you.
+ *
+ * The texts produced by the toString methods strictly conform to JSON syntax rules. The constructors are
+ * more forgiving in the texts they will accept:
An extra , (comma) may appear
+ * just before the closing bracket.
The null value will be inserted when there is ,
+ * (comma) elision.
Strings may be quoted with ' (single
+ * quote).
Strings do not need to be quoted at all if they do not begin with a quote or single quote,
+ * and if they do not contain leading or trailing spaces, and if they do not contain any of these characters: { }
+ * [ ] / \ : , = ; # and if they do not look like numbers and if they are not the reserved words
+ * true, false, or null.
Values can be separated by ;
+ * (semicolon) as well as by , (comma).
*
* @author JSON.org
* @version 2012-11-13
@@ -95,7 +78,9 @@ public class JSONArray {
/**
* Construct a JSONArray from a JSONTokener.
+ *
* @param x A JSONTokener
+ *
* @throws JSONException If there is a syntax error.
*/
public JSONArray(JSONTokener x) throws JSONException {
@@ -132,10 +117,11 @@ public class JSONArray {
/**
* Construct a JSONArray from a source JSON text.
- * @param source A string that begins with
- * [ (left bracket)
- * and ends with ] (right bracket).
- * @throws JSONException If there is a syntax error.
+ *
+ * @param source A string that begins with [ (left bracket) and ends with
+ * ] (right bracket).
+ *
+ * @throws JSONException If there is a syntax error.
*/
public JSONArray(String source) throws JSONException {
this(new JSONTokener(source));
@@ -143,7 +129,8 @@ public class JSONArray {
/**
* Construct a JSONArray from a Collection.
- * @param collection A Collection.
+ *
+ * @param collection A Collection.
*/
public JSONArray(Collection> collection) {
this.myArrayList = new ArrayList