Untitled diff

Created Diff never expires
25 removals
Lines
Total
Removed
Words
Total
Removed
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
37 lines
28 additions
Lines
Total
Added
Words
Total
Added
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
40 lines
package me.TheShermanTanker.Lobby;
package me.TheShermanTanker.Lobby;


import org.bukkit.Bukkit;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.entity.Player;
import org.bukkit.Location;
import org.bukkit.Location;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.plugin.java.JavaPlugin;


public class Lobby extends JavaPlugin {
public class Lobby extends JavaPlugin {

@Override
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
public void onEnable() {
Player player = (Player) sender;
//Always good to have, especially since you're extending JavaPlugin
if (cmd.getName().equalsIgnoreCase("lobby")) {
}


if (args.length == 0) {
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
if (cmd.getName().equalsIgnoreCase("lobby")) {
sender.sendMessage(
if(!(sender instanceof Player)) {
(ChatColor.RED + "You must specify the lobby!");
sender.sendMessage("you aren't a player m8");
return true;
return true;
}
}
}
Player player = (Player) sender; //Now they're a playa, ya feel me?
}
if (args.length == 0) {
if (args[0].equalsIgnoreCase("MegaWalls")) {
sender.sendMessage(ChatColor.RED + "You must specify the lobby!");
return true;
sender.sendMessage(ChatColor.GREEN + "You have join the Mega Walls lobby!");
}
sender.teleport(new location(bukkit.getWorld(Dragonkeep,-255,7,-125)));
else if(args.length == 1) {
return true;
if (args[0].equalsIgnoreCase("MegaWalls")) {
} else {
player.sendMessage(ChatColor.GREEN + "You have join the Mega Walls lobby!");
sender.sendMessage(ChatColor.RED + "Im sorry, I cant find the lobby you requested");
player.teleport(new Location(Bukkit.getWorld("Dragonkeep"),-255,7,-125));
}
return true;
}
} else {
}
player.sendMessage(ChatColor.RED + "Im sorry, I cant find the lobby you requested");
return true;
}
}
}
}
return true;
}
}