hotfixes
Signed-off-by: Yaruma3341 <yaruma3341@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
231d3fcb1c
Commit
92c519f445
@ -159,31 +159,6 @@ public class AkCommand implements CommandExecutor {
|
|||||||
Fight.getFightPlayer(player).setKit(kit);
|
Fight.getFightPlayer(player).setKit(kit);
|
||||||
player.sendMessage(FightSystem.PREFIX + "§aDu hast nun das Kit §6" + args[1] + "§a!");
|
player.sendMessage(FightSystem.PREFIX + "§aDu hast nun das Kit §6" + args[1] + "§a!");
|
||||||
|
|
||||||
} else if(args[0].equalsIgnoreCase("schem")) {
|
|
||||||
FightTeam fightTeam = Fight.getPlayerTeam(player);
|
|
||||||
if(fightTeam == null) {
|
|
||||||
player.sendMessage(FightSystem.PREFIX + "§cDu bist in keinem Team!");
|
|
||||||
return false;
|
|
||||||
}else if(fightTeam.hasSchematic()) {
|
|
||||||
player.sendMessage(FightSystem.PREFIX + "§cDie Schematic ist bereits gewählt!");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Schematic schem = Schematic.getSchemFromDB(args[1], player.getUniqueId());
|
|
||||||
if(schem == null) {
|
|
||||||
schem = Schematic.getSchemFromDB(args[1], 0);
|
|
||||||
if(schem == null){
|
|
||||||
player.sendMessage(FightSystem.PREFIX + "§cDiese Schematic gibt es nicht!");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(schem.getSchemType() != Config.SchematicType) {
|
|
||||||
player.sendMessage(FightSystem.PREFIX + "§cDiese Schematic ist kein " + Config.GameName);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
fightTeam.setSchematic(schem);
|
|
||||||
Fight.getPlayerTeam(player).broadcast(FightSystem.PREFIX + "Schematic §6" + args[1] + " §8wird für den Kampf verwendet!");
|
|
||||||
} else if(args[0].equalsIgnoreCase("addkit")){
|
} else if(args[0].equalsIgnoreCase("addkit")){
|
||||||
if(WarkingUser.get(player.getUniqueId()).getUserGroup() != UserGroup.Developer){
|
if(WarkingUser.get(player.getUniqueId()).getUserGroup() != UserGroup.Developer){
|
||||||
sendHelp(player);
|
sendHelp(player);
|
||||||
@ -214,6 +189,41 @@ public class AkCommand implements CommandExecutor {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}else if(args.length == 3) {
|
||||||
|
if(args[0].equalsIgnoreCase("schem")) {
|
||||||
|
FightTeam fightTeam = Fight.getPlayerTeam(player);
|
||||||
|
if(fightTeam == null) {
|
||||||
|
player.sendMessage(FightSystem.PREFIX + "§cDu bist in keinem Team!");
|
||||||
|
return false;
|
||||||
|
}else if(fightTeam.hasSchematic()) {
|
||||||
|
player.sendMessage(FightSystem.PREFIX + "§cDie Schematic ist bereits gewählt!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Schematic schem;
|
||||||
|
if(args[2].equalsIgnoreCase("public")) {
|
||||||
|
schem = Schematic.getSchemFromDB(args[1], WarkingUser.get(0).getUUID());
|
||||||
|
} else if(args[2].equalsIgnoreCase("private")) {
|
||||||
|
schem = Schematic.getSchemFromDB(args[1], player.getUniqueId());
|
||||||
|
} else
|
||||||
|
return false;
|
||||||
|
|
||||||
|
|
||||||
|
if(schem == null) {
|
||||||
|
schem = Schematic.getSchemFromDB(args[1], 0);
|
||||||
|
if(schem == null){
|
||||||
|
player.sendMessage(FightSystem.PREFIX + "§cDiese Schematic gibt es nicht!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(schem.getSchemType() != Config.SchematicType) {
|
||||||
|
player.sendMessage(FightSystem.PREFIX + "§cDiese Schematic ist kein " + Config.GameName);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
fightTeam.setSchematic(schem);
|
||||||
|
Fight.getPlayerTeam(player).broadcast(FightSystem.PREFIX + "Schematic §6" + args[1] + " §8wird für den Kampf verwendet!");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
sendHelp(player);
|
sendHelp(player);
|
||||||
}
|
}
|
||||||
|
@ -254,7 +254,7 @@ public class FightTeam {
|
|||||||
schematics.setBold(true);
|
schematics.setBold(true);
|
||||||
|
|
||||||
schematics.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("Schematic benutzen...").create()));
|
schematics.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("Schematic benutzen...").create()));
|
||||||
schematics.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/ak schem " + schematic.getSchemName()));
|
schematics.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/ak schem " + schematic.getSchemName() + (publicSchematics ? " public" : " private")));
|
||||||
|
|
||||||
player.spigot().sendMessage(schematics);
|
player.spigot().sendMessage(schematics);
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ public class PlayerMoveListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Check under Arena
|
//Check under Arena
|
||||||
if(to.getBlockY() <= Config.underArenaBorder) {
|
if(to.getY() <= Config.underArenaBorder) {
|
||||||
if(fightTeam == null){
|
if(fightTeam == null){
|
||||||
player.teleport(from);
|
player.teleport(from);
|
||||||
player.sendMessage(FightSystem.PREFIX + "§cDu darfst die Arena nicht verlassen!");
|
player.sendMessage(FightSystem.PREFIX + "§cDu darfst die Arena nicht verlassen!");
|
||||||
|
@ -71,8 +71,6 @@ public class WinconditionTechKO {
|
|||||||
FightSystem.getPlugin().setSpectateState(Fight.getRedTeam());
|
FightSystem.getPlugin().setSpectateState(Fight.getRedTeam());
|
||||||
FightSystem.getPlugin().getWaterRemover().stop();
|
FightSystem.getPlugin().getWaterRemover().stop();
|
||||||
}
|
}
|
||||||
Bukkit.broadcastMessage("RedList: " + teamRedWater.size());
|
|
||||||
Bukkit.broadcastMessage("BlueList: " + teamBlueWater.size());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void removeWater() {
|
public static void removeWater() {
|
||||||
@ -83,7 +81,6 @@ public class WinconditionTechKO {
|
|||||||
Location location = (Location) itrRed.next();
|
Location location = (Location) itrRed.next();
|
||||||
if(location.getBlock().getType() != Material.WATER && location.getBlock().getType() != Material.STATIONARY_WATER) {
|
if(location.getBlock().getType() != Material.WATER && location.getBlock().getType() != Material.STATIONARY_WATER) {
|
||||||
itrRed.remove();
|
itrRed.remove();
|
||||||
Bukkit.broadcastMessage("red remove" + teamRedWater.size());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(teamRedWater.isEmpty()) {
|
if(teamRedWater.isEmpty()) {
|
||||||
@ -99,7 +96,6 @@ public class WinconditionTechKO {
|
|||||||
Location location = (Location) itrBlue.next();
|
Location location = (Location) itrBlue.next();
|
||||||
if(location.getBlock().getType() != Material.WATER && location.getBlock().getType() != Material.STATIONARY_WATER) {
|
if(location.getBlock().getType() != Material.WATER && location.getBlock().getType() != Material.STATIONARY_WATER) {
|
||||||
itrBlue.remove();
|
itrBlue.remove();
|
||||||
Bukkit.broadcastMessage("blue remove" + teamBlueWater.size());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(teamBlueWater.isEmpty()) {
|
if(teamBlueWater.isEmpty()) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren