Commit rest of files.

This commit is contained in:
Trent Hensler
2018-12-16 22:37:41 -08:00
parent 181bb89ac0
commit a3d72a0a28
9 changed files with 10 additions and 12 deletions
@@ -70,7 +70,7 @@ public class VaultCommand implements CommandExecutor {
String target = args[0]; String target = args[0];
OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(args[0]); OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(args[0]);
if(offlinePlayer != null && offlinePlayer.hasPlayedBefore()) { if (offlinePlayer != null && offlinePlayer.hasPlayedBefore()) {
target = offlinePlayer.getUniqueId().toString(); target = offlinePlayer.getUniqueId().toString();
} }
if (VaultOperations.openOtherVault(player, target, args[1])) { if (VaultOperations.openOtherVault(player, target, args[1])) {
@@ -13,7 +13,6 @@ public interface Converter {
* Converts the other plugin's data. * Converts the other plugin's data.
* *
* @param initiator the initiator of the conversion. May be null * @param initiator the initiator of the conversion. May be null
*
* @return the number of vaults converted. Returns 0 on none converted or -1 if no vaults were converted. * @return the number of vaults converted. Returns 0 on none converted or -1 if no vaults were converted.
*/ */
int run(CommandSender initiator); int run(CommandSender initiator);
@@ -122,7 +122,7 @@ public class Listeners implements Listener {
int num = info.getNumber(); int num = info.getNumber();
String inventoryTitle = clickedInventory.getTitle(); String inventoryTitle = clickedInventory.getTitle();
String title = Lang.VAULT_TITLE.toString().replace("%number", String.valueOf(num)).replace("%p", info.getVaultName()); String title = Lang.VAULT_TITLE.toString().replace("%number", String.valueOf(num)).replace("%p", info.getVaultName());
if (((inventoryTitle != null && inventoryTitle.equalsIgnoreCase(title)) ||event.getCurrentItem() != null)) { if (((inventoryTitle != null && inventoryTitle.equalsIgnoreCase(title)) || event.getCurrentItem() != null)) {
if (PlayerVaults.getInstance().isBlockedMaterial(event.getCurrentItem().getType())) { if (PlayerVaults.getInstance().isBlockedMaterial(event.getCurrentItem().getType())) {
event.setCancelled(true); event.setCancelled(true);
player.sendMessage(Lang.TITLE.toString() + Lang.BLOCKED_ITEM.toString().replace("%m", event.getCurrentItem().getType().name())); player.sendMessage(Lang.TITLE.toString() + Lang.BLOCKED_ITEM.toString().replace("%m", event.getCurrentItem().getType().name()));
@@ -7,7 +7,6 @@ import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer; import org.bukkit.OfflinePlayer;
import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory; import org.bukkit.inventory.Inventory;
import java.io.File; import java.io.File;
@@ -238,7 +238,7 @@ public class UUIDVaultManager {
} }
} }
String uuid = sender instanceof Player ? ((Player)sender).getUniqueId().toString() : holder; String uuid = sender instanceof Player ? ((Player) sender).getUniqueId().toString() : holder;
PlayerVaults.getInstance().getOpenInventories().remove(new VaultViewInfo(holder, number).toString()); PlayerVaults.getInstance().getOpenInventories().remove(new VaultViewInfo(holder, number).toString());
} }
@@ -257,7 +257,7 @@ public class VaultManager {
} }
} }
String vaultName = sender instanceof Player ? ((Player)sender).getUniqueId().toString() : holder; String vaultName = sender instanceof Player ? ((Player) sender).getUniqueId().toString() : holder;
PlayerVaults.getInstance().getOpenInventories().remove(new VaultViewInfo(vaultName, number).toString()); PlayerVaults.getInstance().getOpenInventories().remove(new VaultViewInfo(vaultName, number).toString());
} }