2021-02-08 03:42:35 +01:00
|
|
|
package net.minestom.server.command;
|
|
|
|
|
2021-03-11 00:11:29 +01:00
|
|
|
import net.minestom.server.command.builder.CommandContext;
|
2021-03-01 16:58:00 +01:00
|
|
|
import net.kyori.adventure.audience.Audience;
|
2021-02-08 03:42:35 +01:00
|
|
|
import net.minestom.server.permission.Permission;
|
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
|
|
|
|
import java.util.Collections;
|
|
|
|
import java.util.HashSet;
|
|
|
|
import java.util.Set;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sender used in {@link CommandManager#executeServerCommand(String)}.
|
|
|
|
* <p>
|
2021-03-01 16:58:00 +01:00
|
|
|
* Although this class implemented {@link CommandSender} and thus {@link Audience}, no
|
|
|
|
* data can be sent to this sender because it's purpose is to process the data of
|
|
|
|
* {@link CommandContext#getReturnData()}.
|
2021-02-08 03:42:35 +01:00
|
|
|
*/
|
|
|
|
public class ServerSender implements CommandSender {
|
|
|
|
|
|
|
|
private final Set<Permission> permissions = Collections.unmodifiableSet(new HashSet<>());
|
|
|
|
|
|
|
|
@NotNull
|
|
|
|
@Override
|
|
|
|
public Set<Permission> getAllPermissions() {
|
|
|
|
return permissions;
|
|
|
|
}
|
|
|
|
}
|