From 52fdb132730c0dce406af0131898cabe69c3c3d4 Mon Sep 17 00:00:00 2001 From: virustotalop Date: Fri, 31 Jul 2020 23:00:22 -0700 Subject: [PATCH] Allow getting by any class type --- .../java/com/clubobsidian/wrappy/ConfigurationSection.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/clubobsidian/wrappy/ConfigurationSection.java b/src/main/java/com/clubobsidian/wrappy/ConfigurationSection.java index 1fa536b..7e7b636 100644 --- a/src/main/java/com/clubobsidian/wrappy/ConfigurationSection.java +++ b/src/main/java/com/clubobsidian/wrappy/ConfigurationSection.java @@ -53,7 +53,11 @@ public ConfigurationNode getNode() { } public Object get(String path) { - return NodeUtil.parsePath(this.node, path).getValue(); + return this.get(path, Object.class); + } + + public T get(String path, Class clazz) { + return new NodeHelper(this.node).get(path, clazz); } public String getString(String path) {