Class PaperSimpleSenderMapper

java.lang.Object
org.incendo.cloud.paper.util.sender.PaperSimpleSenderMapper
All Implemented Interfaces:
SenderMapper<CommandSourceStack,Source>

public final class PaperSimpleSenderMapper extends Object implements SenderMapper<CommandSourceStack,Source>
A simple SenderMapper implementation designed for use with PaperCommandManager. Allows for easily utilizing cloud's Command.Builder.senderType(Class) utilities despite the single CommandSourceStack implementation provided by Paper/Minecraft.

The map(CommandSourceStack) implementation performs type dispatch based on the sender, for example it will create a PlayerSource when CommandSourceStack.getSender() is a Player, and similar for ConsoleSource and EntitySource. Any other specific sender types do not currently have special handling and will fall back to a generic Source implementation.