@@ -0,0 +1,1253 @@
+package io.github.Cnly.Crafter.Crafter.utils;%0A%0Aimport java.lang.reflect.InvocationTargetException;%0Aimport java.lang.reflect.Method;%0Aimport java.util.Arrays;%0Aimport java.util.Collection;%0A%0Aimport org.bukkit.Bukkit;%0Aimport org.bukkit.entity.Player;%0A%0Apublic class CompatUtils%0A%7B%0A    %0A    @SuppressWarnings(%22unchecked%22)%0A    public static Collection%3CPlayer%3E getOnlinePlayers()%0A    %7B%0A        %0A        Method m;%0A        Object obj = null;%0A        try%0A        %7B%0A            m = Bukkit.class.getMethod(%22getOnlinePlayers%22);%0A            obj = m.invoke(null, (Object%5B%5D)null);%0A        %7D%0A        catch (NoSuchMethodException %7C SecurityException%0A                %7C IllegalAccessException %7C IllegalArgumentException%0A                %7C InvocationTargetException e)%0A        %7B%0A            throw new RuntimeException(%0A                    %22Cannot invoke Bukkit.getOnlinePlayers()%22, e);%0A        %7D%0A        %0A        if (obj instanceof Player%5B%5D)%0A        %7B%0A            return Arrays.asList((Player%5B%5D)obj);%0A        %7D%0A        else if (obj instanceof Collection)%0A        %7B%0A            return (Collection%3CPlayer%3E)obj;%0A        %7D%0A        else%0A        %7B%0A            throw new RuntimeException(%0A                    %22Unknown getOnlinePlayers() return type!%22);%0A        %7D%0A        %0A    %7D%0A    %0A%7D%0A

Add a getOnlinePlayers() that support both old and new ones