make set property private on ArmorStandVehicleEntity
This commit is contained in:
parent
7fbe42e207
commit
f8d5700b9a
1 changed files with 9 additions and 5 deletions
|
@ -21,9 +21,9 @@ public class ArmorStandVehicleEntity implements PropertyHolder {
|
|||
private final Map<EntityPropertyImpl<?>, Object> propertyMap = new HashMap<>();
|
||||
|
||||
public ArmorStandVehicleEntity(EntityPropertyRegistryImpl propertyRegistry) {
|
||||
setProperty(propertyRegistry.getByName("small", Boolean.class), true);
|
||||
setProperty(propertyRegistry.getByName("invisible", Boolean.class), true);
|
||||
setProperty(propertyRegistry.getByName("base_plate", Boolean.class), false);
|
||||
_setProperty(propertyRegistry.getByName("small", Boolean.class), true);
|
||||
_setProperty(propertyRegistry.getByName("invisible", Boolean.class), true);
|
||||
_setProperty(propertyRegistry.getByName("base_plate", Boolean.class), false);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
@ -37,14 +37,18 @@ public class ArmorStandVehicleEntity implements PropertyHolder {
|
|||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> void setProperty(EntityProperty<T> key, T value) {
|
||||
private <T> void _setProperty(EntityProperty<T> key, T value) {
|
||||
Object val = value;
|
||||
if (val instanceof ItemStack) val = SpigotConversionUtil.fromBukkitItemStack((ItemStack) val);
|
||||
|
||||
setProperty((EntityPropertyImpl<T>) key, (T) val);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> void setProperty(EntityProperty<T> key, T value) {
|
||||
throw new UnsupportedOperationException("Cannot set properties on armor stands");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setItemProperty(EntityProperty<?> key, ItemStack value) {
|
||||
throw new UnsupportedOperationException("Cannot set item properties on armor stands");
|
||||
|
|
Loading…
Reference in a new issue