ProfileWhitelistVerifyEvent

Fires when the server is validating if a player is whitelisted.

Allows you to do dynamic whitelisting and change of kick message
This commit is contained in:
Aikar
2017-07-27 23:39:31 -04:00
parent 60d5c10c1c
commit 8ff15ca2af
3 changed files with 199 additions and 1 deletions

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Fix Recipe Books
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 682211cdd..1fed465bf 100644
index 682211cdd..0f7e82d27 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -47,4 +47,26 @@ index 682211cdd..1fed465bf 100644
}
}
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
while (iterator.hasNext()) {
packetplayinautorecipe_a = (PacketPlayInAutoRecipe.a) iterator.next();
itemstack = this.player.inventory.getItem(packetplayinautorecipe_a.c);
- if (this.a(packetplayinautorecipe_a.a, itemstack)) {
+ if (this.a(packetplayinautorecipe_a.a, itemstack) && itemstack.getCount() >= packetplayinautorecipe_a.a.getCount()) { // Paper
i = packetplayinautorecipe_a.a.getCount();
if (itemstack.getCount() == i) {
this.player.inventory.splitWithoutUpdate(packetplayinautorecipe_a.c);
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
this.player.activeContainer.b(packetplayinautorecipe_a.b, packetplayinautorecipe_a.a);
}
+ // Paper start
+ else {
+ this.player.getBukkitEntity().updateInventory();
+ return;
+ }
+ // Paper end
}
}
--