mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-11-22 10:22:29 +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);
|
.newInstance(entityId, dataWatcher, true), receiver);
|
||||||
}
|
}
|
||||||
} catch (ReflectiveOperationException e) {
|
} catch (ReflectiveOperationException e) {
|
||||||
// TODO Handle this properly
|
debug.getLogger().severe("Could not set hologram data");
|
||||||
throw new RuntimeException(e);
|
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);
|
ReflectionUtils.sendPacket(debug, packetPlayOutEntityDestroyClass.getConstructor(int[].class).newInstance((Object) new int[]{entityId}), receiver);
|
||||||
}
|
}
|
||||||
} catch (ReflectiveOperationException e){
|
} catch (ReflectiveOperationException e){
|
||||||
// TODO Handle this properly
|
debug.getLogger().severe("Could not remove hologram");
|
||||||
throw new RuntimeException(e);
|
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);
|
ReflectionUtils.sendPacket(debug, packetPlayOutEntityMetadataClass.getConstructor(int.class, dataWatcherClass, boolean.class).newInstance(entityId, dataWatcher, true), receiver);
|
||||||
}
|
}
|
||||||
}catch (ReflectiveOperationException e){
|
}catch (ReflectiveOperationException e){
|
||||||
// TODO Handle this properly
|
debug.getLogger().severe("Failed to send item's data!");
|
||||||
throw new RuntimeException(e);
|
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);
|
ReflectionUtils.sendPacket(debug, velocityPacket, receiver);
|
||||||
}
|
}
|
||||||
}catch (ReflectiveOperationException e){
|
}catch (ReflectiveOperationException e){
|
||||||
// TODO Handle this properly
|
debug.getLogger().severe("Failed to reset item's velocity!");
|
||||||
throw new RuntimeException(e);
|
debug.debug("Failed to reset item's velocity!");
|
||||||
|
debug.debug(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user