mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-18 05:11:37 +01:00
Stop anvil guis from giving out input items
This commit is contained in:
parent
5dbc578fd2
commit
ddf5660c66
@ -865,6 +865,11 @@ public class NMSImpl implements NMSBridge {
|
|||||||
handle) {
|
handle) {
|
||||||
private CraftInventoryView bukkitEntity;
|
private CraftInventoryView bukkitEntity;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void a(EntityHuman entityhuman, net.minecraft.server.v1_12_R1.World world,
|
||||||
|
IInventory iinventory) {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void e() {
|
public void e() {
|
||||||
super.e();
|
super.e();
|
||||||
|
@ -900,6 +900,11 @@ public class NMSImpl implements NMSBridge {
|
|||||||
handle) {
|
handle) {
|
||||||
private CraftInventoryView bukkitEntity;
|
private CraftInventoryView bukkitEntity;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void a(EntityHuman entityhuman, net.minecraft.server.v1_13_R2.World world,
|
||||||
|
IInventory iinventory) {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void d() {
|
public void d() {
|
||||||
super.d();
|
super.d();
|
||||||
|
@ -969,6 +969,11 @@ public class NMSImpl implements NMSBridge {
|
|||||||
final ContainerAnvil container = new ContainerAnvil(handle.nextContainerCounter(), handle.inventory, access) {
|
final ContainerAnvil container = new ContainerAnvil(handle.nextContainerCounter(), handle.inventory, access) {
|
||||||
private CraftInventoryView bukkitEntity;
|
private CraftInventoryView bukkitEntity;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void a(EntityHuman entityhuman, net.minecraft.server.v1_14_R1.World world,
|
||||||
|
IInventory iinventory) {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void e() {
|
public void e() {
|
||||||
super.e();
|
super.e();
|
||||||
|
@ -981,6 +981,11 @@ public class NMSImpl implements NMSBridge {
|
|||||||
final ContainerAnvil container = new ContainerAnvil(handle.nextContainerCounter(), handle.inventory, access) {
|
final ContainerAnvil container = new ContainerAnvil(handle.nextContainerCounter(), handle.inventory, access) {
|
||||||
private CraftInventoryView bukkitEntity;
|
private CraftInventoryView bukkitEntity;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void a(EntityHuman entityhuman, net.minecraft.server.v1_15_R1.World world,
|
||||||
|
IInventory iinventory) {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void e() {
|
public void e() {
|
||||||
super.e();
|
super.e();
|
||||||
|
@ -1005,6 +1005,11 @@ public class NMSImpl implements NMSBridge {
|
|||||||
ContainerAccess.at(handle.world, new BlockPosition(0, 0, 0))) {
|
ContainerAccess.at(handle.world, new BlockPosition(0, 0, 0))) {
|
||||||
private CraftInventoryView bukkitEntity;
|
private CraftInventoryView bukkitEntity;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void a(EntityHuman entityhuman, net.minecraft.server.v1_16_R3.World world,
|
||||||
|
IInventory iinventory) {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void e() {
|
public void e() {
|
||||||
super.e();
|
super.e();
|
||||||
|
@ -1010,6 +1010,10 @@ public class NMSImpl implements NMSBridge {
|
|||||||
ContainerLevelAccess.create(handle.level, new BlockPos(0, 0, 0))) {
|
ContainerLevelAccess.create(handle.level, new BlockPos(0, 0, 0))) {
|
||||||
private CraftInventoryView bukkitEntity;
|
private CraftInventoryView bukkitEntity;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void clearContainer(net.minecraft.world.entity.player.Player entityhuman, Container iinventory) {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createResult() {
|
public void createResult() {
|
||||||
super.createResult();
|
super.createResult();
|
||||||
|
@ -1017,6 +1017,10 @@ public class NMSImpl implements NMSBridge {
|
|||||||
ContainerLevelAccess.create(handle.level, new BlockPos(0, 0, 0))) {
|
ContainerLevelAccess.create(handle.level, new BlockPos(0, 0, 0))) {
|
||||||
private CraftInventoryView bukkitEntity;
|
private CraftInventoryView bukkitEntity;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void clearContainer(net.minecraft.world.entity.player.Player entityhuman, Container iinventory) {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createResult() {
|
public void createResult() {
|
||||||
super.createResult();
|
super.createResult();
|
||||||
|
@ -1033,6 +1033,10 @@ public class NMSImpl implements NMSBridge {
|
|||||||
ContainerLevelAccess.create(handle.level, new BlockPos(0, 0, 0))) {
|
ContainerLevelAccess.create(handle.level, new BlockPos(0, 0, 0))) {
|
||||||
private CraftInventoryView bukkitEntity;
|
private CraftInventoryView bukkitEntity;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void clearContainer(net.minecraft.world.entity.player.Player entityhuman, Container iinventory) {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createResult() {
|
public void createResult() {
|
||||||
super.createResult();
|
super.createResult();
|
||||||
@ -1041,15 +1045,13 @@ public class NMSImpl implements NMSBridge {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftInventoryView getBukkitView() {
|
public CraftInventoryView getBukkitView() {
|
||||||
if (this.bukkitEntity != null) {
|
if (this.bukkitEntity == null) {
|
||||||
return this.bukkitEntity;
|
|
||||||
} else {
|
|
||||||
this.bukkitEntity = new CraftInventoryView(this.player.getBukkitEntity(),
|
this.bukkitEntity = new CraftInventoryView(this.player.getBukkitEntity(),
|
||||||
new CitizensInventoryAnvil(this.access.getLocation(), this.inputSlots, this.resultSlots,
|
new CitizensInventoryAnvil(this.access.getLocation(), this.inputSlots, this.resultSlots,
|
||||||
this, anvil),
|
this, anvil),
|
||||||
this);
|
this);
|
||||||
return this.bukkitEntity;
|
|
||||||
}
|
}
|
||||||
|
return this.bukkitEntity;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
container.getBukkitView().setItem(0, anvil.getItem(0));
|
container.getBukkitView().setItem(0, anvil.getItem(0));
|
||||||
|
Loading…
Reference in New Issue
Block a user