Trust API
作者:rebot | 分类:模组
Minecraft 版本: 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.21.6 1.21.7 1.21.8 1.21.9 1.21.10 1.21.11 26.1 26.1.1 26.1.2
平台: paper purpur
Trust API
Directional trust API for Paper plugins with optional Skript syntax.
Features
- Java API:
TrustService(trust,untrust,trusts,getTrusted) - Service registration through Bukkit
ServicesManager - Persistence to
plugins/Trust API/trusts.yml - Skript effect:
make %player% trust %player%make %player% to trust %player%make %player% not trust %player%
- Skript condition:
%player% trusts %player%
- Command:
/trust add <player> [trusted]/trust remove <player> [trusted]/trust list [player](opens chest GUI with trusted player heads)
Skript usage
command /testtrust:
trigger:
make player to trust arg-1
command /testuntrust:
trigger:
make player not trust arg-1
on damage:
attacker is a player
victim is a player
if attacker trusts victim:
send "You trust this player." to attacker
Java usage
import me.thesnowbound.trustAPI.api.TrustApiProvider;
TrustApiProvider.get().ifPresent(service -> {
if (service.trusts(attacker.getUniqueId(), victim.getUniqueId())) {
// your logic
}
});请登录后举报
请 登录 后赞助作者。
暂无评论,抢个沙发吧~