Package dev.jorel.commandapi.wrappers
Class MockNativeProxyCommandSender
java.lang.Object
dev.jorel.commandapi.wrappers.MockNativeProxyCommandSender
- All Implemented Interfaces:
NativeProxyCommandSender,net.kyori.adventure.audience.Audience,net.kyori.adventure.audience.ForwardingAudience,net.kyori.adventure.audience.ForwardingAudience.Single,net.kyori.adventure.pointer.Pointered,org.bukkit.command.CommandSender,org.bukkit.command.ProxiedCommandSender,org.bukkit.permissions.Permissible,org.bukkit.permissions.ServerOperator
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.command.CommandSender
org.bukkit.command.CommandSender.SpigotNested classes/interfaces inherited from interface net.kyori.adventure.audience.ForwardingAudience
net.kyori.adventure.audience.ForwardingAudience.Single -
Constructor Summary
ConstructorsConstructorDescriptionMockNativeProxyCommandSender(org.bukkit.command.CommandSender caller, org.bukkit.command.CommandSender callee, org.bukkit.Location location, org.bukkit.World world) Constructs a NativeProxyCommandSender, which is basically Minecraft's CommandListenerWrapper -
Method Summary
Modifier and TypeMethodDescription@NotNull org.bukkit.permissions.PermissionAttachmentaddAttachment(@NotNull org.bukkit.plugin.Plugin plugin) @Nullable org.bukkit.permissions.PermissionAttachmentaddAttachment(@NotNull org.bukkit.plugin.Plugin plugin, int i) @NotNull org.bukkit.permissions.PermissionAttachmentaddAttachment(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull String s, boolean b) @Nullable org.bukkit.permissions.PermissionAttachmentaddAttachment(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull String s, boolean b, int i) @NotNull org.bukkit.command.CommandSender@NotNull org.bukkit.command.CommandSender@NotNull Set<org.bukkit.permissions.PermissionAttachmentInfo> org.bukkit.Location@NotNull StringgetName()@NotNull org.bukkit.Serverorg.bukkit.WorldgetWorld()booleanhasPermission(@NotNull String s) booleanhasPermission(@NotNull org.bukkit.permissions.Permission permission) booleanisOp()booleanisPermissionSet(@NotNull String s) booleanisPermissionSet(@NotNull org.bukkit.permissions.Permission permission) @NotNull net.kyori.adventure.text.Componentname()voidvoidremoveAttachment(@NotNull org.bukkit.permissions.PermissionAttachment permissionAttachment) voidsendMessage(@NotNull String s) voidsendMessage(@NotNull String... strings) voidsendMessage(@Nullable UUID uuid, @NotNull String s) voidsendMessage(@Nullable UUID uuid, @NotNull String... strings) voidsetOp(boolean b) @NotNull org.bukkit.command.CommandSender.Spigotspigot()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.kyori.adventure.audience.Audience
deleteMessage, openBook, removeResourcePacks, removeResourcePacks, removeResourcePacks, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendResourcePacks, sendResourcePacks, showTitle, stopSoundMethods inherited from interface org.bukkit.command.CommandSender
sendMessage, sendMessage, sendPlainMessage, sendRichMessage, sendRichMessageMethods inherited from interface net.kyori.adventure.audience.ForwardingAudience.Single
audiences, clearResourcePacks, clearTitle, closeDialog, deleteMessage, filterAudience, forEachAudience, get, getOrDefault, getOrDefaultFrom, hideBossBar, openBook, playSound, playSound, playSound, pointers, removeResourcePacks, removeResourcePacks, resetTitle, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendResourcePacks, sendTitlePart, showBossBar, showDialog, stopSoundMethods inherited from interface org.bukkit.permissions.Permissible
permissionValue, permissionValueMethods inherited from interface org.bukkit.command.ProxiedCommandSender
audience, sendMessage
-
Constructor Details
-
MockNativeProxyCommandSender
public MockNativeProxyCommandSender(org.bukkit.command.CommandSender caller, org.bukkit.command.CommandSender callee, org.bukkit.Location location, org.bukkit.World world) Constructs a NativeProxyCommandSender, which is basically Minecraft's CommandListenerWrapper- Parameters:
caller- the command sender that actually sent the commandcallee- the command sender that will be executing the commandlocation- the proxied location that the command will be run atworld- the proxied world that the command will be run in
-
-
Method Details
-
getLocation
public org.bukkit.Location getLocation()- Specified by:
getLocationin interfaceNativeProxyCommandSender
-
getWorld
public org.bukkit.World getWorld()- Specified by:
getWorldin interfaceNativeProxyCommandSender
-
getCaller
@NotNull public @NotNull org.bukkit.command.CommandSender getCaller()- Specified by:
getCallerin interfaceorg.bukkit.command.ProxiedCommandSender
-
getCallee
@NotNull public @NotNull org.bukkit.command.CommandSender getCallee()- Specified by:
getCalleein interfaceorg.bukkit.command.ProxiedCommandSender
-
sendMessage
- Specified by:
sendMessagein interfaceorg.bukkit.command.CommandSender
-
sendMessage
- Specified by:
sendMessagein interfaceorg.bukkit.command.CommandSender
-
sendMessage
-
sendMessage
-
getServer
@NotNull public @NotNull org.bukkit.Server getServer()- Specified by:
getServerin interfaceorg.bukkit.command.CommandSender
-
getName
- Specified by:
getNamein interfaceorg.bukkit.command.CommandSender
-
spigot
@NotNull public @NotNull org.bukkit.command.CommandSender.Spigot spigot()- Specified by:
spigotin interfaceorg.bukkit.command.CommandSender
-
name
@NotNull public @NotNull net.kyori.adventure.text.Component name()- Specified by:
namein interfaceorg.bukkit.command.CommandSender
-
isPermissionSet
- Specified by:
isPermissionSetin interfaceorg.bukkit.permissions.Permissible
-
isPermissionSet
public boolean isPermissionSet(@NotNull @NotNull org.bukkit.permissions.Permission permission) - Specified by:
isPermissionSetin interfaceorg.bukkit.permissions.Permissible
-
hasPermission
- Specified by:
hasPermissionin interfaceorg.bukkit.permissions.Permissible
-
hasPermission
public boolean hasPermission(@NotNull @NotNull org.bukkit.permissions.Permission permission) - Specified by:
hasPermissionin interfaceorg.bukkit.permissions.Permissible
-
addAttachment
@NotNull public @NotNull org.bukkit.permissions.PermissionAttachment addAttachment(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull String s, boolean b) - Specified by:
addAttachmentin interfaceorg.bukkit.permissions.Permissible
-
addAttachment
@NotNull public @NotNull org.bukkit.permissions.PermissionAttachment addAttachment(@NotNull @NotNull org.bukkit.plugin.Plugin plugin) - Specified by:
addAttachmentin interfaceorg.bukkit.permissions.Permissible
-
addAttachment
@Nullable public @Nullable org.bukkit.permissions.PermissionAttachment addAttachment(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull String s, boolean b, int i) - Specified by:
addAttachmentin interfaceorg.bukkit.permissions.Permissible
-
addAttachment
@Nullable public @Nullable org.bukkit.permissions.PermissionAttachment addAttachment(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, int i) - Specified by:
addAttachmentin interfaceorg.bukkit.permissions.Permissible
-
removeAttachment
public void removeAttachment(@NotNull @NotNull org.bukkit.permissions.PermissionAttachment permissionAttachment) - Specified by:
removeAttachmentin interfaceorg.bukkit.permissions.Permissible
-
recalculatePermissions
public void recalculatePermissions()- Specified by:
recalculatePermissionsin interfaceorg.bukkit.permissions.Permissible
-
getEffectivePermissions
@NotNull public @NotNull Set<org.bukkit.permissions.PermissionAttachmentInfo> getEffectivePermissions()- Specified by:
getEffectivePermissionsin interfaceorg.bukkit.permissions.Permissible
-
isOp
public boolean isOp()- Specified by:
isOpin interfaceorg.bukkit.permissions.ServerOperator
-
setOp
public void setOp(boolean b) - Specified by:
setOpin interfaceorg.bukkit.permissions.ServerOperator
-