Fixing fire arrow bug and kit gui bug
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
0d33e8c508
Commit
72d3d0314b
@ -145,8 +145,7 @@ public class Kit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inv.setCallback(-999, (click) -> GUI.kitSelection(player));
|
inv.setCallback(-999, (click) -> player.closeInventory());
|
||||||
inv.addCloseCallback((click) -> GUI.kitSelection(player));
|
|
||||||
inv.setItem(45, SWItem.getDye(10), (byte)10, "§aKit wählen", (click) -> {
|
inv.setItem(45, SWItem.getDye(10), (byte)10, "§aKit wählen", (click) -> {
|
||||||
Commands.kit(player, name);
|
Commands.kit(player, name);
|
||||||
player.closeInventory();
|
player.closeInventory();
|
||||||
|
@ -44,8 +44,6 @@ public class InFightDamageListener extends BasicListener {
|
|||||||
//Shooter is not a player
|
//Shooter is not a player
|
||||||
return;
|
return;
|
||||||
|
|
||||||
damagerArrow.setFireTicks(0);
|
|
||||||
player.setFireTicks(0);
|
|
||||||
damager = (Player) damagerArrow.getShooter();
|
damager = (Player) damagerArrow.getShooter();
|
||||||
}else{
|
}else{
|
||||||
//Damager is not a player
|
//Damager is not a player
|
||||||
@ -60,6 +58,10 @@ public class InFightDamageListener extends BasicListener {
|
|||||||
|
|
||||||
if(Fight.getPlayerTeam(player) == Fight.getPlayerTeam(damager)) {
|
if(Fight.getPlayerTeam(player) == Fight.getPlayerTeam(damager)) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
if(event.getDamager() instanceof Arrow){
|
||||||
|
event.getDamager().setFireTicks(0);
|
||||||
|
player.setFireTicks(0);
|
||||||
|
}
|
||||||
toActionbar(damager, TextComponent.fromLegacyText("§cDu darfst deinen Teamkollegen keinen Schaden zufügen!"));
|
toActionbar(damager, TextComponent.fromLegacyText("§cDu darfst deinen Teamkollegen keinen Schaden zufügen!"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren