Cleanup :)
commentCleanup :)
This commit is contained in:
parent
534a12684e
commit
ef421c9ddb
@ -28,10 +28,6 @@ public class spawnsListener implements Listener{
|
|||||||
if(Integer.parseInt(info[1])!= plugin.config.getInt("maxPlayers")+1){
|
if(Integer.parseInt(info[1])!= plugin.config.getInt("maxPlayers")+1){
|
||||||
String coords = l.getWorld().getName() + " " + (l.getX()+.5) + " " + (l.getY()+1) + " " + (l.getZ()+.5); // fixed (.getName()
|
String coords = l.getWorld().getName() + " " + (l.getX()+.5) + " " + (l.getY()+1) + " " + (l.getZ()+.5); // fixed (.getName()
|
||||||
|
|
||||||
//Jeppa: Hier das Command anpassen!!!??? oder die Daten vorher bearbeiten die übergeben werden? ->done
|
|
||||||
//p.sendMessage(ChatColor.DARK_AQUA + "[ÜbergebeneWerte:] " + ChatColor.RED + "Setting For Arena " + info[0] + " Starting From Point " + info[1]);
|
|
||||||
//p.sendMessage(ChatColor.DARK_AQUA + "[ÜbergebeneWerte:] " + ChatColor.RED + "Coords: " + coords);
|
|
||||||
|
|
||||||
p.performCommand("startpoint " + info[0] + " " + info[1] + " " + coords);
|
p.performCommand("startpoint " + info[0] + " " + info[1] + " " + coords);
|
||||||
|
|
||||||
if(Integer.parseInt(info[1])>= plugin.config.getInt("maxPlayers")){
|
if(Integer.parseInt(info[1])>= plugin.config.getInt("maxPlayers")){
|
||||||
|
@ -23,11 +23,10 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
|
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
|
||||||
Player p = (Player) sender;
|
Player p = (Player) sender;
|
||||||
String ThisWorld = p.getWorld().getName();
|
String ThisWorld = p.getWorld().getName();
|
||||||
for(i = 1; i <= plugin.worldsNames.size(); i++){ //worldsNames-Inhalt (integer) entspricht der Arenanummer !!
|
for(i = 1; i <= plugin.worldsNames.size(); i++){
|
||||||
if(plugin.worldsNames.get(i)!= null){ //Jeppa: damit das so geht müssen die Arenen aber wirklich durchgezählt sein!!
|
if(plugin.worldsNames.get(i)!= null){
|
||||||
if (plugin.worldsNames.get(i).equals(ThisWorld)){
|
if (plugin.worldsNames.get(i).equals(ThisWorld)){
|
||||||
a=i; // now 'a' is the arenanumber of THIS(current) map , only available if this map already has min. one startpoint!
|
a=i; // now 'a' is the arenanumber of THIS(current) map , only available if this map already has min. one startpoint!
|
||||||
//p.sendMessage(ChatColor.GREEN + "[HungerArena]: Diese Map[KurzeAbfrage!! in startpoint]: "+ ThisWorld + " ist nummer: "+ a);
|
|
||||||
NoPlayerSpawns = false; // mapname found -> there are PlayerSpawns...--> map seems playable
|
NoPlayerSpawns = false; // mapname found -> there are PlayerSpawns...--> map seems playable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -45,7 +44,7 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
a = Integer.valueOf(args[0]);
|
a = Integer.valueOf(args[0]);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
p.sendMessage(ChatColor.RED + "Argument not an integer!");
|
p.sendMessage(ChatColor.RED + "Argument not an integer!");
|
||||||
return true; //Jeppa: true??? false ???
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
String world = args[2];
|
String world = args[2];
|
||||||
@ -90,7 +89,7 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
a = Integer.valueOf(args[0]);
|
a = Integer.valueOf(args[0]);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
p.sendMessage(ChatColor.RED + "Argument not an integer!");
|
p.sendMessage(ChatColor.RED + "Argument not an integer!");
|
||||||
return true; //Jeppa: wieso true???
|
return true;
|
||||||
}
|
}
|
||||||
if(i >= 1 && i <= plugin.config.getInt("maxPlayers")){
|
if(i >= 1 && i <= plugin.config.getInt("maxPlayers")){
|
||||||
if(plugin.restricted && !plugin.worlds.contains(p.getWorld().getName())){
|
if(plugin.restricted && !plugin.worlds.contains(p.getWorld().getName())){
|
||||||
@ -158,15 +157,12 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
start = plugin.config.getInt("maxPlayers")+1;
|
start = plugin.config.getInt("maxPlayers")+1;
|
||||||
p.sendMessage(ChatColor.DARK_AQUA + "[HungerArena] " + ChatColor.RED + "Begin Setting For Arena " + a + " Starting From Point " + sloc);
|
p.sendMessage(ChatColor.DARK_AQUA + "[HungerArena] " + ChatColor.RED + "Begin Setting For Arena " + a + " Starting From Point " + sloc);
|
||||||
plugin.setting.put(p.getName(), a + "-" + sloc);
|
plugin.setting.put(p.getName(), a + "-" + sloc);
|
||||||
//--> Mit angabe der Arena wird NICHT der erste punkt gesetzt oder weitergemacht, sondern das Wekzeug aktiviert!
|
|
||||||
//dem player hier noch das "Werkzeug" per Befehl in die Hand drücken??? TODO
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
p.sendMessage(ChatColor.DARK_AQUA + "[HungerArena] " + ChatColor.RED + "Begin Setting For Arena " + a + " Starting From Point " + 1);
|
p.sendMessage(ChatColor.DARK_AQUA + "[HungerArena] " + ChatColor.RED + "Begin Setting For Arena " + a + " Starting From Point " + 1);
|
||||||
plugin.setting.put(p.getName(), a + "-" + 1);
|
plugin.setting.put(p.getName(), a + "-" + 1);
|
||||||
//dem player hier noch das "Werkzeug" per Befehl in die Hand drücken??? TODO
|
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
sender.sendMessage(ChatColor.BLUE + "This Can Only Be Sent As A Player");
|
sender.sendMessage(ChatColor.BLUE + "This Can Only Be Sent As A Player");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user