Change item's name?

Hello, i want to my plugin change the name of the player’s tool, but iknow how get the name but no how to set it…; do you have any idea?

Use DisplayNameData or Keys.DISPLAY_NAME.

how can i get it? i don’t have .offer when i have the item?

Use player.getItemInHand().offer(...).

Oh no, sorry, i used .getItem()
it’s normal if i don’t have offer

sorry but i try it, and the name doesn’t change…
do i have to update anything or other?

The ItemStack returned by the Player#getItemInHand() method is only a copy of the actual ItemStack. If it has been modified, it has to be set back to the player.

ItemStack stack = player.getItemInHand();
stack.offer(Keys.DISPLAY_NAME, Texts.of("FLARD"));
player.setItemInHand(stack);

(code untested)