SPIGOT-7335: Fix typo in TextDisplay#TextAlignment enum name

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2023-04-11 18:52:28 +10:00
parent d3104ad934
commit aa099d8420
2 changed files with 26 additions and 3 deletions

View File

@ -106,13 +106,13 @@ public class CraftTextDisplay extends CraftDisplay implements TextDisplay {
}
@Override
public TextAligment getAlignment() {
public TextAlignment getAlignment() {
Display.TextDisplay.Align nms = Display.TextDisplay.getAlign(getHandle().getFlags());
return TextAligment.valueOf(nms.name());
return TextAlignment.valueOf(nms.name());
}
@Override
public void setAlignment(TextAligment alignment) {
public void setAlignment(TextAlignment alignment) {
Preconditions.checkArgument(alignment != null, "Alignment cannot be null");
switch (alignment) {

View File

@ -202,6 +202,13 @@ public class Commodore
}
}
// SPIGOT-7335
if ( owner.equals( "org/bukkit/entity/TextDisplay$TextAligment" ) )
{
super.visitFieldInsn( opcode, "org/bukkit/entity/TextDisplay$TextAlignment", name, desc );
return;
}
if ( modern )
{
if ( owner.equals( "org/bukkit/Material" ) )
@ -305,6 +312,22 @@ public class Commodore
super.visitMethodInsn( opcode, owner, name, "(I)Lorg/bukkit/map/MapView;", itf );
return;
}
// SPIGOT-7335
if ( owner.equals( "org/bukkit/entity/TextDisplay$TextAligment" ) )
{
super.visitMethodInsn( opcode, "org/bukkit/entity/TextDisplay$TextAlignment", name, desc, itf );
return;
}
if ( desc.equals( "(Lorg/bukkit/entity/TextDisplay$TextAligment;)V" ) )
{
super.visitMethodInsn( opcode, owner, name, "(Lorg/bukkit/entity/TextDisplay$TextAlignment;)V", itf );
return;
}
if ( desc.equals( "()Lorg/bukkit/entity/TextDisplay$TextAligment;" ) )
{
super.visitMethodInsn( opcode, owner, name, "()Lorg/bukkit/entity/TextDisplay$TextAlignment;", itf );
return;
}
if ( modern )
{