MAXIMILIEN47201

Untitled

Dec 1st, 2017
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.06 KB | None | 0 0
  1. String header = "§eBienvenue sur GravenMC " + GravenMCAPI.getRank().getRank(p.getUniqueId()).getPrefix() + p.getDisplayName() + "§r§7!";
  2. String discord = "§an'hésites pas à venir sur notre Discord §3§l→§r §6discord.gravenmc.fr";
  3. String boutique = "§aet aussi sur notre Boutique §3§l→§r §6shop.gravenmc.fr";
  4. String forum = "§aou bien encore notre Forum §3§l→§r §6forum.gravenmc.fr";
  5. String kits = "§bn'oublies pas d'acheter des Kits achetable avec les Coins";
  6. String footer = "§dBon jeu sur GravenMC!";
  7.  
  8. Location loc = new Location(Bukkit.getWorld("world"), -164.5, 93.5, 110.5, -90, 0);
  9. Location loc1 = new Location(Bukkit.getWorld("world"), -164.5, 93.25, 110.5, -90, 0);
  10. Location loc2 = new Location(Bukkit.getWorld("world"), -164.5, 93, 110.5, 0, -90);
  11. Location loc3 = new Location(Bukkit.getWorld("world"), -164.5, 92.75, 110.5, -90, 0);
  12. Location loc4 = new Location(Bukkit.getWorld("world"), -164.5, 92.5, 110.5, -90, 0);
  13. Location loc5 = new Location(Bukkit.getWorld("world"), -164.5, 92.25, 110.5, -90, 0);
  14.  
  15. // Header + Loc
  16. WorldServer s = ((CraftWorld) loc.getWorld()).getHandle();
  17.  
  18. EntityArmorStand stand = new EntityArmorStand(s);
  19. stand.setLocation(loc.getX(), loc.getY(), loc.getZ(), 0, 0);
  20. stand.setCustomName(header);
  21. stand.setCustomNameVisible(true);
  22. stand.setNoGravity(true);
  23. stand.setInvisible(true);
  24.  
  25. PacketPlayOutSpawnEntityLiving packet = new PacketPlayOutSpawnEntityLiving((EntityLiving) stand);
  26.  
  27. // Discord + Loc1
  28. WorldServer s1 = ((CraftWorld) loc1.getWorld()).getHandle();
  29. EntityArmorStand stand1 = new EntityArmorStand(s1);
  30. stand1.setLocation(loc1.getX(), loc1.getY(), loc1.getZ(), 0, 0);
  31. stand1.setCustomName(discord);
  32. stand1.setCustomNameVisible(true);
  33. stand1.setNoGravity(true);
  34. stand1.setInvisible(true);
  35.  
  36. PacketPlayOutSpawnEntityLiving packet1 = new PacketPlayOutSpawnEntityLiving((EntityLiving) stand1);
  37.  
  38. // boutique + Loc2
  39. WorldServer s2 = ((CraftWorld) loc2.getWorld()).getHandle();
  40. EntityArmorStand stand2 = new EntityArmorStand(s2);
  41. stand2.setLocation(loc2.getX(), loc2.getY(), loc2.getZ(), 0, 0);
  42. stand2.setCustomName(boutique);
  43. stand2.setCustomNameVisible(true);
  44. stand2.setNoGravity(true);
  45. stand2.setInvisible(true);
  46.  
  47. PacketPlayOutSpawnEntityLiving packet2 = new PacketPlayOutSpawnEntityLiving((EntityLiving) stand2);
  48.  
  49. // forum + loc3
  50. WorldServer s3 = ((CraftWorld) loc3.getWorld()).getHandle();
  51. EntityArmorStand stand3 = new EntityArmorStand(s3);
  52. stand3.setLocation(loc3.getX(), loc3.getY(), loc3.getZ(), 0, 0);
  53. stand3.setCustomName(forum);
  54. stand3.setCustomNameVisible(true);
  55. stand3.setNoGravity(true);
  56. stand3.setInvisible(true);
  57.  
  58. PacketPlayOutSpawnEntityLiving packet3 = new PacketPlayOutSpawnEntityLiving((EntityLiving) stand3);
  59.  
  60. // kits + loc4
  61. WorldServer s4 = ((CraftWorld) loc4.getWorld()).getHandle();
  62. EntityArmorStand stand4 = new EntityArmorStand(s4);
  63. stand4.setLocation(loc4.getX(), loc4.getY(), loc4.getZ(), 0, 0);
  64. stand4.setCustomName(kits);
  65. stand4.setCustomNameVisible(true);
  66. stand4.setNoGravity(true);
  67. stand4.setInvisible(true);
  68.  
  69. PacketPlayOutSpawnEntityLiving packet4 = new PacketPlayOutSpawnEntityLiving((EntityLiving) stand4);
  70.  
  71. // footer + Loc5
  72. WorldServer s5 = ((CraftWorld) loc5.getWorld()).getHandle();
  73. EntityArmorStand stand5 = new EntityArmorStand(s5);
  74. stand5.setLocation(loc5.getX(), loc5.getY(), loc5.getZ(), 0, 0);
  75. stand5.setCustomName(footer);
  76. stand5.setCustomNameVisible(true);
  77. stand5.setNoGravity(true);
  78. stand5.setInvisible(true);
  79.  
  80. PacketPlayOutSpawnEntityLiving packet5 = new PacketPlayOutSpawnEntityLiving((EntityLiving) stand5);
  81.  
  82. ((CraftPlayer) p).getHandle().playerConnection.sendPacket(packet1);
  83. ((CraftPlayer) p).getHandle().playerConnection.sendPacket(packet2);
  84. ((CraftPlayer) p).getHandle().playerConnection.sendPacket(packet3);
  85. ((CraftPlayer) p).getHandle().playerConnection.sendPacket(packet4);
  86. ((CraftPlayer) p).getHandle().playerConnection.sendPacket(packet5);
  87. ((CraftPlayer) p).getHandle().playerConnection.sendPacket(packet);
Advertisement
Add Comment
Please, Sign In to add comment