How to make it so that only a player with the nickname ... can have this keybind

Started by kalipsiowhite on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make it so that only a player with the nickname ... can have this keybind

I created a skill, when you press G my character heals but I would like it to be reserved for one player and not for everyone, i know i must have the block "Get display name of" but i can't put the entity name.

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if display name is equal to…
Fri, 06/13/2025 - 09:13

if display name is equal to what ever name you want

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
display name of entity*  
Fri, 06/13/2025 - 09:14

display name of entity*

 

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
reccomended you make it so…
Fri, 06/13/2025 - 19:56

reccomended you make it so its entity type player...

Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hi, maybe my English is bad…
Sun, 06/15/2025 - 06:44

Hi, maybe my English is bad because I'm from Russia, but I was creating a mod for my project and solved this problem using variables. In the ability activation procedure, I simply set a check for the presence of this variable, and if it is there, then the ability is triggered, if it is not there, then nothing happens. All you have to do is think about how the player gets this variable, it depends on what you are doing. Personally, I initially did this through a block, I created a block with which, when the player interacts, he is given a choice between game classes and, depending on the class, he has a set of skills. Now I've done it through the game interface, when you press a certain key, the interface appears, and there he chooses which class he wants to take, and I've also added the ability to change the class when a certain condition is met.