Implemented Outpost MK III

This commit is contained in:
NewGarbo 2016-01-12 18:59:01 +00:00
parent 6cde84ec5f
commit f3003e795e
3 changed files with 40 additions and 8 deletions

View File

@ -1,18 +1,15 @@
package mineplex.core.message.commands;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import mineplex.core.command.CommandBase;
import mineplex.core.common.Rank;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilTextMiddle;
import mineplex.core.message.MessageManager;
import mineplex.serverdata.commands.AnnouncementCommand;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
public class AnnounceCommand extends CommandBase<MessageManager>
{
public AnnounceCommand(MessageManager plugin)

View File

@ -0,0 +1,36 @@
package mineplex.game.clans.clans.outpost;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import org.bukkit.DyeColor;
import org.bukkit.Location;
import org.bukkit.block.Banner;
import org.bukkit.block.banner.Pattern;
public class OutpostBlockBanner extends OutpostBlock
{
private DyeColor _baseColor;
private List<Pattern> _patterns;
public OutpostBlockBanner(Map<String, OutpostBlock> blocks, Location loc, int id, byte data, DyeColor color, Pattern... patterns)
{
super(blocks, loc, id, data);
_baseColor = color;
_patterns = new ArrayList<>(Arrays.asList(patterns));
}
@Override
public void set()
{
super.set();
Banner banner = (Banner) _loc.getBlock().getState();
banner.setBaseColor(_baseColor);
banner.setPatterns(_patterns);
banner.update(true, false);
}
}

View File

@ -21,7 +21,6 @@ import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilItem;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.recharge.Recharge;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.game.clans.clans.ClanInfo;
@ -50,7 +49,7 @@ public class OutpostManager extends MiniPlugin
{
if (event.getItemInHand().isSimilar(Outpost.OUTPOST_ITEM))
{
if (Spawn(event.getPlayer(), event.getBlock().getLocation(), OutpostType.MK2))
if (Spawn(event.getPlayer(), event.getBlock().getLocation(), OutpostType.MK3))
{
event.getBlock().setData((byte) Outpost.OUTPOST_BLOCK_DATA);
}