SPIGOT-4447: Clear error for people trying to set an item as a block
Dieser Commit ist enthalten in:
Ursprung
d6b57bd963
Commit
5184216f27
@ -124,6 +124,8 @@ public class CraftBlockState implements BlockState {
|
||||
|
||||
public void setType(final Material type) {
|
||||
Preconditions.checkArgument(type != null, "Material cannot be null");
|
||||
Preconditions.checkArgument(type.isBlock(), "Material must be a block!");
|
||||
|
||||
if (this.getType() != type) {
|
||||
this.data = CraftMagicNumbers.getBlock(type).getBlockData();
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren