Creating fake players.

Discussion in 'Plugin Development' started by bobacadodl, Nov 29, 2012.

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

    bobacadodl

    How would I go about creating fake virtual players? I do NOT want there to be physical representations of these players, like in Citizens, but I want their names to show up in the Tab list and I want them to count when the the server is pinged. Any ideas?
    (No, I am NOT using this for malicious purposes such as getting a high ranking on a server list)
     
    jojohnson1 likes this.
  2. Offline

    marin1805

    Would be interesting to see if there is a solution to this. Some bots in game could be useful for new starter servers :) But not to ethic but who cares ;)
     
    jojohnson1 likes this.
  3. Offline

    fireblast709

    you cannot edit the amount of players online. (Well you can, but I certainly do not recommend it. Also it could be that the players would get insta kicked due lost connection). You can add players to the tablist with Packet #201
     
  4. Offline

    lDucks Retired Staff

  5. Offline

    fireblast709

    lDucks read the OP :3
     
  6. Offline

    bobacadodl

    Could you explain any process of how you might go about editing the amount of players online? (Even if they get insta kicked) It might help... I got the tab list working though :)
     
  7. Offline

    fireblast709

    It would be getting the variable t in MinecraftServer and adding a player to the List there. The function that displays the count basically gets the size of that list
    Code:java
    1. ((CraftServer)Bukkit.getServer()).getServer().getServerConfigurationManager().players.add(<EntityPlayer I assume?>);
     
  8. Offline

    Lummox

    Has anyone managed make this work?.
     
    John00708 likes this.
  9. Offline

    fireblast709

    here you get the result so far:
    Code:
    12:28:29 [SEVERE] Encountered an unexpected exception NullPointerException
    java.lang.NullPointerException
            at net.minecraft.server.MinecraftServer.r(MinecraftServer.java:542)
            at net.minecraft.server.DedicatedServer.r(DedicatedServer.java:215)
            at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:495)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:428)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:818)
    12:28:29 [SEVERE] This crash report has been saved to: D:\Minecraft_server\.\crash-reports\crash-2012-12-02_12.28.29-server.txt
    CrashReport is useless, so do not bother asking for it :3
     
  10. Offline

    Lummox

    Ouch... :'(
     
  11. Offline

    bobacadodl

    bump...
     
  12. Offline

    Ivan

    Do something with the ServerListPing event. It doesnt give you api to change the max players but
    I'm sure you can manipulate the packet ;).
     
  13. Offline

    bobacadodl

    How would you go about manipulating a packet?
     
  14. Offline

    md_5

    If you just want to add them to the tab list, you can send a PlayerList packet to them.
    Take a look at protocol Lib, or getting the players server handler and sending via that.
     
Thread Status:
Not open for further replies.

Share This Page