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
@@ -1,4 +1,4 @@
/*
/*
* Copyright (C) 2013 drtshock
*
* This program is free software: you can redistribute it and/or modify
@@ -70,7 +70,7 @@ public class VaultCommand implements CommandExecutor {
String target = args[0];
OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(args[0]);
if(offlinePlayer != null && offlinePlayer.hasPlayedBefore()) {
if (offlinePlayer != null && offlinePlayer.hasPlayedBefore()) {
target = offlinePlayer.getUniqueId().toString();
}
if (VaultOperations.openOtherVault(player, target, args[1])) {
@@ -12,8 +12,7 @@ public interface Converter {
/**
* 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.
*/
int run(CommandSender initiator);
@@ -122,7 +122,7 @@ public class Listeners implements Listener {
int num = info.getNumber();
String inventoryTitle = clickedInventory.getTitle();
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())) {
event.setCancelled(true);
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.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
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());
}
@@ -86,7 +86,7 @@ public class VaultManager {
/**
* Load the player's vault and return it.
*
* @param name The holder of the vault.
* @param name The holder of the vault.
* @param number The vault number.
*/
public Inventory loadOtherVault(String name, int number, int size) {
@@ -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());
}
@@ -190,9 +190,9 @@ public class VaultOperations {
/**
* Open another player's vault.
*
* @param player The player to open to.
* @param player The player to open to.
* @param vaultOwner The name of the vault owner.
* @param arg The vault number to open.
* @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 vaultOwner, String arg) {
@@ -27,7 +27,7 @@ public class VaultViewInfo {
/**
* Makes a VaultViewInfo object. Used for opening a vault owned by the opener.
*
* @param i vault number.
* @param i vault number.
*/
public VaultViewInfo(String vaultName, int i) {
this.number = i;