Update vault size each time inventory is opened.
Before, the VaultViewInfo was being stored as name instead of uuid as well as not being removed when a vault was closed. This caused the same inventory to be accessed from memory each time the vault was opened after the first opening since the last restart when it would load from file. Since we are recreating the inventory each time, there will likely be a performance loss but we will update the vault title and size each time its opened. Resolves #58.
This commit is contained in:
@@ -44,7 +44,9 @@ public class PlayerVaults extends JavaPlugin {
|
||||
private String newVersion = "";
|
||||
private String link = "";
|
||||
private HashMap<String, SignSetInfo> setSign = new HashMap<>();
|
||||
// Player name - VaultViewInfo
|
||||
private HashMap<String, VaultViewInfo> inVault = new HashMap<>();
|
||||
// VaultViewInfo - Inventory
|
||||
private HashMap<String, Inventory> openInventories = new HashMap<>();
|
||||
private Economy economy = null;
|
||||
private boolean dropOnDeath = false;
|
||||
|
||||
@@ -32,10 +32,10 @@ public class VaultCommand implements CommandExecutor {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
if (VaultOperations.openOwnVault(player, args[0], true)) {
|
||||
PlayerVaults.getInstance().getInVault().put(sender.getName(), new VaultViewInfo(sender.getName(), Integer.parseInt(args[0])));
|
||||
PlayerVaults.getInstance().getInVault().put(player.getUniqueId().toString(), new VaultViewInfo(player.getUniqueId(), Integer.parseInt(args[0])));
|
||||
} else if (sender.hasPermission("playervaults.admin")) {
|
||||
OfflinePlayer searchPlayer = Bukkit.getOfflinePlayer(args[0]);
|
||||
if (searchPlayer == null) {
|
||||
if (searchPlayer == null || !searchPlayer.hasPlayedBefore()) {
|
||||
sender.sendMessage(Lang.TITLE.toString() + Lang.NO_PLAYER_FOUND.toString().replaceAll("%p", args[0]));
|
||||
break;
|
||||
}
|
||||
@@ -61,7 +61,7 @@ public class VaultCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
if (VaultOperations.openOtherVault(player, searchPlayer, args[1])) {
|
||||
PlayerVaults.getInstance().getInVault().put(sender.getName(), new VaultViewInfo(args[0], Integer.parseInt(args[1])));
|
||||
PlayerVaults.getInstance().getInVault().put(player.getUniqueId().toString(), new VaultViewInfo(player.getUniqueId(), Integer.parseInt(args[1])));
|
||||
} else {
|
||||
sender.sendMessage(Lang.TITLE.toString() + "Failed to open vault.");
|
||||
}
|
||||
@@ -71,7 +71,7 @@ public class VaultCommand implements CommandExecutor {
|
||||
sender.sendMessage(Lang.TITLE + "/pv <player> <number>");
|
||||
}
|
||||
} else {
|
||||
sender.sendMessage(Lang.TITLE.toString() + ChatColor.RED + Lang.PLAYER_ONLY);
|
||||
sender.sendMessage(Lang.TITLE.toString() + ChatColor.RED + Lang.PLAYER_ONLY.toString());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -50,10 +50,10 @@ public class Listeners implements Listener {
|
||||
}
|
||||
|
||||
public void saveVault(Player player) {
|
||||
if (PlayerVaults.getInstance().getInVault().containsKey(player.getName())) {
|
||||
if (PlayerVaults.getInstance().getInVault().containsKey(player.getUniqueId().toString())) {
|
||||
Inventory inv = player.getOpenInventory().getTopInventory();
|
||||
if (inv.getViewers().size() == 1) {
|
||||
VaultViewInfo info = PlayerVaults.getInstance().getInVault().get(player.getName());
|
||||
VaultViewInfo info = PlayerVaults.getInstance().getInVault().get(player.getUniqueId().toString());
|
||||
try {
|
||||
vm.saveVault(inv, player.getUniqueId(), info.getNumber());
|
||||
} catch (IOException e) {
|
||||
@@ -62,7 +62,8 @@ public class Listeners implements Listener {
|
||||
|
||||
PlayerVaults.getInstance().getOpenInventories().remove(info.toString());
|
||||
}
|
||||
PlayerVaults.getInstance().getInVault().remove(player.getName());
|
||||
|
||||
PlayerVaults.getInstance().getInVault().remove(player.getUniqueId().toString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,7 +179,7 @@ public class Listeners implements Listener {
|
||||
player.openInventory(inv);
|
||||
}
|
||||
}
|
||||
PlayerVaults.getInstance().getInVault().put(player.getName(), new VaultViewInfo((self) ? player.getName() : owner, num));
|
||||
PlayerVaults.getInstance().getInVault().put(player.getUniqueId().toString(), new VaultViewInfo((self) ? player.getName() : owner, num));
|
||||
event.setCancelled(true);
|
||||
player.sendMessage(Lang.TITLE.toString() + Lang.OPEN_WITH_SIGN.toString().replace("%v", String.valueOf(num)).replace("%p", (self) ? player.getName() : owner));
|
||||
} else {
|
||||
|
||||
@@ -81,9 +81,9 @@ public class Serialization {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Inventory toInventory(List<String> stringItems, int number, int size) {
|
||||
public static Inventory toInventory(List<String> stringItems, int number, int size, String title) {
|
||||
VaultHolder holder = new VaultHolder(number);
|
||||
Inventory inv = Bukkit.createInventory(holder, size, ChatColor.RED + "Vault #" + number);
|
||||
Inventory inv = Bukkit.createInventory(holder, size, title);
|
||||
holder.setInventory(inv);
|
||||
List<ItemStack> contents = new ArrayList<>();
|
||||
for (String piece : stringItems) {
|
||||
|
||||
@@ -69,7 +69,8 @@ public class UUIDVaultManager {
|
||||
size = 54;
|
||||
}
|
||||
|
||||
VaultViewInfo info = new VaultViewInfo(player.getUniqueId().toString(), number);
|
||||
String title = Lang.VAULT_TITLE.toString().replace("%number", String.valueOf(number)).replace("%p", player.getName());
|
||||
VaultViewInfo info = new VaultViewInfo(player.getUniqueId(), number);
|
||||
Inventory inv;
|
||||
if (PlayerVaults.getInstance().getOpenInventories().containsKey(info.toString())) {
|
||||
inv = PlayerVaults.getInstance().getOpenInventories().get(info.toString());
|
||||
@@ -78,7 +79,6 @@ public class UUIDVaultManager {
|
||||
if (playerFile.getConfigurationSection("vault" + number) == null) {
|
||||
VaultHolder vaultHolder = new VaultHolder(number);
|
||||
if (EconomyOperations.payToCreate(player)) {
|
||||
String title = Lang.VAULT_TITLE.toString().replace("%number", String.valueOf(number)).replace("%p", player.getName());
|
||||
inv = Bukkit.createInventory(vaultHolder, size, title);
|
||||
vaultHolder.setInventory(inv);
|
||||
} else {
|
||||
@@ -86,10 +86,11 @@ public class UUIDVaultManager {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
if (getInventory(playerFile, size, number) == null) {
|
||||
Inventory i = getInventory(playerFile, size, number, title);
|
||||
if(i == null) {
|
||||
return null;
|
||||
} else {
|
||||
inv = getInventory(playerFile, size, number);
|
||||
inv = i;
|
||||
}
|
||||
}
|
||||
PlayerVaults.getInstance().getOpenInventories().put(info.toString(), inv);
|
||||
@@ -108,7 +109,8 @@ public class UUIDVaultManager {
|
||||
if (size % 9 != 0) {
|
||||
size = 54;
|
||||
}
|
||||
VaultViewInfo info = new VaultViewInfo(holder.toString(), number);
|
||||
String title = Lang.VAULT_TITLE.toString().replace("%number", String.valueOf(number)).replace("%p", Bukkit.getOfflinePlayer(holder).getName());
|
||||
VaultViewInfo info = new VaultViewInfo(holder, number);
|
||||
Inventory inv;
|
||||
if (PlayerVaults.getInstance().getOpenInventories().containsKey(info.toString())) {
|
||||
inv = PlayerVaults.getInstance().getOpenInventories().get(info.toString());
|
||||
@@ -117,10 +119,11 @@ public class UUIDVaultManager {
|
||||
if (playerFile.getConfigurationSection("vault" + number) == null) {
|
||||
return null;
|
||||
} else {
|
||||
if (getInventory(playerFile, size, number) == null) {
|
||||
Inventory i = getInventory(playerFile, size, number, title);
|
||||
if(i == null) {
|
||||
return null;
|
||||
} else {
|
||||
inv = getInventory(playerFile, size, number);
|
||||
inv = i;
|
||||
}
|
||||
}
|
||||
PlayerVaults.getInstance().getOpenInventories().put(info.toString(), inv);
|
||||
@@ -137,7 +140,7 @@ public class UUIDVaultManager {
|
||||
*
|
||||
* @return inventory if exists, otherwise null.
|
||||
*/
|
||||
private Inventory getInventory(YamlConfiguration playerFile, int size, int number) {
|
||||
private Inventory getInventory(YamlConfiguration playerFile, int size, int number, String title) {
|
||||
List<String> data = new ArrayList<>();
|
||||
for (int x = 0; x < size; x++) {
|
||||
String line = playerFile.getString("vault" + number + "." + x);
|
||||
@@ -147,7 +150,7 @@ public class UUIDVaultManager {
|
||||
data.add("null");
|
||||
}
|
||||
}
|
||||
return Serialization.toInventory(data, number, size);
|
||||
return Serialization.toInventory(data, number, size, title);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -161,17 +164,18 @@ public class UUIDVaultManager {
|
||||
public Inventory getVault(UUID holder, int number) {
|
||||
YamlConfiguration playerFile = getPlayerVaultFile(holder);
|
||||
List<String> data = playerFile.getStringList("vault" + number);
|
||||
OfflinePlayer player = Bukkit.getPlayer(holder);
|
||||
if (player == null) {
|
||||
OfflinePlayer player = Bukkit.getOfflinePlayer(holder);
|
||||
if (player == null || !player.hasPlayedBefore()) {
|
||||
return null;
|
||||
}
|
||||
String title = Lang.VAULT_TITLE.toString().replace("%number", String.valueOf(number)).replace("%p", Bukkit.getOfflinePlayer(holder).getName());
|
||||
if (data == null) {
|
||||
VaultHolder vaultHolder = new VaultHolder(number);
|
||||
Inventory inv = Bukkit.createInventory(vaultHolder, VaultOperations.getMaxVaultSize(player), Lang.VAULT_TITLE.toString().replace("%number", String.valueOf(number)).replace("%p", player.getName()));
|
||||
vaultHolder.setInventory(inv);
|
||||
return inv;
|
||||
} else {
|
||||
return Serialization.toInventory(data, number, VaultOperations.getMaxVaultSize(player));
|
||||
return Serialization.toInventory(data, number, VaultOperations.getMaxVaultSize(player), title);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,268 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013 drtshock
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.drtshock.playervaults.vaultmanagement;
|
||||
|
||||
import com.drtshock.playervaults.PlayerVaults;
|
||||
import com.drtshock.playervaults.util.Lang;
|
||||
import org.bukkit.Bukkit;
|
||||
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.
|
||||
*/
|
||||
@Deprecated public class VaultManager {
|
||||
|
||||
public PlayerVaults plugin;
|
||||
|
||||
public VaultManager(PlayerVaults instance) {
|
||||
this.plugin = instance;
|
||||
}
|
||||
|
||||
private final String directory = "plugins" + File.separator + "PlayerVaults" + File.separator + "vaults";
|
||||
|
||||
/**
|
||||
* Saves the inventory to the specified player and vault number.
|
||||
*
|
||||
* @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!
|
||||
*/
|
||||
@Deprecated
|
||||
public void saveVault(Inventory inventory, String player, int number) throws IOException {
|
||||
int size = inventory.getSize();
|
||||
YamlConfiguration yaml = getPlayerVaultFile(player);
|
||||
if (size == 54) {
|
||||
yaml.set("vault" + number, null);
|
||||
} else {
|
||||
for (int x = 0; x < size; x++) {
|
||||
yaml.set("vault" + number + "." + x, null);
|
||||
}
|
||||
}
|
||||
List<String> list = Serialization.toString(inventory);
|
||||
String[] ser = list.toArray(new String[list.size()]);
|
||||
for (int x = 0; x < ser.length; x++) {
|
||||
if (!ser[x].equalsIgnoreCase("null")) {
|
||||
yaml.set("vault" + number + "." + x, ser[x]);
|
||||
}
|
||||
}
|
||||
saveFile(player, yaml);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the player's vault and return it.
|
||||
*
|
||||
* @param holder The holder of the vault.
|
||||
* @param number The vault number.
|
||||
*/
|
||||
@Deprecated
|
||||
public Inventory loadOwnVault(String holder, int number, int size) {
|
||||
if (size % 9 != 0) {
|
||||
size = 54;
|
||||
}
|
||||
VaultViewInfo info = new VaultViewInfo(holder, number);
|
||||
Inventory inv;
|
||||
if (PlayerVaults.getInstance().getOpenInventories().containsKey(info.toString())) {
|
||||
inv = PlayerVaults.getInstance().getOpenInventories().get(info.toString());
|
||||
} else {
|
||||
YamlConfiguration playerFile = getPlayerVaultFile(holder);
|
||||
if (playerFile.getConfigurationSection("vault" + number) == null) {
|
||||
VaultHolder vaultHolder = new VaultHolder(number);
|
||||
Player player = Bukkit.getPlayer(holder);
|
||||
if (player == null) {
|
||||
return null;
|
||||
}
|
||||
if (EconomyOperations.payToCreate(player)) {
|
||||
inv = Bukkit.createInventory(vaultHolder, size, Lang.VAULT_TITLE.toString().replace("%number", String.valueOf(number)).replace("%p", holder));
|
||||
vaultHolder.setInventory(inv);
|
||||
} else {
|
||||
player.sendMessage(Lang.TITLE.toString() + Lang.INSUFFICIENT_FUNDS.toString());
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
if (getInventory(playerFile, size, number) == null) {
|
||||
return null;
|
||||
} else {
|
||||
inv = getInventory(playerFile, size, number);
|
||||
}
|
||||
}
|
||||
PlayerVaults.getInstance().getOpenInventories().put(info.toString(), inv);
|
||||
}
|
||||
return inv;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the player's vault and return it.
|
||||
*
|
||||
* @param holder The holder of the vault.
|
||||
* @param number The vault number.
|
||||
*/
|
||||
@Deprecated
|
||||
public Inventory loadOtherVault(String holder, int number, int size) {
|
||||
if (size % 9 != 0) {
|
||||
size = 54;
|
||||
}
|
||||
VaultViewInfo info = new VaultViewInfo(holder, number);
|
||||
Inventory inv;
|
||||
if (PlayerVaults.getInstance().getOpenInventories().containsKey(info.toString())) {
|
||||
inv = PlayerVaults.getInstance().getOpenInventories().get(info.toString());
|
||||
} else {
|
||||
YamlConfiguration playerFile = getPlayerVaultFile(holder);
|
||||
if (playerFile.getConfigurationSection("vault" + number) == null) {
|
||||
return null;
|
||||
} else {
|
||||
if (getInventory(playerFile, size, number) == null) {
|
||||
return null;
|
||||
} else {
|
||||
inv = getInventory(playerFile, size, number);
|
||||
}
|
||||
}
|
||||
PlayerVaults.getInstance().getOpenInventories().put(info.toString(), inv);
|
||||
}
|
||||
return inv;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
@Deprecated
|
||||
private Inventory getInventory(YamlConfiguration playerFile, int size, int number) {
|
||||
List<String> data = new ArrayList<>();
|
||||
for (int x = 0; x < size; x++) {
|
||||
String line = playerFile.getString("vault" + number + "." + x);
|
||||
if (line != null) {
|
||||
data.add(line);
|
||||
} else {
|
||||
data.add("null");
|
||||
}
|
||||
}
|
||||
return Serialization.toInventory(data, number, size);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
@Deprecated
|
||||
public Inventory getVault(String holder, int number) {
|
||||
YamlConfiguration playerFile = getPlayerVaultFile(holder);
|
||||
List<String> data = playerFile.getStringList("vault" + number);
|
||||
if (data == null) {
|
||||
VaultHolder vaultHolder = new VaultHolder(number);
|
||||
Inventory inv = Bukkit.createInventory(vaultHolder, VaultOperations.getMaxVaultSize(Bukkit.getPlayerExact(holder)), Lang.VAULT_TITLE.toString().replace("%number", String.valueOf(number)).replace("%p", holder));
|
||||
vaultHolder.setInventory(inv);
|
||||
return inv;
|
||||
} else {
|
||||
return Serialization.toInventory(data, number, VaultOperations.getMaxVaultSize(Bukkit.getPlayerExact(holder)));
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public boolean vaultExists(String holder, int number) {
|
||||
YamlConfiguration playerFile = getPlayerVaultFile(holder);
|
||||
return playerFile.contains("vault" + number);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a players vault.
|
||||
*
|
||||
* @param sender The sender of whom to send messages to.
|
||||
* @param holder The vault holder.
|
||||
* @param number The vault number.
|
||||
*
|
||||
* @throws IOException Uh oh!
|
||||
*/
|
||||
@Deprecated
|
||||
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()) {
|
||||
return;
|
||||
}
|
||||
FileConfiguration playerFile = YamlConfiguration.loadConfiguration(file);
|
||||
if (file.exists()) {
|
||||
playerFile.set("vault" + number, null);
|
||||
playerFile.save(file);
|
||||
}
|
||||
if (sender.getName().equalsIgnoreCase(holder)) {
|
||||
sender.sendMessage(Lang.TITLE.toString() + Lang.DELETE_VAULT.toString().replace("%v", String.valueOf(number)));
|
||||
} else {
|
||||
sender.sendMessage(Lang.TITLE.toString() + Lang.DELETE_OTHER_VAULT.toString().replace("%v", String.valueOf(number)).replaceAll("%p", holder));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the holder's vault file. Create if doesn't exist.
|
||||
*
|
||||
* @param holder The vault holder.
|
||||
*
|
||||
* @return The holder's vault config file.
|
||||
*/
|
||||
@Deprecated
|
||||
public YamlConfiguration getPlayerVaultFile(String holder) {
|
||||
File folder = new File(directory);
|
||||
if (!folder.exists()) {
|
||||
folder.mkdir();
|
||||
}
|
||||
File file = new File(directory + File.separator + holder.toLowerCase() + ".yml");
|
||||
if (!file.exists()) {
|
||||
try {
|
||||
file.createNewFile();
|
||||
} catch (IOException e) {
|
||||
// Who cares?
|
||||
}
|
||||
}
|
||||
return YamlConfiguration.loadConfiguration(file);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the players vault file.
|
||||
*
|
||||
* @param holder The vault holder of whose file to save.
|
||||
* @param yaml The config to save.
|
||||
*
|
||||
* @throws IOException Uh oh!
|
||||
*/
|
||||
@Deprecated
|
||||
public void saveFile(String holder, YamlConfiguration yaml) throws IOException {
|
||||
File file = new File(directory + File.separator + holder.toLowerCase() + ".yml");
|
||||
if (file.exists() && PlayerVaults.getInstance().isBackupsEnabled()) {
|
||||
file.renameTo(new File(PlayerVaults.getInstance().getBackupsFolder(), holder.toLowerCase() + ".yml"));
|
||||
}
|
||||
yaml.save(file);
|
||||
}
|
||||
}
|
||||
@@ -91,7 +91,7 @@ public class VaultOperations {
|
||||
* @return max size as integer. If no max size is set then it will default to 54.
|
||||
*/
|
||||
public static int getMaxVaultSize(OfflinePlayer player) {
|
||||
if (player == null) {
|
||||
if (player == null || !player.hasPlayedBefore()) {
|
||||
return 54;
|
||||
}
|
||||
for (int i = 6; i != 0; i--) {
|
||||
|
||||
@@ -16,11 +16,16 @@
|
||||
*/
|
||||
package com.drtshock.playervaults.vaultmanagement;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* A class that stores information about a vault viewing including the holder of the vault, and the vault number.
|
||||
*/
|
||||
public class VaultViewInfo {
|
||||
|
||||
UUID uuid;
|
||||
String holder;
|
||||
int number;
|
||||
|
||||
@@ -30,20 +35,43 @@ public class VaultViewInfo {
|
||||
* @param s The holder of the vault.
|
||||
* @param i The vault number.
|
||||
*/
|
||||
@Deprecated
|
||||
public VaultViewInfo(String s, int i) {
|
||||
this.holder = s;
|
||||
this.number = i;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes a VaultViewInfo object.
|
||||
*
|
||||
* @param uuid uuid of viewer.
|
||||
* @param i vault number
|
||||
*/
|
||||
public VaultViewInfo(UUID uuid, int i) {
|
||||
this.uuid = uuid;
|
||||
this.number = i;
|
||||
this.holder = Bukkit.getOfflinePlayer(uuid).getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the holder of the vault.
|
||||
*
|
||||
* @return The holder of the vault.
|
||||
*/
|
||||
@Deprecated
|
||||
public String getHolder() {
|
||||
return this.holder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the vault holder's UUID.
|
||||
*
|
||||
* @return The vault holder's UUID.
|
||||
*/
|
||||
public UUID getHolderUUID() {
|
||||
return this.uuid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the vault number.
|
||||
*
|
||||
@@ -55,6 +83,6 @@ public class VaultViewInfo {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.holder + " " + this.number;
|
||||
return this.uuid + " " + this.number;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user