From 3d5ae1986359e60357b768ff643d59ac650a955f Mon Sep 17 00:00:00 2001 From: yoyosource Date: Fri, 12 Mar 2021 17:26:39 +0100 Subject: [PATCH] Add SWCommandUtils.addMapper --- SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java b/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java index 3c33705..87d77d5 100644 --- a/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java +++ b/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java @@ -131,4 +131,9 @@ class SWCommandUtils { } } + public static void addMapper(Class clazz, Function mapper) { + if (MAPPER_FUNCTIONS.containsKey(clazz)) return; + MAPPER_FUNCTIONS.put(clazz, mapper); + } + }