Catch all error and renew config-version(thanks to GhostChu)

Former-commit-id: b620819f66ea877b21dd8c7953d38aaa31deccc6
This commit is contained in:
sandtechnology committed 2020-03-21 09:43:44 +08:00
1 parent 4fcf3fff0f
commit 94a263ec97
3 files changed
+3 -3

No files matched your search

@@ -132,7 +132,7 @@ public class ContainerShop implements Shop {
case VIRTUALITEM:
try {
this.displayItem = new VirtualDisplayItem(this);
} catch (Exception e) {
} catch (Throwable e) {
Util.debugLog(e.getMessage());
Arrays.stream(e.getStackTrace()).forEach(ex -> Util.debugLog(ex.getClassName() + "#" + ex.getMethodName() + "#" + ex.getLineNumber()));
plugin.getConfig().set("shop.display-type", 0);
@@ -88,7 +88,7 @@ public class VirtualDisplayItem extends DisplayItem {
initFakeDropItemPacket();
}
private void initFakeDropItemPacket() throws RuntimeException {
private void initFakeDropItemPacket() {
//First, create a new packet to spawn item
fakeItemPacket = protocolManager.createPacket(PacketType.Play.Server.SPAWN_ENTITY);
+1 -1
View File
@@ -1,7 +1,7 @@
#This is example config, don't direct modify this file, all changes will revert when you reload the plugin.
#Do not touch if you not clear know about this
config-version: 90
config-version: 91
#Select the language you want to use, (e.g de), use only supported language codes from the list below.
#If you use a not exist/not support language, plugin will move to use en_US to keep everything working.