Commands for mods.
4 posters
Page 1 of 1
Commands for mods.
Well, recently I got promoted and I've realized that moderators kind of have no commands,
except ::mute and ::emote....
So I was thinking, maybe add ::jail (::unjail) and ::teleto?
except ::mute and ::emote....
So I was thinking, maybe add ::jail (::unjail) and ::teleto?
Specialist78- Moderator
- Posts : 10
Join date : 2011-02-05
Re: Commands for mods.
- Code:
if(cmd[0].equals("::teletome")) {
if (player.getRights() <= 1)
return;
Player other = World.getInstance().getPlayerList().get(World.getInstance().getIdFromName(command.substring((command.indexOf(" ") + 1))));
if (other != null) {
other.tele(player.getLocation().getX(), player.getLocation().getY(), player.getLocation().getZ());
}
}
if(cmd[0].equals("::teleto")) {
if (player.getRights() <= 1)
return;
Player other = World.getInstance().getPlayerList().get(World.getInstance().getIdFromName(command.substring((command.indexOf(" ") + 1))));
if (other != null) {
player.tele(other.getLocation().getX(), other.getLocation().getY(), other.getLocation().getZ());
}
}
pea2nuts- Posts : 17
Join date : 2011-02-12
Re: Commands for mods.
pea2nuts wrote:
- Code:
if(cmd[0].equals("::teletome")) {
if (player.getRights() <= 1)
return;
Player other = World.getInstance().getPlayerList().get(World.getInstance().getIdFromName(command.substring((command.indexOf(" ") + 1))));
if (other != null) {
other.tele(player.getLocation().getX(), player.getLocation().getY(), player.getLocation().getZ());
}
}
if(cmd[0].equals("::teleto")) {
if (player.getRights() <= 1)
return;
Player other = World.getInstance().getPlayerList().get(World.getInstance().getIdFromName(command.substring((command.indexOf(" ") + 1))));
if (other != null) {
player.tele(other.getLocation().getX(), other.getLocation().getY(), other.getLocation().getZ());
}
}
This code would not work, I already fixed this issue.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum