package main;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import javax.xml.stream.Location;
public class SurvivalGames<Player, Inventory, FileConfiguration, Command, CommandSender> extends JavaPlugin{
public String prefix = "$7[§bSurvivalGames§7]";
public ArrayList<Player> dead = new ArrayList<Player>();
public ArrayList<Player> online = new ArrayList<Player>();
public HashMap<Location, Inventory> sgchest = new HashMap<Location, Inventory> ();
public File file = new File ("plugins/survivalGames", "config.yml");
public FileConfiguration cfg = YamlConfiguration.loadCofiguration(this.file);
public boolean joinable;
public boolean onspawn;
public boolean friendly;
public int expid;
public int exp;
public int startid;
public int start;
public int friede;
public int friedeid;
public void onEnable() {
System.out.println("SurvivalGames Von BennyLP/Ender Aktiviert!");
this.joinable = true;
this.friendly = true;
this.onspawn = false;
this.exp = 120;
this.start = 15;
this.friede = 20;
public boolean onCommand(CommandSender sender, Command cmd, String label,
String[] args {
Player p = (Player)sender;
if(cmd.getName().equalsIgnoreCase("sg")) {
if(args.length == 0) {
p.sendMessage("§7Ein SurvivalGames Plugin Von BennyLP/XxEnderm0nxX Geschrieben Viel Spass Wünsche Ich BennyLP Euch Mit Meinem Plugin :D.");
if(args.length == 1) {
if(args[0] .equalsIgnoreCase("start")) {
if(p.hasPermission ("sg.start")) {
this.exp = 11;
if(args[0].equalsIgnoreCase("setlobby")) {
if(p.hasPermission ("sg.setlobby")) {
this.cfg.set("Survivalgames.Lobby.World", p.getWorld().getname()
this.cfg.set("Survivalgames.Lobby.X", Double.valueOf(p.getLocation().getX()));
this.cfg.set("Survivalgames.Lobby.Y", Double.valueOf(p.getLocation().gety()));
this.cfg.set("Survivalgames.Lobby.Z", Double.valueOf(p.getLocation().getZ()));
this.cfg.set("Survivalgames.Lobby.Yaw", Double.valueOf(p.getLocation().getYaw()));
this.cfg.set("Survivalgames.Lobby.Pitch", Double.valueOf(p.getLocation().getPitch()));
try {
this.cfg.save(this.file);
p.sendMessage(this.prefix + "§aDie Lobby wurde gesetzt.");
catch (IOException e) {
e.printStackTrace();
}
}
}
{
if(args[0].equalsIgnoreCase("setlobby")) {
if(p.hasPermission ("sg.setspawn"))
this.cfg.set("Survivalgames.Spawn.World", p.getWorld().getname(
this.cfg.set("Survivalgames.Spawn.Double.valueOf(p.getLocation().getX()));
this.cfg.set("Survivalgames.Spawn.Double.valueOf(p.getLocation().gety()));
this.cfg.set("Survivalgames.Spawn.Double.valueOf(p.getLocation().getZ()));
this.cfg.set("Survivalgames.Spawn.Double.valueOf(p.getLocation().get.Yaw()));
this.cfg.set("Survivalgames.Spawn.Double.valueOf(p.getLOcation().getPitch()));
}
return false;