SteamWar/FightSystem
Archiviert
13
1

added new command; hotfixes;

Signed-off-by: Yaruma3341 <yaruma3341@gmail.com>
Dieser Commit ist enthalten in:
Yaruma3341 2019-04-13 18:00:23 +02:00
Ursprung 59418b8001
Commit d9b6c124eb
2 geänderte Dateien mit 19 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -104,7 +104,7 @@ public class AkCommand implements CommandExecutor {
if(fightPlayer.isLeader() && fightTeam.isPlayerInTeam(target)){
fightTeam.removePlayer(target);
player.sendMessage(FightSystem.PREFIX + "§aDu hast den Spieler §6" + target.getName() + " §aaus dem Team entfernt!");
target.sendMessage(FightSystem.PREFIX + "§cDu wurdest auf deinem Team entfernt!");
target.sendMessage(FightSystem.PREFIX + "§cDu wurdest aus deinem Team entfernt!");
}
}
}
@ -168,6 +168,19 @@ public class AkCommand implements CommandExecutor {
return false;
}
KitManager.saveInventory(args[1], player);
} else if(args[0].equalsIgnoreCase("schemlist") && FightSystem.getPlugin().getFightState() == FightState.SETUP) {
try {
FightTeam fightTeam = Fight.getPlayerTeam(player);
if(fightTeam != null) {
if(fightTeam.getFightPlayer(player).isLeader()) {
Fight.getPlayerTeam(player).sendPlayerSchematicList(Integer.parseInt(args[1]), 15, player, Config.SchematicType);
return false;
}
}
} catch (NumberFormatException ex) {
player.sendMessage(FightSystem.PREFIX + "§cDu musst eine Seitenzahl angeben!");
return false;
}
}
}else{
sendHelp(player);

Datei anzeigen

@ -245,7 +245,7 @@ public class FightTeam {
schematics.setBold(true);
schematics.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("Schematic benutzen...").create()));
schematics.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/schem info " + schematic.getSchemName()));
schematics.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/ak schem " + schematic.getSchemName()));
player.spigot().sendMessage(schematics);
}
@ -256,24 +256,24 @@ public class FightTeam {
TextComponent nextPage = new TextComponent("Nächste Seite >>");
nextPage.setColor(ChatColor.RED);
nextPage.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("§6Nächste Seite...").create()));
nextPage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/schem list 1"));
nextPage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/ak schemlist 1"));
player.spigot().sendMessage(nextPage);
} else if((currPage + 1) == pages) {
TextComponent beforePage = new TextComponent("<< Vorherige Seite");
beforePage.setColor(ChatColor.RED);
beforePage.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("§6Vorherige Seite...").create()));
beforePage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/schem list " + (currPage - 1)));
beforePage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/ak schemlist " + (currPage - 1)));
player.spigot().sendMessage(beforePage);
} else {
TextComponent beforePage = new TextComponent("<< Seite ");
beforePage.setColor(ChatColor.RED);
beforePage.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("§6Vorherige Seite...").create()));
beforePage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/schem list " + (currPage - 1)));
beforePage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/ak schemlist " + (currPage - 1)));
TextComponent nextPage = new TextComponent(">>");
nextPage.setColor(ChatColor.RED);
nextPage.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("§6Nächste Seite...").create()));
nextPage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/schem list " + (currPage + 1)));
nextPage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/ak schemlist " + (currPage + 1)));
beforePage.addExtra(nextPage);
player.spigot().sendMessage(beforePage);