picaxmad
Spectator
- Joined
- Aug 3, 2013
- Messages
- 5
- Reaction score
- 0
How many times has a game just been about to start and you get the message "Kicked to make space for Donor" or the servers are busy and you click on a sign as soon as it says looby and the servers already full. The idea is that when you get kicked or you click on the join lobby sign very shortly after you can join you get told the server is full. So maybe a system should be that people have a priority level (they get a priority point whenever one of the above 2 things happen) and if you have priority points you kick the person with the lowest priority points on the server. Note when you kick someone with your priority points you loose your priority points.
I know some java and the below code is a way you could in ttheory do it (I don't know anything about the minecraft dev api)
public int kick_player(player p1, player p2) { //requires 2 player variables to check against
if (p1.points > p2.points) {
//do some code here to kick player 2
return 1; //means that kicking was success
}
else if (p1.points == p2.points){ //have the same priority points
//code to kick player 2
return 1; //kicking was success
}
else { //player 2 has greater points
return 0;
}
}
/**
* Some examples of how it may work.
*
* p1.points = 10;
* p2.points = 10;
* p2.points += kick_player(p1,p2); //p2 now equals 11
*/
I know some java and the below code is a way you could in ttheory do it (I don't know anything about the minecraft dev api)
public int kick_player(player p1, player p2) { //requires 2 player variables to check against
if (p1.points > p2.points) {
//do some code here to kick player 2
return 1; //means that kicking was success
}
else if (p1.points == p2.points){ //have the same priority points
//code to kick player 2
return 1; //kicking was success
}
else { //player 2 has greater points
return 0;
}
}
/**
* Some examples of how it may work.
*
* p1.points = 10;
* p2.points = 10;
* p2.points += kick_player(p1,p2); //p2 now equals 11
*/