-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
性能优化和问题修复
- Loading branch information
Showing
9 changed files
with
78 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
fabric/versions/1.20.1/src/main/java/cn/evole/mods/mcbot/init/compat/VanishLoader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
//#if MC == 12001 | ||
package cn.evole.mods.mcbot.init.compat; | ||
|
||
import me.drex.vanish.util.VanishManager; | ||
import com.mojang.authlib.GameProfile; | ||
import net.minecraft.server.level.ServerPlayer; | ||
import java.util.UUID; | ||
|
||
public class VanishLoader { | ||
public static boolean isVanished(ServerPlayer player) { | ||
if(!VanishCompat.VANISH) return false; | ||
// 获取玩家的 GameProfile | ||
GameProfile gameProfile = player.getGameProfile(); | ||
// 从 GameProfile 中获取 UUID | ||
UUID uuid = gameProfile.getId(); | ||
// 使用 VanishManager.isVanished 方法检查玩家是否处于隐身状态 | ||
return VanishManager.isVanished(player.getServer(), uuid); | ||
} | ||
} | ||
//#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters