mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-25 20:25:19 +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) {
|
||||
private CraftInventoryView bukkitEntity;
|
||||
|
||||
@Override
|
||||
protected void a(EntityHuman entityhuman, net.minecraft.server.v1_12_R1.World world,
|
||||
IInventory iinventory) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e() {
|
||||
super.e();
|
||||
|
@ -900,6 +900,11 @@ public class NMSImpl implements NMSBridge {
|
||||
handle) {
|
||||
private CraftInventoryView bukkitEntity;
|
||||
|
||||
@Override
|
||||
protected void a(EntityHuman entityhuman, net.minecraft.server.v1_13_R2.World world,
|
||||
IInventory iinventory) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void d() {
|
||||
super.d();
|
||||
|
@ -969,6 +969,11 @@ public class NMSImpl implements NMSBridge {
|
||||
final ContainerAnvil container = new ContainerAnvil(handle.nextContainerCounter(), handle.inventory, access) {
|
||||
private CraftInventoryView bukkitEntity;
|
||||
|
||||
@Override
|
||||
protected void a(EntityHuman entityhuman, net.minecraft.server.v1_14_R1.World world,
|
||||
IInventory iinventory) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e() {
|
||||
super.e();
|
||||
|
@ -981,6 +981,11 @@ public class NMSImpl implements NMSBridge {
|
||||
final ContainerAnvil container = new ContainerAnvil(handle.nextContainerCounter(), handle.inventory, access) {
|
||||
private CraftInventoryView bukkitEntity;
|
||||
|
||||
@Override
|
||||
protected void a(EntityHuman entityhuman, net.minecraft.server.v1_15_R1.World world,
|
||||
IInventory iinventory) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e() {
|
||||
super.e();
|
||||
|
@ -1005,6 +1005,11 @@ public class NMSImpl implements NMSBridge {
|
||||
ContainerAccess.at(handle.world, new BlockPosition(0, 0, 0))) {
|
||||
private CraftInventoryView bukkitEntity;
|
||||
|
||||
@Override
|
||||
protected void a(EntityHuman entityhuman, net.minecraft.server.v1_16_R3.World world,
|
||||
IInventory iinventory) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e() {
|
||||
super.e();
|
||||
|
@ -1010,6 +1010,10 @@ public class NMSImpl implements NMSBridge {
|
||||
ContainerLevelAccess.create(handle.level, new BlockPos(0, 0, 0))) {
|
||||
private CraftInventoryView bukkitEntity;
|
||||
|
||||
@Override
|
||||
protected void clearContainer(net.minecraft.world.entity.player.Player entityhuman, Container iinventory) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createResult() {
|
||||
super.createResult();
|
||||
|
@ -1017,6 +1017,10 @@ public class NMSImpl implements NMSBridge {
|
||||
ContainerLevelAccess.create(handle.level, new BlockPos(0, 0, 0))) {
|
||||
private CraftInventoryView bukkitEntity;
|
||||
|
||||
@Override
|
||||
protected void clearContainer(net.minecraft.world.entity.player.Player entityhuman, Container iinventory) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createResult() {
|
||||
super.createResult();
|
||||
|
@ -1033,6 +1033,10 @@ public class NMSImpl implements NMSBridge {
|
||||
ContainerLevelAccess.create(handle.level, new BlockPos(0, 0, 0))) {
|
||||
private CraftInventoryView bukkitEntity;
|
||||
|
||||
@Override
|
||||
protected void clearContainer(net.minecraft.world.entity.player.Player entityhuman, Container iinventory) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createResult() {
|
||||
super.createResult();
|
||||
@ -1041,15 +1045,13 @@ public class NMSImpl implements NMSBridge {
|
||||
|
||||
@Override
|
||||
public CraftInventoryView getBukkitView() {
|
||||
if (this.bukkitEntity != null) {
|
||||
return this.bukkitEntity;
|
||||
} else {
|
||||
if (this.bukkitEntity == null) {
|
||||
this.bukkitEntity = new CraftInventoryView(this.player.getBukkitEntity(),
|
||||
new CitizensInventoryAnvil(this.access.getLocation(), this.inputSlots, this.resultSlots,
|
||||
this, anvil),
|
||||
this);
|
||||
return this.bukkitEntity;
|
||||
}
|
||||
return this.bukkitEntity;
|
||||
}
|
||||
};
|
||||
container.getBukkitView().setItem(0, anvil.getItem(0));
|
||||
|
Loading…
Reference in New Issue
Block a user