Skip to content

Commit e1fbca1

Browse files
committed
Update Mikedeejay2Lib
1 parent 4ac7630 commit e1fbca1

6 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/main/java/com/mikedeejay2/simplestack/Simplestack.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public void onEnable()
6161
listenerManager.addListener(new ItemMergeListener(this));
6262
listenerManager.addListener(new InventoryPickupItemListener(this));
6363
listenerManager.addListener(new PlayerItemConsumeListener(this));
64-
if(getMCVersion()[1] >= 16)
64+
if(getMCVersion().getVersionShort() >= 16)
6565
{
6666
listenerManager.addListener(new PrepareSmithingListener(this));
6767
}

src/main/java/com/mikedeejay2/simplestack/commands/HelpCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import com.mikedeejay2.mikedeejay2lib.commands.AbstractSubCommand;
44
import com.mikedeejay2.mikedeejay2lib.commands.CommandManager;
5-
import com.mikedeejay2.mikedeejay2lib.language.LangManager;
5+
import com.mikedeejay2.mikedeejay2lib.text.language.LangManager;
66
import com.mikedeejay2.simplestack.Simplestack;
77
import net.md_5.bungee.api.chat.BaseComponent;
88
import net.md_5.bungee.api.chat.ClickEvent;

src/main/java/com/mikedeejay2/simplestack/listeners/player/InventoryCloseListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public void craftingTableCloseEvent(InventoryCloseEvent event)
4444
type == InventoryType.ANVIL ||
4545
type == InventoryType.LOOM ||
4646
type == InventoryType.GRINDSTONE ||
47-
(plugin.getMCVersion()[1] >= 16 && type == InventoryType.SMITHING)
47+
(plugin.getMCVersion().getVersionShort() >= 16 && type == InventoryType.SMITHING)
4848
) ) return;
4949
Inventory playerInv = player.getInventory();
5050
MoveUtils.moveAllItemsToPlayerInv(plugin, inv, player, playerInv);

src/main/java/com/mikedeejay2/simplestack/util/CancelUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public static boolean cancelMoveCheck(Simplestack plugin, ItemStack item, Invent
109109
if(slot == 2 && !typeString.endsWith("PATTERN")) return true;
110110
}
111111
if(inv instanceof AnvilInventory && slot == 2) return true;
112-
if(plugin.getMCVersion()[1] >= 16 && inv instanceof SmithingInventory && slot == 2) return true;
112+
if(plugin.getMCVersion().getVersionShort() >= 16 && inv instanceof SmithingInventory && slot == 2) return true;
113113
if(inv instanceof GrindstoneInventory && slot == 2) return true;
114114
if(inv instanceof BrewerInventory)
115115
{
@@ -128,7 +128,7 @@ public static boolean cancelMoveCheck(Simplestack plugin, ItemStack item, Invent
128128
public static boolean cancelGUICheck(Simplestack plugin, Inventory inv, ItemStack cursorItem)
129129
{
130130
if(inv == null) return true;
131-
if(plugin.getMCVersion()[1] >= 16 && inv instanceof SmithingInventory) return false;
131+
if(plugin.getMCVersion().getVersionShort() >= 16 && inv instanceof SmithingInventory) return false;
132132
if(ShulkerBoxes.isShulkerBox(cursorItem.getType()) && inv.getLocation() != null)
133133
{
134134
Location location = inv.getLocation();

src/main/java/com/mikedeejay2/simplestack/util/CheckUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ else if(itemOutput == null)
301301
*/
302302
public static void useSmithingCheck(Simplestack plugin, Player player, Inventory topInv, int slot, Inventory clickedInventory, boolean rightClick)
303303
{
304-
if(plugin.getMCVersion()[1] < 16) return;
304+
if(plugin.getMCVersion().getVersionShort() < 16) return;
305305
Sound sound = Sound.BLOCK_SMITHING_TABLE_USE;
306306
if(clickedInventory instanceof SmithingInventory && slot == 2)
307307
{
@@ -362,7 +362,7 @@ public void run()
362362
{
363363
triggerAnvilSmithingUpdate(topInv);
364364
}
365-
if(plugin.getMCVersion()[1] < 16) return;
365+
if(plugin.getMCVersion().getVersionShort() < 16) return;
366366
if(topInv instanceof SmithingInventory)
367367
{
368368
triggerAnvilSmithingUpdate(topInv);

src/main/java/com/mikedeejay2/simplestack/util/ClickUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ else if(clickedInventory.equals(topInv))
194194
else if(topInv instanceof CraftingInventory ||
195195
topInv instanceof FurnaceInventory ||
196196
topInv instanceof AnvilInventory ||
197-
(plugin.getMCVersion()[1] >= 16 && topInv instanceof SmithingInventory) ||
197+
(plugin.getMCVersion().getVersionShort() >= 16 && topInv instanceof SmithingInventory) ||
198198
topInv instanceof GrindstoneInventory)
199199
{
200200
playerOrder = true;
@@ -205,7 +205,7 @@ else if(topInv instanceof CraftingInventory ||
205205
if((topInv instanceof CraftingInventory && slot == 0) ||
206206
(topInv instanceof FurnaceInventory && slot == 2) ||
207207
(topInv instanceof AnvilInventory && slot == 2) ||
208-
(plugin.getMCVersion()[1] >= 16 && topInv instanceof SmithingInventory && slot == 2) ||
208+
(plugin.getMCVersion().getVersionShort() >= 16 && topInv instanceof SmithingInventory && slot == 2) ||
209209
(topInv instanceof EnchantingInventory && slot == 0) ||
210210
(topInv instanceof GrindstoneInventory && slot == 2) ||
211211
(topInv instanceof StonecutterInventory && slot == 2) ||
@@ -242,7 +242,7 @@ else if(toInv instanceof EnchantingInventory)
242242
clickedInventory.setItem(slot, itemInSlot);
243243
return;
244244
}
245-
else if(toInv instanceof AnvilInventory || (plugin.getMCVersion()[1] >= 16 && toInv instanceof SmithingInventory))
245+
else if(toInv instanceof AnvilInventory || (plugin.getMCVersion().getVersionShort() >= 16 && toInv instanceof SmithingInventory))
246246
{
247247
--endSlot;
248248
}

0 commit comments

Comments
 (0)