mirror of
https://github.com/Jikoo/OpenInv.git
synced 2026-11-04 16:50:04 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19eafddfac | ||
|
|
8a388b5620 | ||
|
|
206fff2c0a | ||
|
|
6656e431b6 |
No files matched your search
@@ -8,7 +8,7 @@
|
||||
<artifactId>openinvparent</artifactId>
|
||||
<groupId>com.lishid</groupId>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
<version>5.1.5</version>
|
||||
<version>5.1.6</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvtogglepersist</artifactId>
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
<parent>
|
||||
<artifactId>openinvparent</artifactId>
|
||||
<groupId>com.lishid</groupId>
|
||||
<version>5.1.5</version>
|
||||
<version>5.1.6</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvapi</artifactId>
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvparent</artifactId>
|
||||
<version>5.1.5</version>
|
||||
<version>5.1.6</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvcommon</artifactId>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<artifactId>openinvparent</artifactId>
|
||||
<groupId>com.lishid</groupId>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
<version>5.1.5</version>
|
||||
<version>5.1.6</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvadapter1_21_R2</artifactId>
|
||||
|
||||
+3
-2
@@ -124,10 +124,11 @@ public abstract class OpenChestMenu<T extends Container & ISpecialInventory & In
|
||||
protected void preSlotSetup() {}
|
||||
|
||||
protected @NotNull Slot getUpperSlot(int index, int x, int y) {
|
||||
Slot slot = new Slot(container, index, x, y);
|
||||
if (viewOnly) {
|
||||
return new SlotViewOnly(container, index, x, y);
|
||||
return SlotViewOnly.wrap(slot);
|
||||
}
|
||||
return new Slot(container, index, x, y);
|
||||
return slot;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+8
-1
@@ -1,8 +1,10 @@
|
||||
package com.lishid.openinv.internal.v1_21_R2.container.slot;
|
||||
|
||||
import net.minecraft.network.protocol.game.ClientboundContainerSetSlotPacket;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.Container;
|
||||
import net.minecraft.world.entity.EquipmentSlot;
|
||||
import net.minecraft.world.inventory.InventoryMenu;
|
||||
import net.minecraft.world.inventory.Slot;
|
||||
import org.bukkit.event.inventory.InventoryType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -37,7 +39,12 @@ public class ContentOffHand extends ContentEquipment {
|
||||
if (holder.connection != null
|
||||
&& !holder.connection.isDisconnected()
|
||||
&& holder.containerMenu != holder.inventoryMenu) {
|
||||
holder.resendItemInHands();
|
||||
holder.connection.send(
|
||||
new ClientboundContainerSetSlotPacket(
|
||||
holder.inventoryMenu.containerId,
|
||||
holder.inventoryMenu.incrementStateId(),
|
||||
InventoryMenu.SHIELD_SLOT,
|
||||
holder.getOffhandItem()));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<artifactId>openinvparent</artifactId>
|
||||
<groupId>com.lishid</groupId>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
<version>5.1.5</version>
|
||||
<version>5.1.6</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvadapter1_21_R3</artifactId>
|
||||
|
||||
+3
-2
@@ -124,10 +124,11 @@ public abstract class OpenChestMenu<T extends Container & ISpecialInventory & In
|
||||
protected void preSlotSetup() {}
|
||||
|
||||
protected @NotNull Slot getUpperSlot(int index, int x, int y) {
|
||||
Slot slot = new Slot(container, index, x, y);
|
||||
if (viewOnly) {
|
||||
return new SlotViewOnly(container, index, x, y);
|
||||
return SlotViewOnly.wrap(slot);
|
||||
}
|
||||
return new Slot(container, index, x, y);
|
||||
return slot;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+8
-1
@@ -1,8 +1,10 @@
|
||||
package com.lishid.openinv.internal.v1_21_R3.container.slot;
|
||||
|
||||
import net.minecraft.network.protocol.game.ClientboundContainerSetSlotPacket;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.Container;
|
||||
import net.minecraft.world.entity.EquipmentSlot;
|
||||
import net.minecraft.world.inventory.InventoryMenu;
|
||||
import net.minecraft.world.inventory.Slot;
|
||||
import org.bukkit.event.inventory.InventoryType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -37,7 +39,12 @@ public class ContentOffHand extends ContentEquipment {
|
||||
if (holder.connection != null
|
||||
&& !holder.connection.isDisconnected()
|
||||
&& holder.containerMenu != holder.inventoryMenu) {
|
||||
holder.resendItemInHands();
|
||||
holder.connection.send(
|
||||
new ClientboundContainerSetSlotPacket(
|
||||
holder.inventoryMenu.containerId,
|
||||
holder.inventoryMenu.incrementStateId(),
|
||||
InventoryMenu.SHIELD_SLOT,
|
||||
holder.getOffhandItem()));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
+3
-3
@@ -21,7 +21,7 @@
|
||||
<parent>
|
||||
<artifactId>openinvparent</artifactId>
|
||||
<groupId>com.lishid</groupId>
|
||||
<version>5.1.5</version>
|
||||
<version>5.1.6</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvplugin</artifactId>
|
||||
@@ -47,13 +47,13 @@
|
||||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvadapter1_21_R3</artifactId>
|
||||
<version>5.1.5</version>
|
||||
<version>5.1.6</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvadapter1_21_R2</artifactId>
|
||||
<version>5.1.5</version>
|
||||
<version>5.1.6</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -256,7 +256,7 @@ public class OpenInv extends JavaPlugin implements IOpenInv {
|
||||
boolean viewOnly = edit != null && !edit.hasPermission(player);
|
||||
|
||||
if (ownContainer || viewOnly && config.getAccessEqualMode() != AccessEqualMode.DENY) {
|
||||
this.accessor.openInventory(player, inventory, viewOnly);
|
||||
return this.accessor.openInventory(player, inventory, viewOnly);
|
||||
}
|
||||
|
||||
for (int level = 4; level > 0; --level) {
|
||||
|
||||
Reference in new issue
Block a user