mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-11-25 11:52:25 +00:00
Handle error properly
This commit is contained in:
parent
59152bbf30
commit
c58f39c8b2
@ -25,8 +25,9 @@ public class FakeArmorStandImpl extends FakeEntityImpl implements FakeArmorStand
|
||||
.newInstance(entityId, dataWatcher, true), receiver);
|
||||
}
|
||||
} catch (ReflectiveOperationException e) {
|
||||
// TODO Handle this properly
|
||||
throw new RuntimeException(e);
|
||||
debug.getLogger().severe("Could not set hologram data");
|
||||
debug.debug("Could not set armor stand data");
|
||||
debug.debug(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,8 +31,9 @@ public abstract class FakeEntityImpl implements FakeEntity {
|
||||
ReflectionUtils.sendPacket(debug, packetPlayOutEntityDestroyClass.getConstructor(int[].class).newInstance((Object) new int[]{entityId}), receiver);
|
||||
}
|
||||
} catch (ReflectiveOperationException e){
|
||||
// TODO Handle this properly
|
||||
throw new RuntimeException(e);
|
||||
debug.getLogger().severe("Could not remove hologram");
|
||||
debug.debug("Could not remove hologram");
|
||||
debug.debug(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -43,8 +43,9 @@ public class FakeItemImpl extends FakeEntityImpl implements FakeItem {
|
||||
ReflectionUtils.sendPacket(debug, packetPlayOutEntityMetadataClass.getConstructor(int.class, dataWatcherClass, boolean.class).newInstance(entityId, dataWatcher, true), receiver);
|
||||
}
|
||||
}catch (ReflectiveOperationException e){
|
||||
// TODO Handle this properly
|
||||
throw new RuntimeException(e);
|
||||
debug.getLogger().severe("Failed to send item's data!");
|
||||
debug.debug("Failed to send item's data!");
|
||||
debug.debug(e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,8 +63,9 @@ public class FakeItemImpl extends FakeEntityImpl implements FakeItem {
|
||||
ReflectionUtils.sendPacket(debug, velocityPacket, receiver);
|
||||
}
|
||||
}catch (ReflectiveOperationException e){
|
||||
// TODO Handle this properly
|
||||
throw new RuntimeException(e);
|
||||
debug.getLogger().severe("Failed to reset item's velocity!");
|
||||
debug.debug("Failed to reset item's velocity!");
|
||||
debug.debug(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user