playernotifier: drop last usage of deprecated paperlib Title system

This commit is contained in:
Torrie Fischer 2021-06-15 14:46:31 -07:00
parent 4bbada298f
commit 81960d14ce

View File

@ -35,7 +35,6 @@ import com.comphenix.protocol.PacketType;
import com.comphenix.protocol.wrappers.EnumWrappers.TitleAction; import com.comphenix.protocol.wrappers.EnumWrappers.TitleAction;
import com.comphenix.protocol.wrappers.WrappedChatComponent; import com.comphenix.protocol.wrappers.WrappedChatComponent;
import com.destroystokyo.paper.Title;
import java.util.logging.Logger; import java.util.logging.Logger;
import us.camin.regions.events.PlayerMoveInEvent; import us.camin.regions.events.PlayerMoveInEvent;
@ -126,9 +125,7 @@ public class PlayerNotifier implements Listener {
} }
} else { } else {
//FIXME: also show pop/alt subtitle //FIXME: also show pop/alt subtitle
Title title = new Title.Builder().title("Region Discovered").subtitle(event.region.name()).build(); event.player.sendTitle("Region Discovered", "You discovered the region " + event.region.coloredName());
event.player.sendMessage("You discovered the region " + event.region.name());
event.player.sendTitle(title);
} }
// TODO: Make this configurable and disablable // TODO: Make this configurable and disablable