From e24fb793b239adf7dc95a58511a2f0d196847df3 Mon Sep 17 00:00:00 2001 From: Ghost_chu <2908803755@qq.com> Date: Thu, 30 Jan 2020 09:55:06 +0800 Subject: [PATCH] Revert "Fixes bad config style" This reverts commit 23cf610c Former-commit-id: 5294d4fd3885499c15c9f7ea77dea05ad11c0a86 --- .../maxgamer/quickshop/Shop/DisplayItem.java | 56 +++++-------------- 1 file changed, 13 insertions(+), 43 deletions(-) diff --git a/src/main/java/org/maxgamer/quickshop/Shop/DisplayItem.java b/src/main/java/org/maxgamer/quickshop/Shop/DisplayItem.java index ac8682f74..dfa4d80e5 100644 --- a/src/main/java/org/maxgamer/quickshop/Shop/DisplayItem.java +++ b/src/main/java/org/maxgamer/quickshop/Shop/DisplayItem.java @@ -181,53 +181,27 @@ public interface DisplayItem { * @return Using displayType. */ static DisplayType getNowUsing(@Nullable ItemStack item) { - try { if (item != null) { /* * The below codes are massy like a shit (but not bad at function), need to cleanup * * Nest structure as: - * 1: - * small_: - * specific: - * type: DEBUG_STICK - * lore: - * - mysterious item - * - gift - * strict: true - * yaw: 180 - * pitch: 0 - * small: false - * item-slot: HELMET - * offset: - * x: 1 - * y: 0.1 - * z: -1.1 - * pose-head: - * x: 1 - * pose-body: - * y: 0.2 - * pose-arm: - * left: - * z: 0.5 - * pose-leg: - * left: - * x: 0.14 - * right: - * x: 0.3 - * y: 0.1 - * z: 0.3 - * small2: - * specific: + * - 0: + * - small_: + * type: DEBUG_STICK + * lore: + * - mysterious item + * - gift + * strict: true + * - small2: * type: * - GLASS * - GRASS * - GRASS_BLOCK - * 0: - * small: - * specific: - * type: BOW - * lore: common mark + * - 3: + * - small: + * type: BOW + * lore: common mark */ // type id such as 0, 1, 2, 3. List typeSections = @@ -265,7 +239,7 @@ public interface DisplayItem { Map infoSection = Map.class.cast(infoSectiont); Util.debugLog(infoSection.toString() + " @ LEVEL 4, " + infoSection.getClass().getName()); List type = Lists.newArrayList(); - boolean strictMeta = (boolean) infoSection.getOrDefault("strict", false); + boolean strictMeta = (boolean) infoSection.getOrDefault("strict-meta", false); String name = ""; List lore = Lists.newArrayList(); int customModelData = -1; @@ -354,10 +328,6 @@ public interface DisplayItem { } return DisplayType.fromID(QuickShop.instance.getConfig().getInt("shop.display-type")); - } catch (Throwable e) { - e.printStackTrace(); - return DisplayType.REALITEM; - } } /**