Names Lookup
Find the exact Java name for any material, sound, particle, entity, potion effect, enchantment or attribute.
Almost every plugin has to say "this exact sword", "that exact sound" or "this potion effect". Java is strict: one wrong letter and your code will not compile. This tool lists every name that works in Paper 26.3, so you can copy it instead of guessing.
What is a name, and why does it have to be exact?
The game has thousands of things: blocks, items, sounds, mobs, potion effects. Paper gives each one a constant, which is a fixed name written in capital letters with underscores, such as Material.DIAMOND_SWORD. The part before the dot is the list (a class or an enum) and the part after the dot is the thing you want.
Every one of these things also has a namespaced key, which is the name the game itself uses in commands and data packs, like minecraft:diamond_sword. The two names are close but not the same: the Java name is in capitals (DIAMOND_SWORD), the key is lowercase with minecraft: in front. This tool shows both and finds either one.
The Names Lookup
Pick a list with the tabs, or just start typing. The search looks in every list at once and tells you how many matches each list has. Press a name to see a short example of how to use it, then copy it with one button.
The Names Lookup is loading. If this message stays, JavaScript is turned off in your browser.
Ways to search
- A plain word.
swordfinds every sword,glass panefinds the glass panes,level upfinds the level-up sound. - The vanilla id. Paste
minecraft:totem_of_undyingfrom a command or a data pack and you get the Java name. - The Java name. Even
Material.DIAMOND_SWORDorDiamondSwordworks. - A small typo.
dimond pickaxestill findsDIAMOND_PICKAXE. Letters in the right order also work:dmndswd.
What each list is for
Material: make an item, change a block, or check what someone holds. See Items and Blocks.SoundandParticle: play a sound or draw an effect in the world. See Effects, particles and sounds.EntityType: spawn a mob or check what kind of mob something is. See Entities.PotionEffectType,EnchantmentandAttribute: give a status effect, enchant an item, or change health and speed. See Players and Items.GameRules,Biome,StatisticandDamageType: change world settings, check the terrain, read counters, or tell why damage happened. See Worlds and locations.TagandDataComponentTypes: ask "is this any kind of log?" or read the information stored on an item. See Registries and data components.NamedTextColor, boss bars and the ChatColor table: color text, build a boss bar, or turn old&ccodes into MiniMessage. See MiniMessage and Titles, action bars and boss bars.GameModeandDifficulty: switch a player's game mode or the world difficulty. See Players.
Using a name in your plugin
Find the name and copy it
Press Copy Java to copy something like
Material.DIAMOND_SWORD. Press Copy example on the right to copy a whole line with the import lines above it.Paste it where your code needs it
Most of the time the name goes inside parentheses:
ItemStack.of(Material.DIAMOND_SWORD). The example shows you which method wants it.Let IntelliJ add the import
If the name shows up red, press Alt+Enter and choose the import. The import lines in the example tell you which one is right when IntelliJ offers several.
Mistakes beginners make with names
- Writing the key where Java wants the constant.
Material.minecraft:diamondis not Java. In code useMaterial.DIAMOND. Use theminecraft:form only inside strings, such asMaterial.matchMaterial("minecraft:diamond"), or in commands. - Mixing up an item and a block. Some names are only items (you cannot place a
DIAMOND_SWORD) and a few are only blocks (you cannot holdWATER). The badges show which. - Using a deprecated name. Names marked deprecated still compile, but the authors plan to remove them. The old game rules such as
GameRule.DO_DAYLIGHT_CYCLEare the common trap: useGameRules.ADVANCE_TIMEinstead. The tool hides deprecated names until you ask. - Using
ChatColorin new code. It is the old way. Use MiniMessage tags such as<red>or theNamedTextColorconstants. The ChatColor tab is a translation table for code you find online. - Forgetting the extra argument. A few names need more than the name: the statistics
MINE_BLOCKandKILL_ENTITYneed to know which block or mob, and the particleDUSTneeds a color and a size. The result row and the example say so. - Mixing up the two
Soundclasses. Adventure also has a class namedSound, innet.kyori.adventure.sound. This tool lists the Bukkit one,org.bukkit.Sound. If IntelliJ offers both, takeorg.bukkitforplayer.playSound(location, sound, volume, pitch).
Recap
- Java names are constants in capitals with underscores, like
Material.DIAMOND_SWORD. The game's own key is lowercase, likeminecraft:diamond_sword. - The tool finds a name from a word, a vanilla id, a Java name or a small typo, and gives you the import and a working example.
- Prefer modern names:
GameRulesoverGameRule, MiniMessage overChatColor. - Some names need extra information, like which block a statistic counts.
Quick quiz
Which one is the Java constant for the diamond sword?
Java constants are written in capital letters with underscores.minecraft:diamond_swordis the key the game uses in commands, which belongs inside a string, not after a dot.A tutorial from 2019 uses
ChatColor.RED. What do you use in a new Paper 26.3 plugin?ChatColor is deprecated.sendRichMessageunderstands MiniMessage tags, not the&codes, so&cwould show up as plain text.The tool shows a game rule name as deprecated and names a replacement. What should you do?
Deprecated means the authors will remove the name in a future version. The replacement does the same job and keeps working.
Find five names
Use the tool to find the Java name for each of these, and write down the line you would paste:
- the sound for picking up an experience orb
- the potion effect that makes you move faster
- the particle that looks like a heart
- the game rule that keeps your items when you die
- the MiniMessage tag for the old
&6color
Hint
Show the solution
The answers are Sound.ENTITY_EXPERIENCE_ORB_PICKUP, PotionEffectType.SPEED, Particle.HEART, GameRules.KEEP_INVENTORY, and <gold> (the ChatColor table shows GOLD next to the code &6).
Next steps
Now put the names to work: reward a player in Items, add atmosphere with effects, particles and sounds, or learn where the lists come from in registries and data components. Timing something? Open the Tick Calculator.