# HUD、界面、图像及更多

要了解如何使用 HUD 和 GUI API（字体图像），您可以查看我的示例。

## GUI

{% embed url="<https://github.com/LoneDev6/API-ItemsAdder-Example-GUI>" %}

## HUD

{% embed url="<https://github.com/LoneDev6/RPGhuds>" %}

{% embed url="<https://github.com/LoneDev6/API-ItemsAdder-Example-ServerMonitor>" %}

### 访问法力值示例

```java
PlayerHudsHolderWrapper huds = new PlayerHudsHolderWrapper(player);
PlayerQuantityHudWrapper manaHud = 
                new PlayerQuantityHudWrapper(huds, "magiccraft:mana_bar");
if(manaHud.exists())
  manaHud.setFloatValue(2.0f);
else
  System.out.println("Error: mana not found, maybe it's disabled.");
```

{% hint style="warning" %}

#### 注意

确保您没有权限 `ia.user.hud.bypass.api.*` 否则 `setFloatValue` 代码将不会执行任何操作。
{% endhint %}

## 常见问题

{% content-ref url="/pages/WguAaJy5EzNOawBRcs3g" %}
[常见错误](/chinese/cha-jian-shi-yong-fang-fa/adding-content/font-images/common-errors.md)
{% endcontent-ref %}

## 获取表情符号或 GUI 字符

```java
new FontImageWrapper("twitteremojis:confirm").getString()
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://itemsadder.devs.beer/chinese/kai-fa-zhe/java-api/huds-guis-images-and-more.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
