2015-07-30 19:24:01 +02:00
|
|
|
package com.plotsquared.sponge.util;
|
2015-07-30 16:25:16 +02:00
|
|
|
|
|
|
|
import com.intellectualcrafters.plot.object.PlotPlayer;
|
|
|
|
import com.intellectualcrafters.plot.util.AbstractTitle;
|
2015-07-30 19:24:01 +02:00
|
|
|
import com.plotsquared.sponge.object.SpongePlayer;
|
2016-02-21 05:07:04 +01:00
|
|
|
import org.spongepowered.api.text.title.Title;
|
2015-07-30 16:25:16 +02:00
|
|
|
|
2015-09-13 06:04:31 +02:00
|
|
|
public class SpongeTitleManager extends AbstractTitle {
|
2016-02-21 05:07:04 +01:00
|
|
|
|
2015-07-30 16:25:16 +02:00
|
|
|
@Override
|
2015-09-13 06:04:31 +02:00
|
|
|
public void sendTitle(final PlotPlayer player, final String head, final String sub, final int in, final int delay, final int out) {
|
2016-02-25 10:13:07 +01:00
|
|
|
final Title title = Title.builder().title(SpongeUtil.getText(head)).subtitle(SpongeUtil.getText(sub)).fadeIn(in * 20).stay(delay * 20).fadeOut(out * 20).build();
|
2015-08-18 15:20:11 +02:00
|
|
|
((SpongePlayer) player).player.sendTitle(title);
|
2015-07-30 16:25:16 +02:00
|
|
|
}
|
|
|
|
}
|