[FEAT] APIs for Player Revive mod and Whitelist changes
This commit is contained in:
@@ -2,6 +2,8 @@ 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 {
|
||||
|
||||
@@ -14,4 +16,30 @@ public class ForgeCompatHelper implements CompatUtils {
|
||||
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