Disconnected by server, Nope!

Discussion in 'Plugin Development' started by vildaberper, May 14, 2011.

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

    vildaberper

    Whenever I mount an arrow, I cant unmount it again.
    Its working as expected when mounting it, but when I unmount it I get this in the console:
    Code:
    vildaberper was caught trying to set an invalid position.
    and I get kicked for this reason:
    Code:
    Disconnected by server
    
    Nope!
    Anyone know why?
    Is there a craftbukkit "hacking check" that I have to override?
     
  2. Offline

    chronopolis

    Yes there is a new anti-hack measure in the newer versions of MC - you can disable it in your server.properties by setting allow-flight to false :cool:
     
  3. Offline

    Shamebot

  4. Offline

    vildaberper

    Do you know where that anti-hack measure is?
    Id like to override that, if its possible. :D

    Thanks!
    Ill just remove the kick.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
  5. have you tried teleporting the player to the arrow location, rather than just unmounting it?
    that message should only come up when the location is wrong (infinity, NAN, etc)
     
  6. Offline

    Shamebot

    I wonder why it happens.
    Edit: What if you remove the arrow entity?
     
  7. Offline

    vildaberper

    I tried that.

    Tried that too.

    I get kicked like a second after I unmount it. Its extremely wierd. :(

    EDIT: I dont think its that, I get kicked even after overriding.
     
  8. Try logging the x,y,z,pitch,yaw of the player.getLocation() right after demounting it
    Maybe that'll reveal some invalid data

    edit:
    Code:
    System.out.println(loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ", " + loc.getPitch() + ", " + loc.getYaw());
    
    i thought
     
    chronopolis likes this.
  9. Offline

    Shamebot

    How did you do it?
    Code:
    ((CraftPlayer)player).getHandle().netServerHandler = new NetServerHandler()
    {
        @Override
        public void a(Packet10Flying packet10flying)
        {
            ....
    
        }
    } ;
    This way?
    Strange is, the invalid variables are from a packet10 flying, not from the player?
     
  10. Thats true, yeah
    Maybe reset pitch/yaw of the arrow before demounting, round x/y/z.
    just my first thoughts about it
     
  11. Offline

    Shamebot

    Hmm not sure, if the packet is received from the client it probably won't work, but I don't know if it's in or outgoing.
    Rather looks like it's from the client:
    " was caught trying to crash the server with an invalid position."
    Edit: And he said overriding it wouln't work, but I couldn't find any other code containing the error message on github.
     
  12. @Shamebot I actually think it sets the position, the client goes to there and from that position it gets invalid positions. not sure though
     
  13. Offline

    vildaberper

    Oh, and I get kicked even if allow-flight is set to true.
    So I guess pitch or yaw is NaN or something like that.

    EDIT: Solved it, you cannot do arrow.eject() without getting kicked. Thought I tried that. "/
     
  14. Offline

    Shamebot

    So you did you find a way to get it working?
    BTW What do you want to do? A plugin where you shoot an arrow an fly on it? Would be cool.
     
  15. Offline

    vildaberper

    Just teleport to the players location instead of ejecting the arrow. :)
    Oh, Im just messing around. Its in the dev build of DefaultCommands if you want to try it. /sit :)
     
  16. Offline

    DreadKyller

    one way you could override this right in the plugin is the same way I overrided the "You moved too quickly :( (Hacking?)" kick, I added a listener for the event PLAYER_KICK and in there i checked to see if the cause was "You moved too quickly :( (Hacking?)"

    PHP:
        public void onPlayerKick(PlayerKickEvent event){
            if(
    event.getLeaveMessage().equalsIgnoreCase("Nope!)")||event.getReason().equalsIgnoreCase("Nope!")){
                
    event.setCancelled(true);
            }
     
  17. Offline

    vildaberper

    Oh cool, I didnt think of that. :)
     
  18. Offline

    DreadKyller

    only problem is the console will still print the error, but that can be fixed with a filter I believe
     
  19. Offline

    vildaberper

  20. Offline

    simonas0505

    My friend sat in a chair and then my other friend destroyed the chair. The first friend did get an Nope! error and then he never could join the server again. Every time it said Nope!
    Please HELP ME! I tried to reinnstall bukkit too.:(
     
  21. Offline

    IanM_56

    This has been happening in 1.6 updates with the new dismount feature, especially when dismounting a stair block problems occur. For me my server thinks I try crashing it when I dismount a stair block.
     
Thread Status:
Not open for further replies.

Share This Page