Update BuildingComp.java

This commit is contained in:
Patrick 'Quezler' Mounier
2020-11-30 18:36:57 +01:00
committed by GitHub
parent e76dee8cbe
commit bbee3ae9cd

View File

@@ -929,7 +929,9 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
//null is of type void.class; anonymous classes use their superclass.
Class<?> type = value == null ? void.class : value.getClass().isAnonymousClass() || value.getClass().getSimpleName().startsWith("adapter") ? value.getClass().getSuperclass() : value.getClass();
if(value instanceof Item) type = Item.class;
if(value instanceof Block) type = Block.class;
if(value instanceof Liquid) type = Liquid.class;
if(builder != null && builder.isPlayer()){
lastAccessed = builder.getPlayer().name;