Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
d12806f51b
Commit
a45c2b468d
@ -30,6 +30,7 @@ import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
|
||||
import java.util.Collection;
|
||||
@ -67,8 +68,11 @@ public class HotbarKit extends Kit implements Listener {
|
||||
@Override
|
||||
public synchronized void loadToPlayer(Player player) {
|
||||
for(int i = 0; i < HOTBAR_SIZE; i++) {
|
||||
if(nameTags[i] != null)
|
||||
Objects.requireNonNull(getInventory()[i].getItemMeta()).setDisplayName(FightSystem.getMessage().parse(nameTags[i], player, Config.GameName));
|
||||
if(nameTags[i] != null) {
|
||||
ItemMeta meta = Objects.requireNonNull(getInventory()[i].getItemMeta());
|
||||
meta.setDisplayName(FightSystem.getMessage().parse(nameTags[i], player, Config.GameName));
|
||||
getInventory()[i].setItemMeta(meta);
|
||||
}
|
||||
}
|
||||
super.loadToPlayer(player);
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren