geforkt von Mirrors/Paper
Ignore spurious slot IDs sent by client, e.g. in enchanting tables
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
022955b377
Commit
1c116bb13c
@ -210,7 +210,9 @@ public abstract class InventoryView {
|
||||
* @return corresponding inventory, or null
|
||||
*/
|
||||
public final Inventory getInventory(int rawSlot) {
|
||||
if (rawSlot == OUTSIDE) {
|
||||
// Slot may be -1 if not properly detected due to client bug
|
||||
// e.g. dropping an item into part of the enchantment list section of an enchanting table
|
||||
if (rawSlot == OUTSIDE || rawSlot == -1) {
|
||||
return null;
|
||||
}
|
||||
Preconditions.checkArgument(rawSlot >= 0, "Negative, non outside slot %s", rawSlot);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren