SPIGOT-4496: Undeprecate MapView.getId and make int

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2018-11-23 11:50:48 +11:00
parent dcef5ef747
commit 273056bd1a
2 changed files with 11 additions and 2 deletions

View File

@@ -199,6 +199,14 @@ public class Commodore
@Override
public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean itf)
{
// SPIGOT-4496
if ( owner.equals( "org/bukkit/map/MapView" ) && name.equals( "getId" ) && desc.equals( "()S" ) )
{
// Should be same size on stack so just call other method
super.visitMethodInsn( opcode, owner, name, "()I", itf );
return;
}
if ( modern )
{
if ( owner.equals( "org/bukkit/Material" ) )