Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
SPIGOT-323: Enchanting tables can no longer be force opened.
Dieser Commit ist enthalten in:
Ursprung
07fcb493a9
Commit
9784338acf
@ -1,5 +1,6 @@
|
||||
package org.bukkit.craftbukkit.entity;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.server.*;
|
||||
@ -284,7 +285,15 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
return getHandle().activeContainer.getBukkitView();
|
||||
}
|
||||
|
||||
@Override
|
||||
public InventoryView openEnchanting(Location location) {
|
||||
return openEnchanting(location, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InventoryView openEnchanting(Location location, boolean force) {
|
||||
Preconditions.checkArgument(!force, "Cannot force open enchanting tables!");
|
||||
|
||||
if (!force) {
|
||||
Block block = location.getBlock();
|
||||
if (block.getType() != Material.ENCHANTMENT_TABLE) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren