Convert over to System.out.println() for error messaging and add protection for billboards in Hub via a new manager

This commit is contained in:
AlexTheCoder 2016-05-02 16:20:41 -04:00
parent 7e97bd346e
commit ccd5b47d75
2 changed files with 5 additions and 6 deletions

View File

@ -142,7 +142,7 @@ public class BrandingPost
}
Block base = corner1.getBlock().getRelative(_facing);
try
{
for (int x = 0; x < width; x++)
@ -154,7 +154,7 @@ public class BrandingPost
i = block.getWorld().spawn(block.getLocation(), ItemFrame.class);
i.setFacingDirection(_facing, false);
ItemStack item = getMapItem(x, y, _img);
i.setItem(item);
@ -164,7 +164,7 @@ public class BrandingPost
}
catch (NullPointerException e)
{
Bukkit.broadcastMessage("ERROR! ItemFrame space already occupied!");
System.out.println("ERROR! ItemFrame space already occupied!");
return;
}

View File

@ -52,6 +52,7 @@ import mineplex.core.updater.FileUpdater;
import mineplex.core.updater.Updater;
import mineplex.core.velocity.VelocityFix;
import mineplex.core.visibility.VisibilityManager;
import mineplex.hub.modules.BillboardManager;
import mineplex.hub.modules.StackerManager;
import mineplex.hub.queue.QueueManager;
import mineplex.hub.server.ServerManager;
@ -67,8 +68,6 @@ import mineplex.minecraft.game.core.damage.DamageManager;
import mineplex.minecraft.game.core.fire.Fire;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
@ -194,7 +193,7 @@ public class Hub extends JavaPlugin implements IRelation
getServer().getScheduler().scheduleSyncRepeatingTask(this, new Updater(this), 1, 1);
BrandingManager brandingManager = new BrandingManager(this);
brandingManager.createPost(new Location(Bukkit.getWorld("world"), -2, 77, -33), BlockFace.SOUTH, "logitech.jpg");
new BillboardManager(this, brandingManager);
}
@Override