mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-11-24 02:56:17 +01:00
allow longer titles for 1.9+
This commit is contained in:
parent
9769626125
commit
b880475db7
@ -1,6 +1,7 @@
|
||||
package com.songoda.core.gui;
|
||||
|
||||
import com.songoda.core.compatibility.CompatibleMaterial;
|
||||
import com.songoda.core.compatibility.ServerVersion;
|
||||
import com.songoda.core.gui.events.GuiClickEvent;
|
||||
import com.songoda.core.gui.events.GuiCloseEvent;
|
||||
import com.songoda.core.gui.events.GuiDropItemEvent;
|
||||
@ -789,7 +790,7 @@ public class Gui {
|
||||
protected static String trimTitle(String title) {
|
||||
if(title == null) {
|
||||
return "";
|
||||
} else if (title.length() > 32) {
|
||||
} else if (ServerVersion.isServerVersionAtOrBelow(ServerVersion.V1_8) && title.length() > 32) {
|
||||
return title.charAt(30) == '\u00A7' ? title.substring(0, 30) : title.substring(0, 31);
|
||||
}
|
||||
return title;
|
||||
|
Loading…
Reference in New Issue
Block a user