Remove compile time linkage in favour of class index

Optimize build time when no change happened for the BauSystem
This commit is contained in:
2024-08-06 13:48:29 +02:00
parent b4ff8726af
commit 412971af4d
52 changed files with 165 additions and 1602 deletions
@@ -23,13 +23,12 @@ import de.steamwar.bausystem.BauSystem;
import de.steamwar.bausystem.Permission;
import de.steamwar.bausystem.features.script.ScriptRunner;
import de.steamwar.linkage.Linked;
import de.steamwar.linkage.api.Plain;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.plugin.messaging.PluginMessageListener;
@Linked
public class HotkeyListener implements PluginMessageListener, Plain {
public class HotkeyListener implements PluginMessageListener {
{
Bukkit.getServer().getMessenger().registerIncomingPluginChannel(BauSystem.getInstance(), "sw:hotkeys", this);
@@ -37,7 +36,7 @@ public class HotkeyListener implements PluginMessageListener, Plain {
@Override
public void onPluginMessageReceived(String channel, Player player, byte[] message) {
if(!Permission.BUILD.hasPermission(player)) return;
if (!Permission.BUILD.hasPermission(player)) return;
if (!channel.equals("sw:hotkeys")) return;
if (message.length < 5) return;
int action = message[4] & 0xFF;