Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Commit a3aa9ee

Browse files
committed
Attempt to fix #264
1 parent 4e9e633 commit a3aa9ee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/com/massivecraft/factions/cmd/CmdVault.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.massivecraft.factions.cmd;
22

3+
import com.cryptomorin.xseries.XMaterial;
34
import com.massivecraft.factions.Board;
45
import com.massivecraft.factions.FLocation;
56
import com.massivecraft.factions.SavageFactions;
@@ -46,13 +47,13 @@ public void perform(CommandContext context) {
4647
context.msg(TL.COMMAND_VAULT_INVALID);
4748
return;
4849
}
49-
FLocation vaultFLocation = new FLocation(vaultLocation);
50-
if (Board.getInstance().getFactionAt(vaultFLocation) != context.faction) {
50+
if (vaultLocation.getBlock().getType() != XMaterial.CHEST.parseMaterial()) {
5151
context.faction.setVault(null);
5252
context.msg(TL.COMMAND_VAULT_INVALID);
5353
return;
5454
}
55-
if (vaultLocation.getBlock().getType() != Material.CHEST) {
55+
FLocation vaultFLocation = new FLocation(vaultLocation);
56+
if (Board.getInstance().getFactionAt(vaultFLocation) != context.faction) {
5657
context.faction.setVault(null);
5758
context.msg(TL.COMMAND_VAULT_INVALID);
5859
return;
@@ -62,7 +63,6 @@ public void perform(CommandContext context) {
6263
context.msg(TL.COMMAND_VAULT_OPENING);
6364
context.player.openInventory(chestInv);
6465

65-
6666
}
6767

6868
@Override

0 commit comments

Comments
 (0)