Kick a player method?

Discussion in 'Plugin Development' started by Raphfrk, Jan 12, 2011.

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


    Is there a way to kick a player, can't seem to find it?

    Since nobody replied, I am going to assume that it doesn't exist. I have added it as a suggestion.

    I am down to just needing this and thread syncing to allow porting of my plugins.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jan 8, 2016
  2. Offline


    Why do you need thread syncing?
  3. Offline


    I have a plugin which teleports people to other servers.

    This is inherently asynchronous.

    For example,

    a) Player clicks on a sign to open the portal on the other server
    b) plugin connects to other server and sends open portal request
    c) plugin waits for reply
    d) other server receives request
    e) other server updates blocks so portal is open
    f) other server replies
    g) first plugin receives reply
    h) first plugin updates blocks since open gate was successful

    a) happens in main thread on first server
    b) is handled by another thread
    c) must be handled by another thread due to network latency
    d) is a thread that waits for connection request
    e) d has to resync to main thread to update blocks
    f) this is sync from main to plugin (so can do this)
    g) again this is a separate thread
    h) this has to happen in the main thread (so g has to sync to main thread)

    Some of the stuff the plugin does with threads could probably be accomplished other ways.

    However, networking inherently requires wait steps while you wait for a reply.

    This calls for some way to sync to the main thread.

    Anyway, thread syncing is a separate and more complex issue (which the dev team are discussing how best to handle).

    The kick method proposed here is a smaller request. Currently, the only way to kick is to cancel a login attempt.
  4. Offline


    Yeah sounds a mite complicated... and I was unaware that tp to other servers was supported without a client mod.
  5. Offline


    I too wonder how this would work...
  6. Offline


    So... how do you kick someone?
  7. Offline


    It isn't that bad, but resyncing between the threads in both servers is required.

    The plugin includes a client mod as an optional extra (but only a small one).

    Without a client mod, you are kicked with a message telling you to connect to the other server. It still handles inv tranfer and the gate building parts.

    I don't think it is implemented yet.
  8. Offline


    Ok, that seems like a glaring omission, is there a way to send a random array of bytes in an attempt to cause a disconnect then?


    Or perhaps there is a way to pass a /kick command on to the server?
  9. Offline


    Certain inventory updates crash a player's client .. but not sure that is the best plan :)
Thread Status:
Not open for further replies.

Share This Page