geforkt von Mirrors/Paper
Rebuild our patches for upstream changes
Dieser Commit ist enthalten in:
Ursprung
1e81634a9d
Commit
436c6f2449
@ -1,41 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Howaner <franzi.moos@googlemail.com>
|
||||
Date: Sat, 3 Jan 2015 18:25:24 -0600
|
||||
Subject: [PATCH] Fix kick messages
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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, IUpdatePlayerList
|
||||
// CraftBukkit end
|
||||
ChatComponentText chatcomponenttext = new ChatComponentText(s);
|
||||
|
||||
- this.a(chatcomponenttext); // CraftBukkit - fire quit instantly
|
||||
this.networkManager.a(new PacketPlayOutKickDisconnect(chatcomponenttext), new PlayerConnectionFuture(this, chatcomponenttext), new GenericFutureListener[0]);
|
||||
+ this.a(chatcomponenttext); // CraftBukkit - fire quit instantly // PaperSpigot - Moved down
|
||||
this.networkManager.k();
|
||||
this.minecraftServer.postToMainThread(new PlayerConnectionDisconnector(this)); // CraftBukkit - Don't wait
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void v() {
|
||||
- for (int i = 0; i < this.players.size(); ++i) {
|
||||
- ((EntityPlayer) this.players.get(i)).playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message
|
||||
+ // PaperSpigot start - for -> while
|
||||
+ while (!this.players.isEmpty()) {
|
||||
+ ((EntityPlayer) this.players.get(0)).playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message
|
||||
}
|
||||
+ // PaperSpigot end
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
@ -655,7 +655,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
@ -687,4 +686,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
|
||||
static void readConfig(Class<?> clazz, Object instance)
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
@ -400,89 +400,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/Slot.java b/src/main/java/net/minecraft/server/Slot.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/Slot.java
|
||||
@@ -0,0 +0,0 @@
|
||||
+package net.minecraft.server;
|
||||
+
|
||||
+public class Slot {
|
||||
+
|
||||
+ public final int index;
|
||||
+ public final IInventory inventory;
|
||||
+ public int rawSlotIndex;
|
||||
+ public int f;
|
||||
+ public int g;
|
||||
+
|
||||
+ public Slot(IInventory iinventory, int i, int j, int k) {
|
||||
+ this.inventory = iinventory;
|
||||
+ this.index = i;
|
||||
+ this.f = j;
|
||||
+ this.g = k;
|
||||
+ }
|
||||
+
|
||||
+ public void a(ItemStack itemstack, ItemStack itemstack1) {
|
||||
+ if (itemstack != null && itemstack1 != null) {
|
||||
+ if (itemstack.getItem() == itemstack1.getItem()) {
|
||||
+ int i = itemstack1.count - itemstack.count;
|
||||
+
|
||||
+ if (i > 0) {
|
||||
+ this.a(itemstack, i);
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ protected void a(ItemStack itemstack, int i) {}
|
||||
+
|
||||
+ protected void c(ItemStack itemstack) {}
|
||||
+
|
||||
+ public void a(EntityHuman entityhuman, ItemStack itemstack) {
|
||||
+ this.f();
|
||||
+ }
|
||||
+
|
||||
+ public boolean isAllowed(ItemStack itemstack) {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ public ItemStack getItem() {
|
||||
+ return this.inventory.getItem(this.index);
|
||||
+ }
|
||||
+
|
||||
+ public boolean hasItem() {
|
||||
+ return this.getItem() != null;
|
||||
+ }
|
||||
+
|
||||
+ public void set(ItemStack itemstack) {
|
||||
+ this.inventory.setItem(this.index, itemstack);
|
||||
+ this.f();
|
||||
+ }
|
||||
+
|
||||
+ public void f() {
|
||||
+ this.inventory.update();
|
||||
+ }
|
||||
+
|
||||
+ public int getMaxStackSize() {
|
||||
+ return this.inventory.getMaxStackSize();
|
||||
+ }
|
||||
+
|
||||
+ public int getMaxStackSize(ItemStack itemstack) {
|
||||
+ return this.getMaxStackSize();
|
||||
+ }
|
||||
+
|
||||
+ public ItemStack a(int i) {
|
||||
+ return this.inventory.splitStack(this.index, i);
|
||||
+ }
|
||||
+
|
||||
+ public boolean a(IInventory iinventory, int i) {
|
||||
+ return iinventory == this.inventory && i == this.index;
|
||||
+ }
|
||||
+
|
||||
+ public boolean isAllowed(EntityHuman entityhuman) {
|
||||
+ return true;
|
||||
+ }
|
||||
+}
|
||||
--
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren