Package dev.jorel.commandapi.nms
Class NMS_1_17_Common
java.lang.Object
dev.jorel.commandapi.nms.NMS_Common
dev.jorel.commandapi.nms.NMS_1_17_Common
- All Implemented Interfaces:
NMS<net.minecraft.commands.CommandSourceStack>
NMS implementation for Minecraft 1.17 and 1.17.1
SpecialSource compiles MinecraftServer.resources (used in reloadDataPacks)
to two different fields (aC or aB) for 1.17 and 1.17.1 respectively. This
common implementation is built those two ways by the corresponding modules.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final net.minecraft.server.MinecraftServer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>_ArgumentEntity(EntitySelector selector) com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>voidaddToHelpMap(Map<String, org.bukkit.help.HelpTopic> helpTopicsToAdd) abstract String[]convert(ParticleData<?> particle) convert(org.bukkit.inventory.ItemStack is) voidcreateDispatcherFile(File file, com.mojang.brigadier.CommandDispatcher<net.minecraft.commands.CommandSourceStack> dispatcher) org.bukkit.help.HelpTopicgenerateHelpTopic(String commandName, String shortDescription, String fullDescription, String permission) net.kyori.adventure.text.ComponentgetAdventureChatComponent(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) org.bukkit.block.BiomegetBiome(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) Predicate<org.bukkit.block.Block>getBlockPredicate(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) org.bukkit.block.data.BlockDatagetBlockState(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) com.mojang.brigadier.CommandDispatcher<net.minecraft.commands.CommandSourceStack>net.minecraft.commands.CommandSourceStackgetCLWFromCommandSender(org.bukkit.command.CommandSender sender) getEntitySelector(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String str, EntitySelector selector) org.bukkit.entity.EntityTypegetEntityType(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String str) getFunction(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String str) org.bukkit.inventory.ItemStackgetItemStack(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String str) Predicate<org.bukkit.inventory.ItemStack>getItemStackPredicate(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) getLocation2DBlock(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) getLocation2DPrecise(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) org.bukkit.LocationgetLocationBlock(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String str) org.bukkit.LocationgetLocationPrecise(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String str) org.bukkit.loot.LootTablegetLootTable(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String str) org.bukkit.NamespacedKeygetMinecraftKey(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) net.minecraft.server.MinecraftServerParticleData<?>getParticle(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String str) org.bukkit.command.CommandSendergetSenderForCommand(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, boolean isNative) org.bukkit.command.SimpleCommandMaporg.bukkit.SoundgetSound(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) getTag(org.bukkit.NamespacedKey key) org.bukkit.WorldgetWorldForCSS(net.minecraft.commands.CommandSourceStack css) booleanisVanillaCommandWrapper(org.bukkit.command.Command command) abstract voidvoidresendPackets(org.bukkit.entity.Player player) Methods inherited from class dev.jorel.commandapi.nms.NMS_Common
_ArgumentAngle, _ArgumentAxis, _ArgumentChat, _ArgumentChatComponent, _ArgumentChatFormat, _ArgumentDimension, _ArgumentEnchantment, _ArgumentEntitySummon, _ArgumentFloatRange, _ArgumentIntRange, _ArgumentMathOperation, _ArgumentMinecraftKeyRegistered, _ArgumentMobEffect, _ArgumentNBTCompound, _ArgumentParticle, _ArgumentPosition, _ArgumentPosition2D, _ArgumentProfile, _ArgumentRotation, _ArgumentScoreboardCriteria, _ArgumentScoreboardObjective, _ArgumentScoreboardSlot, _ArgumentScoreboardTeam, _ArgumentScoreholder, _ArgumentTag, _ArgumentTime, _ArgumentUUID, _ArgumentVec2, _ArgumentVec3, convert, convert, getAdvancement, getAdventureChat, getAngle, getAxis, getChat, getChatColor, getChatComponent, getCommandSenderFromCSS, getDimension, getEnchantment, getFloatRange, getFunction, getFunctions, getIntRange, getMathOperation, getNBTCompound, getObjective, getObjectiveCriteria, getOfflinePlayer, getPlayer, getPotionEffect, getRecipe, getRotation, getScoreboardSlot, getScoreHolderMultiple, getScoreHolderSingle, getSuggestionProvider, getTags, getTeam, getTime, getUUIDMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.jorel.commandapi.nms.NMS
canUseChatPreview, hookChatPreview, unhookChatPreview
-
Field Details
-
MINECRAFT_SERVER
protected static final net.minecraft.server.MinecraftServer MINECRAFT_SERVER
-
-
Constructor Details
-
NMS_1_17_Common
public NMS_1_17_Common()
-
-
Method Details
-
_ArgumentBlockPredicate
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentBlockPredicate()- Specified by:
_ArgumentBlockPredicatein interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
_ArgumentBlockPredicatein classNMS_Common
-
_ArgumentBlockState
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentBlockState()- Specified by:
_ArgumentBlockStatein interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
_ArgumentBlockStatein classNMS_Common
-
_ArgumentEntity
- Specified by:
_ArgumentEntityin interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
_ArgumentEntityin classNMS_Common
-
_ArgumentItemPredicate
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentItemPredicate()- Specified by:
_ArgumentItemPredicatein interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
_ArgumentItemPredicatein classNMS_Common
-
_ArgumentItemStack
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentItemStack()- Specified by:
_ArgumentItemStackin interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
_ArgumentItemStackin classNMS_Common
-
_ArgumentSyntheticBiome
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentSyntheticBiome()- Specified by:
_ArgumentSyntheticBiomein interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
_ArgumentSyntheticBiomein classNMS_Common
-
addToHelpMap
- Specified by:
addToHelpMapin interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
addToHelpMapin classNMS_Common
-
compatibleVersions
- Specified by:
compatibleVersionsin interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
compatibleVersionsin classNMS_Common
-
convert
- Specified by:
convertin interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
convertin classNMS_Common
-
convert
- Specified by:
convertin interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
convertin classNMS_Common
-
createDispatcherFile
public void createDispatcherFile(File file, com.mojang.brigadier.CommandDispatcher<net.minecraft.commands.CommandSourceStack> dispatcher) throws IOException - Specified by:
createDispatcherFilein interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
createDispatcherFilein classNMS_Common- Throws:
IOException
-
generateHelpTopic
public org.bukkit.help.HelpTopic generateHelpTopic(String commandName, String shortDescription, String fullDescription, String permission) - Specified by:
generateHelpTopicin interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
generateHelpTopicin classNMS_Common
-
getAdventureChatComponent
public net.kyori.adventure.text.Component getAdventureChatComponent(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) - Specified by:
getAdventureChatComponentin interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
getAdventureChatComponentin classNMS_Common
-
getBiome
public org.bukkit.block.Biome getBiome(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) - Specified by:
getBiomein interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
getBiomein classNMS_Common
-
getBlockPredicate
public Predicate<org.bukkit.block.Block> getBlockPredicate(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
getBlockPredicatein interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
getBlockPredicatein classNMS_Common- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getBlockState
public org.bukkit.block.data.BlockData getBlockState(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) - Specified by:
getBlockStatein interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
getBlockStatein classNMS_Common
-
getBrigadierDispatcher
public com.mojang.brigadier.CommandDispatcher<net.minecraft.commands.CommandSourceStack> getBrigadierDispatcher()- Specified by:
getBrigadierDispatcherin interfaceNMS<net.minecraft.commands.CommandSourceStack>- Overrides:
getBrigadierDispatcherin classNMS_Common
-
getCLWFromCommandSender
public net.minecraft.commands.CommandSourceStack getCLWFromCommandSender(org.bukkit.command.CommandSender sender) - Specified by:
getCLWFromCommandSenderin interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
getCLWFromCommandSenderin classNMS_Common
-
getEntitySelector
public Object getEntitySelector(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String str, EntitySelector selector) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
getEntitySelectorin interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
getEntitySelectorin classNMS_Common- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getEntityType
public org.bukkit.entity.EntityType getEntityType(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String str) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
getEntityTypein interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
getEntityTypein classNMS_Common- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getFunction
public FunctionWrapper[] getFunction(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String str) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
getFunctionin interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
getFunctionin classNMS_Common- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getItemStack
public org.bukkit.inventory.ItemStack getItemStack(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String str) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
getItemStackin interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
getItemStackin classNMS_Common- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getItemStackPredicate
public Predicate<org.bukkit.inventory.ItemStack> getItemStackPredicate(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
getItemStackPredicatein interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
getItemStackPredicatein classNMS_Common- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getLocation2DBlock
public Location2D getLocation2DBlock(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
getLocation2DBlockin interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
getLocation2DBlockin classNMS_Common- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getLocation2DPrecise
public Location2D getLocation2DPrecise(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
getLocation2DPrecisein interfaceNMS<net.minecraft.commands.CommandSourceStack>- Overrides:
getLocation2DPrecisein classNMS_Common- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getLocationBlock
public org.bukkit.Location getLocationBlock(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String str) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
getLocationBlockin interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
getLocationBlockin classNMS_Common- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getLocationPrecise
public org.bukkit.Location getLocationPrecise(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String str) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
getLocationPrecisein interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
getLocationPrecisein classNMS_Common- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getLootTable
public org.bukkit.loot.LootTable getLootTable(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String str) - Specified by:
getLootTablein interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
getLootTablein classNMS_Common
-
getMinecraftKey
public org.bukkit.NamespacedKey getMinecraftKey(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) - Specified by:
getMinecraftKeyin interfaceNMS<net.minecraft.commands.CommandSourceStack>- Overrides:
getMinecraftKeyin classNMS_Common
-
getParticle
public ParticleData<?> getParticle(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String str) - Specified by:
getParticlein interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
getParticlein classNMS_Common
-
getSenderForCommand
public org.bukkit.command.CommandSender getSenderForCommand(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, boolean isNative) - Specified by:
getSenderForCommandin interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
getSenderForCommandin classNMS_Common
-
getSimpleCommandMap
public org.bukkit.command.SimpleCommandMap getSimpleCommandMap()- Specified by:
getSimpleCommandMapin interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
getSimpleCommandMapin classNMS_Common
-
getSound
public org.bukkit.Sound getSound(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) - Specified by:
getSoundin interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
getSoundin classNMS_Common
-
getTag
- Specified by:
getTagin interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
getTagin classNMS_Common
-
getWorldForCSS
public org.bukkit.World getWorldForCSS(net.minecraft.commands.CommandSourceStack css) - Specified by:
getWorldForCSSin interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
getWorldForCSSin classNMS_Common
-
isVanillaCommandWrapper
public boolean isVanillaCommandWrapper(org.bukkit.command.Command command) - Specified by:
isVanillaCommandWrapperin interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
isVanillaCommandWrapperin classNMS_Common
-
reloadDataPacks
public abstract void reloadDataPacks()- Specified by:
reloadDataPacksin interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
reloadDataPacksin classNMS_Common
-
resendPackets
public void resendPackets(org.bukkit.entity.Player player) - Specified by:
resendPacketsin interfaceNMS<net.minecraft.commands.CommandSourceStack>- Specified by:
resendPacketsin classNMS_Common
-
getMinecraftServer
public net.minecraft.server.MinecraftServer getMinecraftServer()- Specified by:
getMinecraftServerin classNMS_Common
-