I am making a command for my Java program and I want to make a command like this -
else if(command.star tsWith("banuser ") && p.rights > 1)
{
String user = command.substri ng(5);
int id = Main.m.ge.getId FromName(user);
Player plr = Main.m.ge.playe rs[id];
plr.disconnecte d[0] =
plr.disconnecte d[1] = true;
Thats as far as I got, so far it's saying if my player rights are over 1 it will kick them off the server. I want it to now Write that players name to a file called "BANNEDHOSTS.da t" but I'm lost when I get there...
else if(command.star tsWith("banuser ") && p.rights > 1)
{
String user = command.substri ng(5);
int id = Main.m.ge.getId FromName(user);
Player plr = Main.m.ge.playe rs[id];
plr.disconnecte d[0] =
plr.disconnecte d[1] = true;
Thats as far as I got, so far it's saying if my player rights are over 1 it will kick them off the server. I want it to now Write that players name to a file called "BANNEDHOSTS.da t" but I'm lost when I get there...
Comment