Test sneaking
Dieser Commit ist enthalten in:
Ursprung
30d1187038
Commit
96bde868d7
@ -101,8 +101,10 @@ public abstract class REntity {
|
||||
|
||||
public void sneak(boolean sneaking) {
|
||||
entity.setSneaking(sneaking);
|
||||
//entity.getDataWatcher().set(new DataWatcherObject<Byte>(0, DataWatcherRegistry.a), (byte)0x02);
|
||||
PacketPlayOutEntityMetadata packet = new PacketPlayOutEntityMetadata(entity.getId(), entity.getDataWatcher(), false);
|
||||
|
||||
DataWatcher dataWatcher = new DataWatcher(entity);
|
||||
dataWatcher.register(new DataWatcherObject<>(0, DataWatcherRegistry.a), sneaking ? (byte)0x02 : (byte)0x00);
|
||||
PacketPlayOutEntityMetadata packet = new PacketPlayOutEntityMetadata(entity.getId(), dataWatcher, false);
|
||||
|
||||
for(Player player : Bukkit.getOnlinePlayers()){
|
||||
((CraftPlayer)player).getHandle().playerConnection.sendPacket(packet);
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren