Merge remote-tracking branch 'origin/clans-beta' into clans-beta
Conflicts: Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/regions/ClansRegions.java
This commit is contained in:
commit
bdc08676d9
@ -542,6 +542,18 @@ public class UtilEnt
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isGrounded(Entity ent, Location loc)
|
||||||
|
{
|
||||||
|
AxisAlignedBB box = ((CraftEntity)ent).getHandle().getBoundingBox();
|
||||||
|
Location bottom_corner_1 = new Location(ent.getWorld(), box.a, loc.getY()-0.1, box.c);
|
||||||
|
Location bottom_corner_2 = new Location(ent.getWorld(), box.d, loc.getY()-0.1, box.f);
|
||||||
|
|
||||||
|
for(Block b : UtilBlock.getInBoundingBox(bottom_corner_1, bottom_corner_2)){
|
||||||
|
if(UtilBlock.solid(b)) return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public static void PlayDamageSound(LivingEntity damagee)
|
public static void PlayDamageSound(LivingEntity damagee)
|
||||||
{
|
{
|
||||||
Sound sound = Sound.HURT_FLESH;
|
Sound sound = Sound.HURT_FLESH;
|
||||||
|
@ -40,7 +40,7 @@ public class ClansRegions extends MiniPlugin
|
|||||||
{
|
{
|
||||||
public final static String DEFAULT_WORLD_NAME = "world";
|
public final static String DEFAULT_WORLD_NAME = "world";
|
||||||
public final static int SPAWN_RADIUS = 3; // Radius of spawn claim area (measured in chunks)
|
public final static int SPAWN_RADIUS = 3; // Radius of spawn claim area (measured in chunks)
|
||||||
public final static int SHOP_RADIUS = 2; // Radius of shop claim area (measured in chunks)
|
public final static int SHOP_RADIUS = 4; // Radius of shop claim area (measured in chunks)
|
||||||
public final static int FIELDS_RADIUS = 7; // Radius of fields claim area (measured in chunks)
|
public final static int FIELDS_RADIUS = 7; // Radius of fields claim area (measured in chunks)
|
||||||
public final static int BORDERLANDS_RADIUS = 50; // Radius of borderlands claim area (measured in chunks)
|
public final static int BORDERLANDS_RADIUS = 50; // Radius of borderlands claim area (measured in chunks)
|
||||||
public static final int BORDER_RADIUS = 768;
|
public static final int BORDER_RADIUS = 768;
|
||||||
@ -68,6 +68,7 @@ public class ClansRegions extends MiniPlugin
|
|||||||
// Initialize Spawn faction and claims
|
// Initialize Spawn faction and claims
|
||||||
claimArea("Spawn", SPAWN_RADIUS, 0, false, true, new Location[]{Spawn.getEastSpawn(), Spawn.getWestSpawn()});
|
claimArea("Spawn", SPAWN_RADIUS, 0, false, true, new Location[]{Spawn.getEastSpawn(), Spawn.getWestSpawn()});
|
||||||
|
|
||||||
|
claimArea("Shops", SHOP_RADIUS, 2, false, false, new Location[]{Spawn.getNorthTownCenter(), Spawn.getSouthTownCenter()});
|
||||||
claimArea("Shops", SHOP_RADIUS, 0, true, false, new Location[]{Spawn.getNorthTownCenter(), Spawn.getSouthTownCenter()});
|
claimArea("Shops", SHOP_RADIUS, 0, true, false, new Location[]{Spawn.getNorthTownCenter(), Spawn.getSouthTownCenter()});
|
||||||
|
|
||||||
// Initialize Fields and Borderlands factions and claims
|
// Initialize Fields and Borderlands factions and claims
|
||||||
|
@ -30,8 +30,7 @@ public class WindBlade extends LegendaryItem
|
|||||||
|
|
||||||
public WindBlade()
|
public WindBlade()
|
||||||
{
|
{
|
||||||
super("Wind Blade", "Activate flying ability to take flight for 80 ticks before landing!", Material.GREEN_RECORD); // TODO:
|
super("Wind Blade", "Activate flying ability to take flight!", Material.Material.GREEN_RECORD);
|
||||||
// Configurable?
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -67,6 +66,7 @@ public class WindBlade extends LegendaryItem
|
|||||||
{
|
{
|
||||||
UtilPlayer.message(wielder, F.main("Wind Blade", "Flight power damaged whilst scraping the ground! Repairs will be finish in " + F.time(UtilTime.MakeStr(burnoutRemaining)) + "."));
|
UtilPlayer.message(wielder, F.main("Wind Blade", "Flight power damaged whilst scraping the ground! Repairs will be finish in " + F.time(UtilTime.MakeStr(burnoutRemaining)) + "."));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_messageTimer % 10 == 0)
|
if (_messageTimer % 10 == 0)
|
||||||
{
|
{
|
||||||
wielder.playSound(wielder.getLocation(), Sound.ANVIL_USE, .5f, 1.5f);
|
wielder.playSound(wielder.getLocation(), Sound.ANVIL_USE, .5f, 1.5f);
|
||||||
@ -98,7 +98,7 @@ public class WindBlade extends LegendaryItem
|
|||||||
_burnoutThreshold = UtilMath.clamp(_burnoutThreshold - .5, 0, _burnoutThreshold);
|
_burnoutThreshold = UtilMath.clamp(_burnoutThreshold - .5, 0, _burnoutThreshold);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UtilEnt.isGrounded(wielder))
|
if (UtilEnt.isGrounded(wielder, wielder.getLocation()) || UtilEnt.isGrounded(wielder, wielder.getLocation().subtract(0, 1, 0)))
|
||||||
{
|
{
|
||||||
addPower(0.4);
|
addPower(0.4);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user