mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-15 23:25:21 +01:00
Updated for Minecraft update. Untested.
This commit is contained in:
parent
23e7d4a8bb
commit
8073089da4
@ -388,13 +388,13 @@ public boolean onCommand(Player player, String[] split) {
|
||||
} else if ((split[0].equalsIgnoreCase("/stack")
|
||||
|| split[0].equalsIgnoreCase("/;"))
|
||||
&& player.canUseCommand("/stack")) {
|
||||
hl[] items = player.getInventory().getArray();
|
||||
hm[] items = player.getInventory().getArray();
|
||||
int len = items.length;
|
||||
|
||||
int affected = 0;
|
||||
|
||||
for (int i = 0; i < len; i++) {
|
||||
hl item = items[i];
|
||||
hm item = items[i];
|
||||
|
||||
// Avoid infinite stacks and stacks with durability
|
||||
if (item == null || item.a <= 0 || item.d > 0) {
|
||||
@ -411,7 +411,7 @@ public boolean onCommand(Player player, String[] split) {
|
||||
|
||||
// Find another stack of the same type
|
||||
for (int j = i + 1; j < len; j++) {
|
||||
hl item2 = items[j];
|
||||
hm item2 = items[j];
|
||||
|
||||
// Avoid infinite stacks and stacks with durability
|
||||
if (item2 == null || item2.a <= 0 || item2.d > 0) {
|
||||
@ -569,7 +569,7 @@ public boolean onItemPickUp(Player player, Item item) {
|
||||
@Override
|
||||
public boolean onInventoryChange(Player player) {
|
||||
if (blacklist != null && blacklist.hasOnAcquire()) {
|
||||
hl[] items = player.getInventory().getArray();
|
||||
hm[] items = player.getInventory().getArray();
|
||||
boolean needUpdate = false;
|
||||
|
||||
for (int i = 0; i < items.length; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user