2015-07-30 19:24:01 +02:00
|
|
|
package com.plotsquared.sponge.util;
|
2015-07-30 16:25:16 +02:00
|
|
|
|
2015-08-18 15:20:11 +02:00
|
|
|
|
|
|
|
import javax.swing.border.Border;
|
|
|
|
|
2015-07-30 16:25:16 +02:00
|
|
|
import org.spongepowered.api.text.title.Title;
|
2015-08-18 15:20:11 +02:00
|
|
|
import org.spongepowered.api.text.title.TitleBuilder;
|
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.SpongeMain;
|
|
|
|
import com.plotsquared.sponge.object.SpongePlayer;
|
2015-07-30 16:25:16 +02:00
|
|
|
|
|
|
|
public class SpongeTitleManager extends AbstractTitle {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void sendTitle(PlotPlayer player, String head, String sub, int in, int delay, int out) {
|
2015-08-18 15:20:11 +02:00
|
|
|
Title title = new TitleBuilder()
|
|
|
|
.title(SpongeMain.THIS.getText(head))
|
|
|
|
.subtitle(SpongeMain.THIS.getText(sub))
|
|
|
|
.fadeIn(in * 20)
|
|
|
|
.stay(delay * 20)
|
|
|
|
.fadeOut(out * 20)
|
|
|
|
.build();
|
|
|
|
((SpongePlayer) player).player.sendTitle(title);
|
2015-07-30 16:25:16 +02:00
|
|
|
}
|
|
|
|
}
|
2015-08-18 15:20:11 +02:00
|
|
|
|