mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-03 05:51:42 +01:00
Add missing NMS commit
This commit is contained in:
parent
ed117eac96
commit
143e642802
@ -663,6 +663,10 @@ public class NMS {
|
|||||||
return BRIDGE.isOnGround(entity);
|
return BRIDGE.isOnGround(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isSneaking(Entity entity) {
|
||||||
|
return BRIDGE.isSneaking(entity);
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean isSolid(Block in) {
|
public static boolean isSolid(Block in) {
|
||||||
return BRIDGE.isSolid(in);
|
return BRIDGE.isSolid(in);
|
||||||
}
|
}
|
||||||
|
@ -128,6 +128,13 @@ public interface NMSBridge {
|
|||||||
|
|
||||||
public boolean isOnGround(Entity entity);
|
public boolean isOnGround(Entity entity);
|
||||||
|
|
||||||
|
public default boolean isSneaking(Entity entity) {
|
||||||
|
if (entity instanceof Player) {
|
||||||
|
return ((Player) entity).isSneaking();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isSolid(Block in);
|
public boolean isSolid(Block in);
|
||||||
|
|
||||||
public boolean isValid(Entity entity);
|
public boolean isValid(Entity entity);
|
||||||
@ -244,7 +251,11 @@ public interface NMSBridge {
|
|||||||
|
|
||||||
public void setSitting(Tameable tameable, boolean sitting);
|
public void setSitting(Tameable tameable, boolean sitting);
|
||||||
|
|
||||||
public void setSneaking(Entity entity, boolean sneaking);
|
public default void setSneaking(Entity entity, boolean sneaking) {
|
||||||
|
if (entity instanceof Player) {
|
||||||
|
((Player) entity).setSneaking(sneaking);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public default void setSnifferState(Entity entity, SnifferState state) {
|
public default void setSnifferState(Entity entity, SnifferState state) {
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user