Guest User

Untitled

a guest
Feb 4th, 2022
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 2.01 KB | None | 0 0
  1. val test = "{AbsorptionAmount:0.0f,Age:0,AgeLocked:0b,Air:300s,AngerTime:0,ArmorDropChances:[0.085f,0.085f,0.085f,0.085f],ArmorItems:[{},{},{},{}],Attributes:[{Base:20.0d,Name:\"minecraft:generic.max_health\"},{Base:0.30000001192092896d,Name:\"minecraft:generic.movement_speed\"},{Base:16.0d,Modifiers:[{Amount:0.00845283713794214d,Name:\"Random spawn bonus\",Operation:1,UUID:[I;735237967,1661486231,-1128333060,1912133126]}],Name:\"minecraft:generic.follow_range\"},{Base:4.0d,Name:\"minecraft:generic.attack_damage\"}],Brain:{memories:{}},Bukkit.Aware:1b,Bukkit.updateLevel:2,CanPickUpLoot:0b,CollarColor:14b,DeathTime:0s,FallDistance:0.0f,FallFlying:0b,Fire:-1s,ForcedAge:0,HandDropChances:[0.085f,0.085f],HandItems:[{},{}],Health:20.0f,HurtByTimestamp:0,HurtTime:0s,InLove:0,Invulnerable:0b,LeftHanded:0b,Motion:[0.0d,-0.0784000015258789d,0.0d],OnGround:1b,Owner:[I;1753507694,766262610,-1445118675,-783976364],Paper.Origin:[-135.5d,83.0d,-113.5d],Paper.OriginWorld:[I;-1967849511,-549632151,-1135486253,-254840820],Paper.SpawnReason:\"SPAWNER_EGG\",PersistenceRequired:1b,PortalCooldown:0,Pos:[-141.91046572260117d,81.0d,-110.60681626963152d],Rotation:[263.65125f,-20.0f],Sitting:1b,Spigot.ticksLived:5835,UUID:[I;561218244,1140674401,-2098431378,-1032690743],WorldUUIDLeast:-4876876317652455412L,WorldUUIDMost:-8451849289449257111L,id:\"minecraft:wolf\"}"
  2.         command("deserialize"){
  3.             execute<Player> { sender, _, _ ->
  4.                 val world = Bukkit.getWorld("world")
  5.                 if (world == null){
  6.                     info("world is null")
  7.                     return@execute
  8.                 }
  9.                 val entity = SerializeEntity.getEntityFromNBT(test, world)
  10.                 if (entity == null){
  11.                     info("entity is null")
  12.                     return@execute
  13.                 }
  14.                 entity.teleport(sender)
  15.                 info(entity.name)
  16.                 info(entity.isDead)
  17.                 info(entity.location)
  18.                 info(entity.uniqueId)
  19.             }
  20.         }
Advertisement
Add Comment
Please, Sign In to add comment