mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-02 17:01:38 +01:00
2d09115b3a
Uses the new ANSIComponentSerializer introduced in Adventure 4.14.0 to serialize components when logging them via the ComponentLogger, or when sending messages to the console. This replaces the old solution which uses legacy jank and custom color conversions, with a new library that handles the conversion and config
30 lines
1.1 KiB
Diff
30 lines
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: dawon <dawon@dawon.eu>
|
|
Date: Wed, 19 Oct 2022 23:31:53 +0200
|
|
Subject: [PATCH] Add Sneaking API for Entities
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
index e05c3c15d15c242e07caa9033cc49d515dfcdb41..ea056babe2f8123f20dc608d8a636da1de634b8c 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
@@ -1198,6 +1198,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
|
return Pose.values()[this.getHandle().getPose().ordinal()];
|
|
}
|
|
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public void setSneaking(boolean sneak) {
|
|
+ this.getHandle().setShiftKeyDown(sneak);
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public boolean isSneaking() {
|
|
+ return this.getHandle().isShiftKeyDown();
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
@Override
|
|
public SpawnCategory getSpawnCategory() {
|
|
return CraftSpawnCategory.toBukkit(this.getHandle().getType().getCategory());
|