SPIGOT-4608: Improve quality of MapMeta APIs

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-02-05 21:29:03 +11:00
parent cda432d64a
commit d4aca3321d
3 changed files with 27 additions and 1 deletions

View File

@@ -206,6 +206,13 @@ public class Commodore
super.visitMethodInsn( opcode, owner, name, "()I", itf );
return;
}
// SPIGOT-4608
if ( (owner.equals( "org/bukkit/Bukkit" ) || owner.equals( "org/bukkit/Server" ) ) && name.equals( "getMap" ) && desc.equals( "(Lorg/bukkit/map/MapView;)S" ) )
{
// Should be same size on stack so just call other method
super.visitMethodInsn( opcode, owner, name, "(Lorg/bukkit/map/MapView;)I", itf );
return;
}
if ( modern )
{