Simple Password Protected VIP Teleport Source

Discussion in 'Resources' started by lbjdaking23, Aug 5, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    lbjdaking23

    Simple Password Protected VIP Teleport
    Well I made this for my server and thought that some people might like/want it so here it is the full source.

    Code:
    package omg.LBJDaKing23.one;
    import java.util.logging.Logger;
    
    import org.bukkit.Location;
    import org.bukkit.ChatColor;
    import org.bukkit.World;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.plugin.java.JavaPlugin;
    
    public class one extends JavaPlugin {
        Logger log = Logger.getLogger("Minecraft");
    
        public void onDisable(){
            log.info("VIP Teleport is Disabled!");
        }
    
        public void onEnable() {
            log.info("VIP Teleport is Enabled!");
        }
    
        public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
            if(!(sender instanceof Player)) {
                return false;
            }
    
            Player player = (Player) sender;
            World Server = player.getWorld();
            Location VIParea = new Location(Server, -1168.6736449273196, 76.62000000476837, -626.4802719072349);
    
            if(label.equalsIgnoreCase("vip")){
                if (args.length == 0){
                            sender.sendMessage(ChatColor.YELLOW + "Incorrect VIP Password!");
                }
                else if(args[0].equalsIgnoreCase("ExclusivePass1")){
                sender.sendMessage(ChatColor.YELLOW + "You Are Now Getting Teleported To The VIP Area!");
                player.teleport(VIParea);
                return true;
                }
                else {
                    sender.sendMessage(ChatColor.YELLOW + "Incorrect VIP Password!");
                }
            }
            return true;
        }
    }
    and you can just change
    Code:
    -1168.6736449273196, 76.62000000476837, -626.4802719072349
    to your x, y, and z!
    Also you can change
    Code:
    ExclusivePass1
    to a new password!
     
  2. Offline

    MrMinecraftGuy

    I have no idea how to do any of this, could you just make it into a downloadable plugin on the plugin list please?
     
Thread Status:
Not open for further replies.

Share This Page