Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// BUKKIT PLUGIN :
- /// http://dev.bukkit.org/bukkit-plugins/playertrackerplus/
- /// EXAMPLE
- public class TestClass extends JavaPlugin{
- TrackerAPI api = new TrackerAPI();
- public boolean onCommand(CommandSender sender,Command cmd, String cmdlabel, String[] args) {
- if(cmd.getName().equalsIgnoreCase("near")) {
- api.TrackNearestPlayer(p);
- }
- if(cmd.getName().equalsIgnoreCase("random")) {
- int random = new Random().nextInt(Bukkit.getOnlinePlayers().length);
- Player randomPlayer = Bukkit.getOnlinePlayers()[random];
- api.TrackPlayer(p, randomPlayer);
- }
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment