Global Banning

Discussion in 'Plugin Development' started by TheNoobiestCrafters, Nov 15, 2012.

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


  2. Offline


    Not sure you can with dropbox since to add stuff to the text file you'd need to have a php file (or something else that'd work) which you can call from java to add something to the bans.txt. Also you'd need to read the text file a lot (like once per minute, definitely ASync).
    You could open a socket between your two servers and sync stuff that way, I'm sure it'd be a lot better then syncing it to and from a txt file on dropbox. Since you'r just editing the banned-players.yml in the server directory you actually don't need to make it plugin either.
  3. Will reading the text file every minute lag my server?
  4. Offline


    Any network activity will use a bit of resources.
    If it's not done asynchronously then it will be very inefficient.
  5. How can I use the php script and ASync, I'm fairly new to all of this.
  6. Offline


    To use a PHP script you need:
    • Knowledge of PHP
    • A web server with PHP installed
    Asynchronous means the task is run in another thread because network stuff locks up the main thread (what the server runs on) until it's finished.
  7. How would I accomplish using sockets to communicate the bans?
  8. Offline


    Try searching for "java socket programming" on Bing uh... Google. You'll also want to search for "java threads".

    Also, it's probably a good idea to make sure you have SSH access to both of your servers (not just a control panel).
Thread Status:
Not open for further replies.

Share This Page