SteamWar/SpigotCore
Archiviert
13
0

Rebuild to new linkage system

Dieser Commit ist enthalten in:
yoyosource 2022-09-24 13:43:42 +02:00
Ursprung 293b5b9e4a
Commit 3e1fb10abc
8 geänderte Dateien mit 8 neuen und 25 gelöschten Zeilen

Datei anzeigen

@ -20,13 +20,12 @@
package de.steamwar.command;
import de.steamwar.linkage.Linked;
import de.steamwar.linkage.types.ListenerLink;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
@Linked(ListenerLink.class)
@Linked
public class CaseInsensitiveCommandsListener implements Listener {
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)

Datei anzeigen

@ -21,15 +21,7 @@ package de.steamwar.core;
import com.comphenix.tinyprotocol.TinyProtocol;
import de.steamwar.command.*;
import de.steamwar.core.authlib.AuthlibInjector;
import de.steamwar.core.events.ChattingEvent;
import de.steamwar.core.events.PartialChunkFixer;
import de.steamwar.core.events.PlayerJoinedEvent;
import de.steamwar.core.events.WorldLoadEvent;
import de.steamwar.linkage.types.EnableLink;
import de.steamwar.linkage.types.Plain;
import de.steamwar.spigotcore.linkage.LinkageUtils;
import de.steamwar.linkage.types.ListenerLink;
import de.steamwar.message.Message;
import de.steamwar.network.NetworkReceiver;
import de.steamwar.sql.Statement;
@ -124,7 +116,7 @@ public class Core extends JavaPlugin{
getServer().getMessenger().registerOutgoingPluginChannel(this, "sw:bridge");
TinyProtocol.init();
LinkageUtils.run(ListenerLink.class, EnableLink.class, Plain.class);
LinkageUtils.link();
try {
getLogger().log(Level.INFO, "Running on: " + new BufferedReader(new InputStreamReader(Runtime.getRuntime().exec("hostname").getInputStream())).readLine());

Datei anzeigen

@ -25,9 +25,8 @@ import com.mojang.authlib.yggdrasil.YggdrasilGameProfileRepository;
import de.steamwar.linkage.Linked;
import de.steamwar.linkage.MaxVersion;
import de.steamwar.linkage.api.Enable;
import de.steamwar.linkage.types.EnableLink;
@Linked(EnableLink.class)
@Linked
@MaxVersion(18)
public class AuthlibInjector implements Enable {

Datei anzeigen

@ -21,13 +21,12 @@ package de.steamwar.core.events;
import de.steamwar.core.Core;
import de.steamwar.linkage.Linked;
import de.steamwar.linkage.types.ListenerLink;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.AsyncPlayerChatEvent;
@Linked(ListenerLink.class)
@Linked
public class ChattingEvent implements Listener {
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)

Datei anzeigen

@ -28,7 +28,6 @@ import de.steamwar.core.CraftbukkitWrapper;
import de.steamwar.linkage.Linked;
import de.steamwar.linkage.MaxVersion;
import de.steamwar.linkage.PluginCheck;
import de.steamwar.linkage.types.Plain;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
@ -39,7 +38,7 @@ import java.util.List;
* TinyProtocol can't translate BlockEntities during 1.16 to 1.17 conversions du to removed partial chunk update support. This class cancels PartialChunkUpdates for this players and sends them a complete chunk instead.
* This class can only be loaded on 1.9 to 1.15 with active ViaVersion.
**/
@Linked(Plain.class)
@Linked
@MaxVersion(16)
@PluginCheck("ViaVersion")
public class PartialChunkFixer {

Datei anzeigen

@ -20,7 +20,6 @@
package de.steamwar.core.events;
import de.steamwar.linkage.Linked;
import de.steamwar.linkage.types.ListenerLink;
import de.steamwar.sql.SteamwarUser;
import de.steamwar.sql.UserGroup;
import org.bukkit.entity.Player;
@ -30,7 +29,7 @@ import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
@Linked(ListenerLink.class)
@Linked
public class PlayerJoinedEvent implements Listener{
@EventHandler

Datei anzeigen

@ -20,12 +20,11 @@
package de.steamwar.core.events;
import de.steamwar.linkage.Linked;
import de.steamwar.linkage.types.ListenerLink;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.world.WorldInitEvent;
@Linked(ListenerLink.class)
@Linked
public class WorldLoadEvent implements Listener {
@EventHandler

Datei anzeigen

@ -3,13 +3,10 @@ package de.steamwar.network.handlers;
import com.comphenix.tinyprotocol.Reflection;
import com.comphenix.tinyprotocol.TinyProtocol;
import de.steamwar.core.ChatWrapper;
import de.steamwar.core.CraftbukkitWrapper;
import de.steamwar.linkage.Linked;
import de.steamwar.linkage.MinVersion;
import de.steamwar.linkage.types.Plain;
import org.bukkit.entity.Player;
// @Linked(Plain.class)
// @Linked
@MinVersion(19)
public class ServerDataHandler {