From fdb0773bb289f8dd16402227a59d1a3002b7a68b Mon Sep 17 00:00:00 2001 From: Brianna Date: Sat, 22 Jun 2019 17:54:46 -0400 Subject: [PATCH] Updated essentials support. --- .gitlab-ci.yml | 2 +- .../ultimatekits/conversion/hooks/EssentialsHook.java | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ed371b6..4f46bfd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ stages: variables: name: "UltimateKits" path: "/builds/$CI_PROJECT_PATH" - version: "2.3.11" + version: "2.3.12" build: stage: build diff --git a/src/main/java/com/songoda/ultimatekits/conversion/hooks/EssentialsHook.java b/src/main/java/com/songoda/ultimatekits/conversion/hooks/EssentialsHook.java index 9b9d43d..467cd64 100644 --- a/src/main/java/com/songoda/ultimatekits/conversion/hooks/EssentialsHook.java +++ b/src/main/java/com/songoda/ultimatekits/conversion/hooks/EssentialsHook.java @@ -57,6 +57,11 @@ public class EssentialsHook implements Hook { } public long getDelay(String kitName) { - return Integer.toUnsignedLong((int) essentials.getSettings().getKit(kitName).getOrDefault("delay", 0)); + Object object = essentials.getSettings().getKit(kitName).getOrDefault("delay", 0); + try { + return Integer.toUnsignedLong((int) object); + } catch (Exception e) { + return (long) object; + } } } \ No newline at end of file