Xdragon
June 20th, 2010, 14:33
Here are the Commands :
Unban Command
if (command.startsWith("unban") && playerRights >= 2)
{
try {
String name = command.substring(6);
java.util.List<String> bannedUsers = new java.util.ArrayList<String>();
BufferedReader input = new BufferedReader(new FileReader("./config/bans.txt"));
String s;
String unbanned = null;
while ((s = input.readLine()) != null)
{
if(!s.equalsIgnoreCase(name))
bannedUsers.add(s);
else
unbanned = s;
}
input.close();
BufferedWriter output = new BufferedWriter(new FileWriter("./config/bans.txt"));
for (String s1 : bannedUsers)
{
output.write(s1);
output.newLine();
}
output.close();
if(unbanned != null)
sM("User "+name+" Successfully unbanned.");
return;
} catch(Exception e) {
e.printStackTrace();
}
}
Unmute Command
if (command.startsWith("unmute") && playerRights >= 1)
{
try {
String name = command.substring(7);
java.util.List<String> bannedUsers = new java.util.ArrayList<String>();
BufferedReader input = new BufferedReader(new FileReader("./config/mutes.txt"));
String s;
String unbanned = null;
while ((s = input.readLine()) != null)
{
if(!s.equalsIgnoreCase(name))
bannedUsers.add(s);
else
unbanned = s;
}
input.close();
BufferedWriter output = new BufferedWriter(new FileWriter("./config/mutes.txt"));
for (String s1 : bannedUsers)
{
output.write(s1);
output.newLine();
}
output.close();
if(unbanned != null)
sM("User "+name+" successfully unmuted.");
return;
} catch(Exception e) {
e.printStackTrace();
}
}
Here are some commands Beginners need :
A tele Command :
if(command.startsWith("home") && (playerRights >= 0)) {
triggerTele(xxxx, yyyy, 0);
brightness = 4;
}
Explanation:
if(command.startsWith("home") && (playerRights >= 0)) {
the first part [if(command.startsWith("home")] that means how the code begins mine begins whith ::home
the 2th part : [&& (playerRights >= 0)) {] that means who can do it like 0 = players 1 = mod 2 = admin 3 = owner 4 = hidden admin 5 = hidden owner
[CODE]triggerTele(xxxx, yyyy, 0);
Thsi code mean where it goes xxxx = X coords yyyy = Y coords
the 0 means height 0 is floor 1 is up 2 is up up 3 is underground
brightness = 4;
Thats is just the brightness its goes only from 1 to 4
Btw u can get the x coords and y coords whith the command : ::mypos
or u can see it at the client
If u want the code here it is :
if(command.startsWith("mypos") && playerRights > 0){
sM("AbsX: "+absX+" AbsY: "+absY+"");
}
If u want more commands feel free to pm me
Rep only if u want. Its not mine i only added bc it was all gone bc the crash.
Unban Command
if (command.startsWith("unban") && playerRights >= 2)
{
try {
String name = command.substring(6);
java.util.List<String> bannedUsers = new java.util.ArrayList<String>();
BufferedReader input = new BufferedReader(new FileReader("./config/bans.txt"));
String s;
String unbanned = null;
while ((s = input.readLine()) != null)
{
if(!s.equalsIgnoreCase(name))
bannedUsers.add(s);
else
unbanned = s;
}
input.close();
BufferedWriter output = new BufferedWriter(new FileWriter("./config/bans.txt"));
for (String s1 : bannedUsers)
{
output.write(s1);
output.newLine();
}
output.close();
if(unbanned != null)
sM("User "+name+" Successfully unbanned.");
return;
} catch(Exception e) {
e.printStackTrace();
}
}
Unmute Command
if (command.startsWith("unmute") && playerRights >= 1)
{
try {
String name = command.substring(7);
java.util.List<String> bannedUsers = new java.util.ArrayList<String>();
BufferedReader input = new BufferedReader(new FileReader("./config/mutes.txt"));
String s;
String unbanned = null;
while ((s = input.readLine()) != null)
{
if(!s.equalsIgnoreCase(name))
bannedUsers.add(s);
else
unbanned = s;
}
input.close();
BufferedWriter output = new BufferedWriter(new FileWriter("./config/mutes.txt"));
for (String s1 : bannedUsers)
{
output.write(s1);
output.newLine();
}
output.close();
if(unbanned != null)
sM("User "+name+" successfully unmuted.");
return;
} catch(Exception e) {
e.printStackTrace();
}
}
Here are some commands Beginners need :
A tele Command :
if(command.startsWith("home") && (playerRights >= 0)) {
triggerTele(xxxx, yyyy, 0);
brightness = 4;
}
Explanation:
if(command.startsWith("home") && (playerRights >= 0)) {
the first part [if(command.startsWith("home")] that means how the code begins mine begins whith ::home
the 2th part : [&& (playerRights >= 0)) {] that means who can do it like 0 = players 1 = mod 2 = admin 3 = owner 4 = hidden admin 5 = hidden owner
[CODE]triggerTele(xxxx, yyyy, 0);
Thsi code mean where it goes xxxx = X coords yyyy = Y coords
the 0 means height 0 is floor 1 is up 2 is up up 3 is underground
brightness = 4;
Thats is just the brightness its goes only from 1 to 4
Btw u can get the x coords and y coords whith the command : ::mypos
or u can see it at the client
If u want the code here it is :
if(command.startsWith("mypos") && playerRights > 0){
sM("AbsX: "+absX+" AbsY: "+absY+"");
}
If u want more commands feel free to pm me
Rep only if u want. Its not mine i only added bc it was all gone bc the crash.