mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Update titles
This commit is contained in:
parent
cfcfd87f57
commit
6e2256ffcf
@ -22,7 +22,7 @@ import com.plotsquared.bukkit.database.plotme.PlotMeConnector_017;
|
|||||||
import com.plotsquared.bukkit.generator.BukkitPlotGenerator;
|
import com.plotsquared.bukkit.generator.BukkitPlotGenerator;
|
||||||
import com.plotsquared.bukkit.listeners.*;
|
import com.plotsquared.bukkit.listeners.*;
|
||||||
import com.plotsquared.bukkit.listeners.worldedit.WEListener;
|
import com.plotsquared.bukkit.listeners.worldedit.WEListener;
|
||||||
import com.plotsquared.bukkit.titles.DefaultTitle;
|
import com.plotsquared.bukkit.titles.DefaultTitle_19;
|
||||||
import com.plotsquared.bukkit.util.*;
|
import com.plotsquared.bukkit.util.*;
|
||||||
import com.plotsquared.bukkit.util.block.*;
|
import com.plotsquared.bukkit.util.block.*;
|
||||||
import com.plotsquared.bukkit.uuid.*;
|
import com.plotsquared.bukkit.uuid.*;
|
||||||
@ -471,7 +471,7 @@ public class BukkitMain extends JavaPlugin implements Listener, IPlotMain {
|
|||||||
Settings.TITLES = false;
|
Settings.TITLES = false;
|
||||||
FlagManager.removeFlag(FlagManager.getFlag("titles"));
|
FlagManager.removeFlag(FlagManager.getFlag("titles"));
|
||||||
} else {
|
} else {
|
||||||
AbstractTitle.TITLE_CLASS = new DefaultTitle();
|
AbstractTitle.TITLE_CLASS = new DefaultTitle_19();
|
||||||
if (wrapper instanceof DefaultUUIDWrapper || wrapper.getClass() == OfflineUUIDWrapper.class && !Bukkit.getOnlineMode()) {
|
if (wrapper instanceof DefaultUUIDWrapper || wrapper.getClass() == OfflineUUIDWrapper.class && !Bukkit.getOnlineMode()) {
|
||||||
Settings.TWIN_MODE_UUID = true;
|
Settings.TWIN_MODE_UUID = true;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.plotsquared.bukkit.titles;
|
||||||
|
|
||||||
|
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||||
|
import com.intellectualcrafters.plot.util.AbstractTitle;
|
||||||
|
import com.intellectualcrafters.plot.util.TaskManager;
|
||||||
|
import com.plotsquared.bukkit.object.BukkitPlayer;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
public class DefaultTitle_19 extends AbstractTitle {
|
||||||
|
@Override
|
||||||
|
public void sendTitle(final PlotPlayer player, final String head, final String sub, final int in, final int delay, final int out) {
|
||||||
|
try {
|
||||||
|
final Player playerObj = ((BukkitPlayer) player).player;
|
||||||
|
playerObj.sendTitle(head,sub);
|
||||||
|
TaskManager.runTaskLater(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
playerObj.resetTitle();
|
||||||
|
}
|
||||||
|
}, delay);
|
||||||
|
}
|
||||||
|
catch (Throwable e) {
|
||||||
|
AbstractTitle.TITLE_CLASS = new DefaultTitle();
|
||||||
|
AbstractTitle.TITLE_CLASS.sendTitle(player, head, sub, in, delay, out);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -396,7 +396,11 @@ public class FastQueue_1_9 extends SlowQueue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSolid(int i) {
|
public boolean isSolid(int i) {
|
||||||
return i != 0 && Material.getMaterial(i).isOccluding();
|
if (i != 0) {
|
||||||
|
Material material = Material.getMaterial(i);
|
||||||
|
return material != null && Material.getMaterial(i).isOccluding();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getId(int[][] sections, int x, int y, int z) {
|
public int getId(int[][] sections, int x, int y, int z) {
|
||||||
|
Loading…
Reference in New Issue
Block a user