Recent content by Noy

  1. Noy

    Question player.setPose() doesn't work

    Pose is a client-side action and can only be seen by other players. Worse still, some poses can be only performed under certain circumstances.
  2. Noy

    How to use MobGoals API

    I can't find any method to create a vanilla goal, so I'm sorry but maybe you should dig into NMS: Bukkit.getMobGoals().addGoal(mob, 1, new PaperVanillaGoal<>( new PanicGoal(((CraftMob)mob).getHandle(), 1.5) ));
  3. Noy

    Solved How to make players have an independent inventory in specified world?

    Thank you for your meticulous reply, it really helped a lot! Thank you very, very much!
  4. Noy

    Solved How to make players have an independent inventory in specified world?

    Yeah you are right, that can absolutely solve my problem, thank you! My purpose to ask this question here is just think that if there is any official support to do this, since there may always be some unexpected situations that after my plugin restored player's inventory, something bad happened...
  5. Noy

    Solved How to make players have an independent inventory in specified world?

    Hi! I am making a plugin that generates a custom world, and I want the players to have an indenpendent inventory in this world (which means, when a player enters this world, they will have a new inventory, and will switch back as long as they leave). The problem is that if I implement this...
  6. Noy

    Solved GENERIC_MAX_HEALTH disappear after using bootstrapper

    You are right! It was renamed to MAX_HEALTH after changing the API version to 1.21.4. But I'm still confused: 1. When I use 1.21.3 server jar, with a 1.21.1 API, this bug didn't occur until I added a bootstrapper. They should be irrelevant // 2. If the experimental phase ends in the future...
  7. Noy

    Solved GENERIC_MAX_HEALTH disappear after using bootstrapper

    After I used the bootstrapper to create my custom enchantment Glow, an unexpected error occurred. It shows that GENERIC_MAX_HEALTH is not one of the member field in org.bukkit.attribute.Attribute. This seems to be an mapping error, I guess. If I change it to the deprecated method...
  8. Noy

    PersistentDataContainer can't keep data from items being dropped and picked up?

    When you use itemStack.getItemMeta(), you will get a COPY of the ItemMeta. So if you want your modification be persistent, use itemStack.editMeta() instead. Hope it would help.
  9. Noy

    PersistentDataContainer can't keep data from items being dropped and picked up?

    You use the PDC held by item, which is an ENTITY! Every time you drop an ItemStack, it will spawn a new Item entity. So why not use the PDC inside ItemMeta?
  10. Noy

    Question How can I add a tooltip for `Commands.literal()`

    Since that argument types can have tooltips, a single literal argument should also own it. How can I set a tooltip for that?
  11. Noy

    Question What does DestroysTokyo mean

    Wow! Thank you for the detailed explanation! It's interesting to learn about the history behind it.
  12. Noy

    Question What does DestroysTokyo mean

    This might be offensive, but I'd really like to know if it's literal
  13. Noy

    Solved Run commands as op

    EDIT: Can be achieved in a more elegant way by using Brigadier command system Solved by making a dummy sender: public class CmdHelper { public static CommandSender asOpSender(Player player) { return new AsOpSender(player); } public static List<Entity>...
  14. Noy

    Question Enchantments

    https://docs.papermc.io/paper/dev/registries#create-new-entries
  15. Noy

    Creating custom heads

    You need to set the meta back to enable your modifications. Or just simply use ItemStack.editMeta.