Fix vertical spacing & re-add the permission "holograms.admin"

This commit is contained in:
filoghost 2014-09-01 11:34:15 +02:00
parent a3e9119f65
commit 2b32075429
2 changed files with 4 additions and 4 deletions

View File

@ -35,7 +35,7 @@ public abstract class HologramSubCommand {
public final boolean hasPermission(CommandSender sender) {
if (permission == null) return true;
return sender.hasPermission(permission);
return sender.hasPermission("holograms.admin") || sender.hasPermission(permission);
}
public abstract String getPossibleArguments();

View File

@ -135,7 +135,7 @@ public class CraftHologram extends HologramBase implements Hologram {
for (String text : textLines) {
if (text.length() >= 5 && text.substring(0, 5).toLowerCase().equals("icon:")) {
// It's a floating icon!
ItemStack icon;
try {
@ -147,7 +147,7 @@ public class CraftHologram extends HologramBase implements Hologram {
// If the current Y has been changed, the item is NOT on top of the hologram.
if (currentY != this.y) {
// Extra space for the floating item...
currentY -= 0.27;
currentY -= 0.52;
}
FloatingItemDoubleEntity lineEntity = new FloatingItemDoubleEntity(icon);
@ -232,7 +232,7 @@ public class CraftHologram extends HologramBase implements Hologram {
if (currentY != loc.getY()) {
// Extra space for the floating item...
currentY -= 0.27;
currentY -= 0.52;
}
lineEntity.teleport(loc.getX(), currentY, loc.getZ());