Re-added PlayerEvent.NameFormat (#6992)

This commit is contained in:
Tschipp authored and GitHub committed 2020-07-27 14:16:35 -07:00
1 parent 27798c5804
commit 941b9a1d1f
5 files changed
+44 -11

No files matched your search

@@ -0,0 +1,20 @@
package net.minecraftforge.debug.entity.player;
import net.minecraft.util.text.StringTextComponent;
import net.minecraftforge.event.entity.player.PlayerEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
@Mod("player_name_event_test")
@Mod.EventBusSubscriber()
public class PlayerNameEventTest
{
private static final boolean ENABLE = false;
@SubscribeEvent
public static void onPlayerNameEvent(PlayerEvent.NameFormat event)
{
if (!ENABLE) return;
event.setDisplayname(new StringTextComponent("Test Name"));
}
}