parent
7b5b8f4d1c
commit
f557eb2d83
9 changed files with 46 additions and 4 deletions
@ -0,0 +1,23 @@ |
||||
package xyz.soukup.menumaker.commands; |
||||
|
||||
import org.bukkit.command.Command; |
||||
import org.bukkit.command.CommandExecutor; |
||||
import org.bukkit.command.CommandSender; |
||||
import org.bukkit.entity.Player; |
||||
import org.bukkit.inventory.ItemStack; |
||||
import org.bukkit.inventory.meta.ItemMeta; |
||||
import org.jetbrains.annotations.NotNull; |
||||
|
||||
public class removename implements CommandExecutor { |
||||
|
||||
@Override |
||||
public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s, @NotNull String[] strings) { |
||||
Player player = (Player) commandSender; |
||||
ItemStack item = player.getInventory().getItemInMainHand(); |
||||
ItemMeta meta = item.getItemMeta(); |
||||
assert meta != null; |
||||
meta.setDisplayName(" "); |
||||
item.setItemMeta(meta); |
||||
return true; |
||||
} |
||||
} |
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue