> For the complete documentation index, see [llms.txt](https://ikexing.gitbook.io/rt-wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ikexing.gitbook.io/rt-wiki/mod-expansion/ftb/iplayer-expansion.md).

# FTB Ultimine

同样的, 此功能需要在配置文件中把 `B:AllowCrTControl` 改为 `true` 才可使用

此类为 [IPlayer](https://docs.blamejared.com/1.12/en/Vanilla/Players/IPlayer) 类的扩展类, 这意味着 `IPlayer` 类实例可以直接使用此类的方法

此功能为 `CrT` 提供了操纵连锁的接口, 现在 `CrT` 可以决定玩家能否连锁

当玩家不能连锁时, 游戏界面左上角的 `HUD` 也不会显示

## Import

你完全没必要导这个包, 除非你想用类名调用扩展类方法

```csharp
import mods.randomtweaker.ftbultimine.IPlayer;
```

## Static ZenMethod

| 方法名                               | 方法作用     |
| --------------------------------- | -------- |
| isAllowFTBUltimine()              | 返回玩家能否连锁 |
| setAllowFTBUltimine(flag as bool) | 决定玩家能否连锁 |

## Example

```csharp
// 以下内容涉及事件, 不会事件慎入或查看 https://youyi580.gitbook.io/zentutorial/advanced/event-overview 的内容初步了解事件
import crafttweaker.event.BlockBreakEvent; // 方块破坏事件

events.onBlockBreak(function(event as BlockBreakEvent) {
    if(!event.world.remote && event.player.isAllowFTBUltimine()) { // 判断是否在服务端内且玩家能否连锁
        event.player.setAllowFTBUltimine(false); // 阻止玩家连锁

        // 值得注意的是, 调用此方法后, 效果是永久的, 除非再次调用并传入 true, 否则该玩家将永远无法连锁
    }
});
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://ikexing.gitbook.io/rt-wiki/mod-expansion/ftb/iplayer-expansion.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.
