SteamWar/SpigotCore
Archiviert
13
0

Rebuild
Einige Prüfungen sind fehlgeschlagen
SteamWarCI Build failed

Dieser Commit ist enthalten in:
yoyosource 2022-05-30 14:55:47 +02:00
Ursprung a5f7525a1a
Commit ae41cc38ca

Datei anzeigen

@ -20,6 +20,9 @@
package de.steamwar.core; package de.steamwar.core;
import com.comphenix.tinyprotocol.TinyProtocol; import com.comphenix.tinyprotocol.TinyProtocol;
import de.steamwar.command.SWCommandUtils;
import de.steamwar.command.SWTypeMapperCreator;
import de.steamwar.command.TypeMapper;
import de.steamwar.comms.BungeeReceiver; import de.steamwar.comms.BungeeReceiver;
import de.steamwar.core.authlib.AuthlibInjector; import de.steamwar.core.authlib.AuthlibInjector;
import de.steamwar.core.events.ChattingEvent; import de.steamwar.core.events.ChattingEvent;
@ -28,12 +31,14 @@ import de.steamwar.core.events.WorldLoadEvent;
import de.steamwar.message.Message; import de.steamwar.message.Message;
import de.steamwar.sql.Statement; import de.steamwar.sql.Statement;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.util.Collection;
import java.util.logging.Level; import java.util.logging.Level;
@ -93,6 +98,18 @@ public class Core extends JavaPlugin{
@Override @Override
public void onEnable() { public void onEnable() {
SWCommandUtils.init((SWTypeMapperCreator<TypeMapper<Object>, CommandSender, Object>) (mapper, tabCompleter) -> new TypeMapper<Object>() {
@Override
public Object map(CommandSender commandSender, String[] previousArguments, String s) {
return mapper.apply(s);
}
@Override
public Collection<String> tabCompletes(CommandSender sender, String[] previousArguments, String s) {
return tabCompleter.apply(sender, s);
}
});
setSqlConfig(); setSqlConfig();
errorHandler = new ErrorHandler(); errorHandler = new ErrorHandler();
if(VERSION > 15) if(VERSION > 15)