java


EntityMetadata packet issue


I am attempting to make a player appear like they are sneaking (crouching) on Minecraft 1.8.8 running Spigot, based on http://wiki.vg/Entities#Entity_Metadata_Format I have done the following:
Created a data watcher and mapped appropriate value for crouched from the wiki:
DataWatcher dw = new DataWatcher(null);
dw.a(0, (byte) 0x02);
Created the packet, where target is a Player object of the player that needs to appear sneaking:
PacketPlayOutEntityMetadata metadataPacket = new PacketPlayOutEntityMetadata(target.getEntityId(), dw, false);
Sent the packet to everyone online:
for (Player p : Bukkit.getOnlinePlayers()) {
((CraftPlayer) p).getHandle().playerConnection.sendPacket(metadataPacket);
}
This does not appear to be working though, how would be the appropriate way to go about this?
I attempted to use ProtocolLib too, though ideally I am looking for a solution that works using packets.

Related Links

Filter Spark DataFrames on multiple columns in Java [duplicate]
Spring-Boot 1.4.1 + liquibase 3.5.3 don't find the changelog file
Getting exception while querying from elasticsearch 5.1
How to select implement by a parameter?In Java
What is the difference between forEach and forEachEntry in ConcurrentHashMap
this program i dont know how to fix these errors [duplicate]
Confusing results in benchmarking Java md5sum on different devices
Java - differentiate between files in unicode NFC and NFD
Error on use two dataTables on same page with dataScroller
I am getting a Exception in thread “AWT-EventQueue-0” java.lang.NumberFormatException: For input string: “Years:”
Give ListChangeListener initial state
Write data in Apache Parquet format
Java code to handle Oracle function that takes two custom types as input parameters
How to mock static method with same parameters differently in a test?
How prevent a method of super in subclass (java) [duplicate]
Type mismatch error in java 8

Categories

HOME
log4j
winforms
hive
gerrit
debugging
keras
smarty
octobercms
sqlite-net-extensions
spring-cloud-stream
spring-jdbc
yarn
paw-app
graphql
gps
angular-ui-bootstrap
alpha
fingerprint
flyway4
azure-media-services
portia
elasticsearch-hadoop
python-unittest
windows-server-2012
hapi
serilog
pythonanywhere
contextmenu
google-pagespeed
lldb
conemu
physics-engine
smb
qhull
fish
internet-explorer-9
xacml
binary-data
key-value-observing
airconsole
oracle-fusion-middleware
catch-all
lxd
hybridauth
rotational-matrices
y86
plsql-psp
serve
objectlistview
elasticsearch-plugin
bootstrapper
awt
hp-ux
texmaker
arena-simulation
import-from-excel
multipeer-connectivity
promela
datastax-startup
yii2-extension
magma
pg-dump
google-perftools
linode
account-kit
removechild
slicknav
impresspages
execute
msys
jms2
intel-fortran
cartesian-product
icu4j
t4mvc
cyclomatic-complexity
metaclass
tmuxinator
deis
cakephp-3.1
tableau-online
ibaction
operation
generic-programming
composite
npapi
geonetwork
csquery
formatjs
jscript.net
google-style-guide
asp.net-web-api-odata
php-5.4
xsockets.net
.aspxauth
spring-io
comaddin
sharp-repository
mhtml
bluepill
gdata-api
javaspaces
regsvr32
enter
external-accessory
appender
subviews
asp.net-mvc-areas
preference
firefox-5
misv

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App