diff --git a/Nukkit/src/main/java/com/plotsquared/nukkit/NukkitMain.java b/Nukkit/src/main/java/com/plotsquared/nukkit/NukkitMain.java index d39f46a42..a08b48d6e 100644 --- a/Nukkit/src/main/java/com/plotsquared/nukkit/NukkitMain.java +++ b/Nukkit/src/main/java/com/plotsquared/nukkit/NukkitMain.java @@ -424,8 +424,7 @@ public final class NukkitMain extends PluginBase implements Listener, IPlotMain @Override public AbstractTitle initTitleManager() { - // Already initialized in UUID handler - return AbstractTitle.TITLE_CLASS; + return new NukkitTitleUtil(); } @Override diff --git a/Nukkit/src/main/java/com/plotsquared/nukkit/util/NukkitTitleUtil.java b/Nukkit/src/main/java/com/plotsquared/nukkit/util/NukkitTitleUtil.java new file mode 100644 index 000000000..67bed7cb1 --- /dev/null +++ b/Nukkit/src/main/java/com/plotsquared/nukkit/util/NukkitTitleUtil.java @@ -0,0 +1,14 @@ +package com.plotsquared.nukkit.util; + +import cn.nukkit.Player; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.AbstractTitle; +import com.plotsquared.nukkit.object.NukkitPlayer; + +public class NukkitTitleUtil extends AbstractTitle { + @Override + public void sendTitle(PlotPlayer player, String head, String sub, int in, int delay, int out) { + Player plr = ((NukkitPlayer) player).player; + plr.sendTitle(head, sub, in, delay, out); + } +}