SteamWar/FightSystem
Archiviert
13
1

Fix 1.8 and 1.9
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2023-08-30 14:49:21 +02:00
Ursprung f81a1e13b1
Commit 891a26cc12
2 geänderte Dateien mit 2 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -33,7 +33,6 @@ import de.steamwar.sql.SteamwarUser;
import net.md_5.bungee.api.ChatMessageType; import net.md_5.bungee.api.ChatMessageType;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType; import org.bukkit.event.inventory.ClickType;
@ -102,7 +101,7 @@ public class GUI {
FightTeam team = Fight.getPlayerTeam(p); FightTeam team = Fight.getPlayerTeam(p);
if(team == null) if(team == null)
return; return;
players.removeIf(swItemUUIDPair -> !team.equals(Fight.getPlayerTeam((LivingEntity) Bukkit.getEntity(swItemUUIDPair.getObject())))); players.removeIf(swItemUUIDPair -> !team.equals(Fight.getPlayerTeam(Bukkit.getPlayer(swItemUUIDPair.getObject()))));
SWListInv<UUID> inv = new SWListInv<>(p, msg.parse("REMOVE_TITLE", p), players, (ClickType click, UUID player) -> { SWListInv<UUID> inv = new SWListInv<>(p, msg.parse("REMOVE_TITLE", p), players, (ClickType click, UUID player) -> {
Commands.kick(p, SteamwarUser.get(player).getUserName()); Commands.kick(p, SteamwarUser.get(player).getUserName());
p.closeInventory(); p.closeInventory();

Datei anzeigen

@ -78,7 +78,7 @@ public class FightPlayer {
} }
public LivingEntity getEntity() { public LivingEntity getEntity() {
LivingEntity bukkit = (LivingEntity) Bukkit.getEntity(entity.getUniqueId()); LivingEntity bukkit = Bukkit.getPlayer(entity.getUniqueId());
if(bukkit != null) if(bukkit != null)
entity = bukkit; entity = bukkit;
return entity; return entity;