Advertisement
Phe0X

Sleep Animation beta

Jun 6th, 2020
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. option ver:
  2. get:
  3. return console.getServer().getClass().getPackage().getName().split("\.")[3]
  4. import:
  5. java.util.Optional
  6. java.lang.Byte
  7. java.lang.Long
  8. java.lang.Short
  9. java.lang.reflect.Field
  10. org.bukkit.entity.Pose
  11. # java.lang.Byte
  12. net.minecraft.server.{@ver}.ChatComponentText
  13. net.minecraft.server.{@ver}.BlockPosition
  14. net.minecraft.server.{@ver}.EntityPose
  15. com.comphenix.protocol.wrappers.WrappedDataWatcher
  16. com.comphenix.protocol.wrappers.WrappedDataWatcher$Registry as DWReg
  17. com.comphenix.protocol.wrappers.WrappedDataWatcher$WrappedDataWatcherObject as DWObject
  18. org.bukkit.event.inventory.InventoryType
  19. org.bukkit.Bukkit
  20. org.bukkit.Location
  21. org.bukkit.World
  22. org.bukkit.util.Vector
  23.  
  24. com.comphenix.protocol.reflect.EquivalentConverter
  25. com.comphenix.protocol.reflect.FieldAccessException
  26. com.comphenix.protocol.reflect.StructureModifier
  27. com.comphenix.protocol.utility.MinecraftReflection
  28. com.google.common.base.Objects
  29.  
  30. command /test2:
  31. trigger:
  32. # set {_a} to new BlockPosition(0, 0 and 0)
  33. # broadcast "%{_a}%"
  34. set {_packetMeta} to new play_server_entity_metadata packet
  35. set int pnum 0 of {_packetMeta} to {id} #My entity ID
  36. set {_name} to Optional.of(new BlockPosition(-125, 91 and 63))
  37. set {_WDW} to new WrappedDataWatcher()
  38. set {_Serializer} to DWReg.getBlockPositionSerializer(true)
  39. set {_Dw} to new DWObject(13 and {_Serializer})
  40. {_WDW}.setObject({_Dw} and {_name})
  41. set {_tester2} to DWReg.get(EntityPose.SLEEPING and false)
  42. # set {_teser2} to DWReg.getEntityPoseSerializer(true)
  43. set {_tename2} to Pose.SLEEPING
  44. set {_teDw2} to new DWObject(6 and {_teser2})
  45. {_WDW}.setObject({_teDw2} and {_tename2})
  46. set watchable collection field 0 of {_packetMeta} to {_WDW}
  47. set {_f} to watchable collection field 0 of {_packetMeta}
  48. send packet {_packetMeta} to all players
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement