Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Commit

Permalink
Fix inventory view not opening if the display name is too big
Browse files Browse the repository at this point in the history
  • Loading branch information
Pablete1234 authored and BuildTools committed Dec 14, 2015
1 parent e4aae03 commit e047b34
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ public void refreshView(final UUID view) {
}

public Inventory getFakeInventory(Player player, String locale) {
Inventory inventory = Bukkit.createInventory(null, 45, player.getDisplayName());
Inventory inventory = Bukkit.createInventory(null, 45, player.getDisplayName().length() > 32 ? Teams.getTeamColorByPlayer(player) + player.getName() : player.getDisplayName());
inventory.setItem(0, player.getInventory().getHelmet());
inventory.setItem(1, player.getInventory().getChestplate());
inventory.setItem(2, player.getInventory().getLeggings());
Expand Down

0 comments on commit e047b34

Please sign in to comment.