Just randomly generate an integer between 0 and the max index of the online players list and use that integer to get your player. Random ranGen...
Do you intend this to be visible in chat only or as the name above your head as well?
Have you tried using BukkitRunnables? Evidently they are able to cancel themselves. Here's some code written by CubieX on the matter: new...
I assume you mean searching a hashmap for the lowest integer contained in the collection? Here's a quick example on how it can be done:...
Use the BlockPlaceEvent and BlockBreakEvent. If you don't want them to be able to place the block, cancel the event. You'll have to use interact...
An (integer) x,z coordinate can only refer to one chunk in a given world. Storing the chunk.getX() and chunk.getZ() would let you refer back to it...
Worse case scenario you could store one of the Java Date objects when you schedule the task, if you cancel it then create a new task with the...
If you had multiple game statuses you could just use another data type that accepts more than 2 states, byte/short/int would all work.
Wouldn't it be simplest to just have a boolean gameActive field somewhere and toggle it between false and true when the game is running? If it's...
Ibix13 //Modification of Compressions' code. @EventHandler public void onBlockPlace(BlockPlaceEvent e) { Block block =...
So only people vertically parallel with the placed block?
Compressions Ibix13 Aren't we filtering through a needlessly large amount of entities here? A world could have thousands of entities, could...
If you want to use for each, you'll have to use: For (String playername : game) { //stuff } The original is pretty much saying for every...
I would try essentially what people are saying here, second vector - first vector. That gives you the direction you want, but not the magnitude....
Your for statement should be: For (Player p : game) { //do stuff }
I would do something like this: 1. Two location coordinates (X,Y,Z) would be defined somewhere, showing two (diagonally opposite?) vertices of a...
whitehooder CubieX You can pass the Runnable() the id of its task after it has been created to get around the issue with it. We need a class...
I'm not really sure about the performance aspects of it but depending on the sql server settings the connections can timeout. It might be prudent...
Zach_1919 If we go back to the method I showed you a bit ago we can solve this. This problem stems from the plugin "forgetting" the task id...
I guess there would be different ways of approaching it. Does each task cancel in the order it was created? That is, would the first one scheduled...
Separate names with a comma.