From 6f2e4c0cf31c53fef3bf142c8e6efabda858f17a Mon Sep 17 00:00:00 2001 From: MattBDev <4009945+MattBDev@users.noreply.github.com> Date: Tue, 11 May 2021 20:16:53 -0400 Subject: [PATCH] Simplify logic --- .../src/main/java/com/sk89q/util/yaml/YAMLNode.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/util/yaml/YAMLNode.java b/worldedit-core/src/main/java/com/sk89q/util/yaml/YAMLNode.java index 78171ef3a..6618549af 100644 --- a/worldedit-core/src/main/java/com/sk89q/util/yaml/YAMLNode.java +++ b/worldedit-core/src/main/java/com/sk89q/util/yaml/YAMLNode.java @@ -123,11 +123,7 @@ public class YAMLNode { @SuppressWarnings("unchecked") public Object getProperty(String path) { if (!path.contains(".")) { - Object val = root.get(path); - if (val == null) { - return null; - } - return val; + return root.get(path); } String[] parts = path.split("\\.");