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

Java seperate method to find Prime numbers
Substracting value from a field in a database table taken from a textbox
MySQL Connection Error in Java - com.mysql.jdbc.Driver
Oracle SQL - Reusing a bind variable on a query called through JDBC
Not getting absolute file path from resources
Perfecting addMatrix Java method
How to Logout in a JSF application
Jersey bean validation ParameterNameProvider
How to know which build tool is Intellij using?
Contact cannot be cast to java.lang.Comparable
How to change font size on html tag- android
How can I put numbers in each part of the grid in a 10x10?
Do Nimbus look and feel supports loading configuration from xml
Serialize java.lang.Throwable along with stack trace, causes chain and related stack traces
Where is wildfly option when creating new openshift application from eclipse
How to copy a file to another location for later use (java)

Categories

HOME
yii2
variables
blogger
gerrit
debugging
keycloak
push-notification
react-router
octobercms
q
cmd
yarn
sqlite3
jgroups
umd
google-project-tango
serverspec
django-imagekit
multiple-records
contact
facebook-php-sdk
izpack
carthage
jsprit
django-simple-history
angular-ui
reactcsstransitiongroup
code-review
introduction
reverse-proxy
kudan
microsoft-r
crosstab
android-widget
user-interaction
bootstrap-material-design
nhapi
media-queries
google-rich-snippets
key-value-observing
google-cloud-endpoints-v2
copying
caret
commit
geopositioning
force-layout
hexo
simplexml
git-merge
lto
libraries
mixture-model
withings
android-browser
ansible-playbook
webdriver-manager
broadcastreceiver
texmaker
fakeiteasy
hibernate-tools
apache-fop
dds
jlink
pebble-watch
gabor-filter
tropo
statsd
lift-json
nsarray
boost-preprocessor
iso8601
query-performance
synchronous
multiple-regression
angstrom-linux
hover-over
rvest
ptrace
phpcas
freelancer.com-api
separator
embedded-code
cisco-ios
census
oberon
dundas
angular-local-storage
facebook-graph-api-v2.4
website-monitoring
operator-precedence
ng-animate
cloud-connect
intentservice
cdc
shellexecute
android-screen-support
mqx
lcs
mhtml
dmoz
path-separator
frameset
objective-c-2.0
psi
horizontal-accordion
appender
actionview
android-sdk-2.1
sql-server-profiler
lang
avatar
privilege

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