[FEAT] APIs for Player Revive mod and Whitelist changes
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
--- a/Forge/src/main/java/com/hypherionmc/craterlib/common/ForgeCompatHelper.java
|
||||
+++ /dev/null
|
||||
@@ -1,17 +1,0 @@
|
||||
@@ -1,45 +1,0 @@
|
||||
-package com.hypherionmc.craterlib.common;
|
||||
-
|
||||
-import com.hypherionmc.craterlib.core.platform.CompatUtils;
|
||||
-import com.hypherionmc.craterlib.nojang.world.entity.player.BridgedPlayer;
|
||||
-import team.creative.playerrevive.api.IBleeding;
|
||||
-import team.creative.playerrevive.server.PlayerReviveServer;
|
||||
-
|
||||
-public class ForgeCompatHelper implements CompatUtils {
|
||||
-
|
||||
@@ -17,4 +19,30 @@
|
||||
- public String getSkinUUID(BridgedPlayer player) {
|
||||
- return player.getStringUUID();
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public boolean isPlayerBleeding(BridgedPlayer player) {
|
||||
- if (!ModloaderEnvironment.INSTANCE.isModLoaded("playerrevive"))
|
||||
- return false;
|
||||
-
|
||||
- return PlayerReviveServer.isBleeding(player.toMojangServerPlayer());
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public boolean playerBledOut(BridgedPlayer player) {
|
||||
- if (!ModloaderEnvironment.INSTANCE.isModLoaded("playerrevive"))
|
||||
- return false;
|
||||
-
|
||||
- IBleeding bleeding = PlayerReviveServer.getBleeding(player.toMojangServerPlayer());
|
||||
- return bleeding != null && bleeding.bledOut();
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public boolean playerRevived(BridgedPlayer player) {
|
||||
- if (!ModloaderEnvironment.INSTANCE.isModLoaded("playerrevive"))
|
||||
- return false;
|
||||
-
|
||||
- IBleeding bleeding = PlayerReviveServer.getBleeding(player.toMojangServerPlayer());
|
||||
- return bleeding != null && bleeding.revived();
|
||||
- }
|
||||
-}
|
||||
|
Reference in New Issue
Block a user