Deny move player to server if game is running

Discussion in 'BungeeCord Plugin Development' started by Drawethree, May 12, 2017.

  1. Question is above. How can I deny player to move to other server when the game in that server is running ?
  2. You'll need to use Plugin Messaging or some other method to declare when a game is started (at the Spigot level), and then listen for the ServerChangeEvent event on the Bungee and check to see if the game is started,and cancel it if it is.
  3. So I need to create a new plugin for bungeecord right ?
  4. Okey, and how can I check if the game is running ?
  5. @ryans1230 just told everything you need to know, you need to usee the plugin messaging api along with a bungeecord plugin, so when the player is in game you will send a message to bungee telling that the player is in-game so then with the bungeecord plugin you will listen for the server switch event and cancel it.
  6. Or you can check the server's motd with socket connection (very important to close that if you done)