build house goal [still broken]

This commit is contained in:
Ben 2016-03-17 02:23:05 +00:00
parent 929981419e
commit e6f4375041
6 changed files with 17 additions and 39 deletions

View File

@ -1051,36 +1051,6 @@ public class ClansCommand extends CommandBase<ClansManager>
_clansManager.getClanShop().openClanWho(caller, clan);
}
public void forceJoinClan(Player caller, String search)
{
if (_clansManager.getClientManager().hasRank(caller, Rank.ADMIN))
{
UtilPlayer.message(caller, F.main("Clans", "No no no, this command is not for you ;-)"));
return;
}
if (search == null)
{
UtilPlayer.message(caller, F.main("Clans", "You did not input a search parameter."));
return;
}
ClansCommandExecutedEvent event = new ClansCommandExecutedEvent(caller, "info", search);
UtilServer.getServer().getPluginManager().callEvent(event);
if (event.isCancelled())
{
return;
}
ClanInfo clan = Plugin.getClanUtility().searchClanPlayer(caller, search, true);
if (clan == null) return;
_clansManager.getClanUtility().join(caller, clan);
_clansManager.getClanDataAccess().role(clan, caller.getUniqueId(), ClanRole.LEADER);
}
public void infoTerritory(Player caller, String[] args)
{
ClanInfo clan;

View File

@ -732,6 +732,11 @@ public abstract class SiegeWeapon implements Listener
@EventHandler
public void onBlockBreak(BlockBreakEvent event)
{
if (!event.getBlock().getLocation().getWorld().equals(_location.getWorld()))
{
return;
}
if (event.getBlock().getLocation().distance(_location) < _boundingBoxSize + 1.65 && event.getBlock().getLocation().getY() <= _location.getY())
{
UtilPlayer.message(event.getPlayer(), F.main("Clans", "You may not break blocks near a Siege Weapon"));
@ -742,6 +747,11 @@ public abstract class SiegeWeapon implements Listener
@EventHandler
public void onBlockPlace(BlockPlaceEvent event)
{
if (!event.getBlock().getLocation().getWorld().equals(_location.getWorld()))
{
return;
}
if (event.getBlock().getLocation().distance(_location) < _boundingBoxSize + 1.65 && event.getBlock().getLocation().getY() <= _location.getY())
{
UtilPlayer.message(event.getPlayer(), F.main("Clans", "You may not place blocks near a Siege Weapon"));
@ -751,6 +761,11 @@ public abstract class SiegeWeapon implements Listener
public boolean inProtection(Block block)
{
if (!block.getLocation().getWorld().equals(_location.getWorld()))
{
return false;
}
return block.getLocation().distance(_location) < _boundingBoxSize + 1.65 && block.getLocation().getY() <= _location.getY() + 2;
}

View File

@ -5,6 +5,7 @@ import org.bukkit.plugin.java.JavaPlugin;
import mineplex.core.common.objective.OrderedObjective;
import mineplex.game.clans.tutorial.tutorials.clans.ClansMainTutorial;
import mineplex.game.clans.tutorial.tutorials.clans.objective.goals.BuildHouseGoal;
import mineplex.game.clans.tutorial.tutorials.clans.objective.goals.ClaimLandGoal;
import mineplex.game.clans.tutorial.tutorials.clans.objective.goals.ClanDetailsGoal;
import mineplex.game.clans.tutorial.tutorials.clans.objective.goals.CreateClanGoal;
@ -18,17 +19,16 @@ public class ClanObjective extends OrderedObjective<ClansMainTutorial>
addGoal(new CreateClanGoal(this));
addGoal(new ClanDetailsGoal(this));
addGoal(new ClaimLandGoal(this));
addGoal(new BuildHouseGoal(this));
}
@Override
protected void customLeave(Player player)
{
}
@Override
protected void customFinish(Player player)
{
}
}

View File

@ -19,19 +19,16 @@ public class LeaveSpawnObjective extends SingleObjective<ClansMainTutorial>
@Override
protected void customStart(Player player)
{
}
@Override
protected void customLeave(Player player)
{
}
@Override
protected void customFinish(Player player)
{
}
@EventHandler

View File

@ -17,13 +17,11 @@ public class ClaimLandGoal extends ObjectiveGoal
@Override
protected void customStart(Player player)
{
}
@Override
protected void customFinish(Player player)
{
}
@EventHandler

View File

@ -17,13 +17,11 @@ public class ClanDetailsGoal extends ObjectiveGoal
@Override
protected void customStart(Player player)
{
}
@Override
protected void customFinish(Player player)
{
}
@EventHandler