mirror of
https://github.com/lucko/LuckPerms.git
synced 2025-08-22 22:22:56 +02:00
Add workaround for Forge eventbus limitation
This commit is contained in:
@@ -37,6 +37,7 @@ import net.minecraft.commands.Commands;
|
||||
import net.minecraft.commands.arguments.EntityArgument;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraftforge.event.RegisterCommandsEvent;
|
||||
import net.minecraftforge.event.server.ServerStartedEvent;
|
||||
import net.minecraftforge.eventbus.api.listener.SubscribeEvent;
|
||||
|
||||
import java.util.List;
|
||||
@@ -65,6 +66,12 @@ public class ForgeCommandExecutor extends BrigadierCommandExecutor<CommandSource
|
||||
}
|
||||
}
|
||||
|
||||
// not used - workaround for the idiotic Forge limitation that requires listeners using the @SubscribeEvent annotation to have at least two listener methods
|
||||
@SubscribeEvent
|
||||
public void onServerStarted(ServerStartedEvent event) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Sender getSender(CommandSourceStack source) {
|
||||
return this.plugin.getSenderFactory().wrap(source);
|
||||
|
Reference in New Issue
Block a user