Making the player's launcher crash

Discussion in 'Plugin Development' started by Neilnet, Jan 31, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    Neilnet

    How would one go abouts making a player's client launcher crash (and display some java error) intentionally? I need this because I plan on having the player's client crash if he says a certain word.
     
  2. Offline

    Skionz

    @Neilnet There are plenty of ways. Personally I have always sent a blockcrack particle packet with an invalid id, but its up to you.
     
  3. Offline

    Neilnet

    Amazing, I just looked up sending packets. It's like this:
    1. ((CraftPlayer)player).getHandle().playerConnection.sendPacket(packet);
    I've worked with packets before in my own networking programs, but how would I send a blockcrack particle packet?

    Or is it just like this:
    player.getLocation().getWorld().playEffect(player.getLocation(), Effect.STEP_SOUND, ID) ?
     
  4. Offline

    Skionz

    @Neilnet Look at the list of particle effects on the wiki and PacketPlayOutWorldParticles constructor.
     
  5. Offline

    Vamure

    Create an inventory that doesn't exist and force the player to open it. Simple way of doing it in about 2 lines of code
     
  6. Offline

    Neilnet

    Player player = e.getPlayer();
    Inventory inv = null;
    player.openInventory(inv);

    Gives a console error, doesn't work. NPE.
     
  7. Offline

    Skionz

  8. Offline

    Vamure

    Don't make it null. Make it non-existent using an integer that is not a multiple of 9 or that is superior to 99(Not sure what the highest # of inventory slots are).

    Inventory inv = Bukkit.createInventory(player, 999);
     
  9. Offline

    Neilnet

    e.setCancelled(true);
    Player player = e.getPlayer();
    PacketPlayOutWorldParticles asd = new PacketPlayOutWorldParticles();
    ((CraftPlayer)player).getHandle().playerConnection.sendPacket(asd);

    Works, but it doesn't crash to the launcher.
     
  10. Offline

    Skionz

    @Neilnet Send a blockcrack effect with an invalid id.
     
  11. Offline

    Neilnet

    @Skionz
    The constructor is PacketPlayOutBlockChange(int i, int j, int k, World world),
    I really am clueless as to what i, j and k are.
     
  12. Offline

    nverdier

    @Neilnet Gotta love packets for that!
     
  13. Offline

    Skionz

    @Neilnet I never said anything about the PacketPlayOutBlockChange class.
     
  14. Offline

    Vamure

    Inventory inv = Bukkit.createInventory(player, 999);
    player.openInventory(inv);


    @Neilnet
     
  15. Offline

    Neilnet

    @Vamure
    Doesn't work, just creates an inventory that overlaps in the latest version.


    @Skionz
    Could you show me an example please?
     
  16. Offline

    Skionz

    @Neilnet Ive told you how... Just create a PacketPlayOutWorldParticles instance with an invalid blockcrack id.
     
  17. Offline

    Neilnet

    PacketPlayOutWorldParticles asd = new PacketPlayOutWorldParticles();

    Doesn't let me add arguments of any kind.
     
  18. Offline

    Skionz

    @Neilnet The class has multiple constructors.
     
  19. Offline

    ReadySetPawn

    (String name, float x, float y, float z, float xOffset, float yOffset, float zOffset, int amount, int data)
     
  20. Offline

    sirrus86

    Code:
    public PacketPlayOutWorldParticles(EnumParticle paramEnumParticle, boolean paramBoolean, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, float paramFloat7, int paramInt, int[] paramArrayOfInt)
     
  21. Offline

    mrCookieSlime

    Locked.
    We do not support the usage of Bukkit for malicious attempts.
     
Thread Status:
Not open for further replies.

Share This Page