Setting the player's tab list header / footer

I’m currently trying to set a specific player’s tab list header and footer, however, I’ve hit a few issues.

When trying to set a player’s header and footer, using player.getTabList().setHeaderAndFooter(text1, text2); I’m hit with the following error:

[17:34:17 ERROR] [Sponge]: Error occurred while executing command 'tm test swag' for source EntityPlayerMP['Puharesource'/171, l='world', x=-98.39, y=89.00, z=548.92]: Method net/minecraft/entity/player/EntityPlayerMP.getTabList()Lorg/spongepowered/api/entity/living/player/tab/TabList; is abstract
java.lang.AbstractMethodError: Method net/minecraft/entity/player/EntityPlayerMP.getTabList()Lorg/spongepowered/api/entity/living/player/tab/TabList; is abstract
	at net.minecraft.entity.player.EntityPlayerMP.getTabList(SourceFile) ~[lf.class:?]
	at io.puharesource.mc.sponge.titlemanager.commands.TMCommand$1.onCommand(TMCommand.java:74) ~[TMCommand$1.class:?]
	at io.puharesource.mc.sponge.titlemanager.commands.TMSubCommand.execute(TMSubCommand.java:40) ~[TMSubCommand.class:?]
	at org.spongepowered.api.command.args.ChildCommandElementExecutor.execute(ChildCommandElementExecutor.java:177) ~[ChildCommandElementExecutor.class:1.8.9-3.1.0-BETA-247]
	at org.spongepowered.api.command.spec.CommandSpec.process(CommandSpec.java:332) ~[CommandSpec.class:1.8.9-3.1.0-BETA-247]
	at org.spongepowered.api.command.dispatcher.SimpleDispatcher.process(SimpleDispatcher.java:331) ~[SimpleDispatcher.class:1.8.9-3.1.0-BETA-247]
	at org.spongepowered.common.command.SpongeCommandManager.process(SpongeCommandManager.java:252) [SpongeCommandManager.class:1.8.9-3.1.0-BETA-247]
	at net.minecraft.command.ServerCommandManager.func_71556_a(SourceFile:83) [bd.class:?]
	at net.minecraft.network.NetHandlerPlayServer.func_147361_d(SourceFile:690) [lm.class:?]
	at net.minecraft.network.NetHandlerPlayServer.func_147354_a(SourceFile:677) [lm.class:?]
	at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(SourceFile:37) [ie.class:?]
	at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(SourceFile:9) [ie.class:?]
	at org.spongepowered.common.network.PacketUtil.onProcessPacket(PacketUtil.java:106) [PacketUtil.class:1.8.9-3.1.0-BETA-247]
	at net.minecraft.network.PacketThreadUtil$1.onProcessPacket(SourceFile:51) [fh$1.class:?]
	at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) [fh$1.class:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_60]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_60]
	at net.minecraft.util.Util.func_181617_a(SourceFile:44) [g.class:?]
	at net.minecraft.server.MinecraftServer.func_71190_q(SourceFile:143) [MinecraftServer.class:?]
	at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(SourceFile:299) [ko.class:?]
	at net.minecraft.server.MinecraftServer.func_71217_p(SourceFile:535) [MinecraftServer.class:?]
	at net.minecraft.server.MinecraftServer.run(SourceFile:451) [MinecraftServer.class:?]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_60]`

Is the method not implemented yet?

Yep, if you see an AbstractMethodError, that’s what it means

Alright, damn :cry:

@Puharesource
Pretty sure this is now implemented since the release of the new API version (with a few minor changes):

https://github.com/SpongePowered/SpongeCommon/pull/540

1 Like

Awesome! :smiley:
That’ll save me a lot of time having to fiddle around with NMS code.