Merge pull request #29 in MIN/mineplex from foo to master
* commit '07bdbdde46e2a9e7b49f4e8606c9068a0534c18d': (22 commits) minor grammar issue remove duplicate method manually updating something *crosses fingers* please work! please work... Freezes the time using doDayLightCycle instead of using a UpdateEvent. Fixed double-half-slabs (line 68) remove custom level to fix merge conflicts squirrel! fix getting snowballs from bedrock add jnr_dev to updaterank fix this agaaaaain FOOIFY IS A NOOB OKAY fix concurrentmodificationexception fix turfforts bug prevent STATIONARY_LAVA from breaking in creeper smash fix creeper smash exploding lava and bedrock fix spleef lava issue ishh also wanted this :P (let me know if I should remove it) ishh wanted it...k ...
This commit is contained in:
commit
a308244966
@ -60,7 +60,8 @@ public class UpdateRank extends CommandBase<CoreClientManager>
|
||||
|
||||
final Rank rank = tempRank;
|
||||
|
||||
if (rank == Rank.ADMIN || rank == Rank.YOUTUBE || rank == Rank.TWITCH || rank == Rank.MODERATOR || rank == Rank.HELPER || rank == Rank.ALL || rank == Rank.MAPDEV || rank == Rank.SNR_MODERATOR || rank == Rank.JNR_DEV || rank == Rank.DEVELOPER)
|
||||
if (rank == Rank.ADMIN || rank == Rank.YOUTUBE || rank == Rank.TWITCH || rank == Rank.MODERATOR || rank == Rank.JNR_DEV || rank == Rank.HELPER || rank == Rank.ALL || rank == Rank.MAPDEV || rank == Rank.SNR_MODERATOR)
|
||||
if (rank == Rank.ADMIN || rank == Rank.YOUTUBE || rank == Rank.TWITCH || rank == Rank.MODERATOR || rank == Rank.JNR_DEV || rank == Rank.HELPER || rank == Rank.ALL || rank == Rank.MAPDEV || rank == Rank.SNR_MODERATOR)
|
||||
{
|
||||
if (!testServer && rank.Has(Rank.ADMIN) && !Plugin.hasRank(caller, Rank.LT))
|
||||
{
|
||||
@ -122,4 +123,4 @@ public class UpdateRank extends CommandBase<CoreClientManager>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -224,6 +224,11 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
|
||||
UtilPlayer.message(from, C.cPurple + to.getName() + " is often AFK or minimized, due to plugin development.");
|
||||
UtilPlayer.message(from, C.cPurple + "Please be patient if he does not reply instantly.");
|
||||
}
|
||||
|
||||
if(to.getName().equals("ishh"))
|
||||
{
|
||||
UtilPlayer.message(from, C.cPurple + "Hi, my name is ishh. If I don't respond to your message, please be patient and try again later!");
|
||||
}
|
||||
|
||||
// Log
|
||||
// Logger().logChat("Private Message", from, to.getName(), message);
|
||||
|
@ -13,7 +13,7 @@ public class GiveStatCommand extends CommandBase<StatsManager>
|
||||
{
|
||||
public GiveStatCommand(StatsManager plugin)
|
||||
{
|
||||
super(plugin, Rank.OWNER, "givestat");
|
||||
super(plugin, Rank.ADMIN, "givestat");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -355,4 +355,4 @@ public class WorldManager extends MiniPlugin
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -74,7 +74,7 @@ public class ServerNpcPage extends ShopPageBase<ServerManager, ServerNpcShop> im
|
||||
|
||||
if (_onMainPage)
|
||||
{
|
||||
addButton(4, ItemStackFactory.Instance.CreateStack(Material.DIAMOND_BLOCK, (byte) 0, 1, C.cGreen + "Click to Join instantly!"), new IButton() {
|
||||
addButton(4, ItemStackFactory.Instance.CreateStack(Material.DIAMOND_BLOCK, (byte) 0, 1, C.cGreen + "Click to join instantly!"), new IButton() {
|
||||
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType) {
|
||||
|
@ -1875,7 +1875,11 @@ public class MineStrike extends TeamGame
|
||||
ChatColor color = ChatColor.GRAY;
|
||||
if (winner != null)
|
||||
{
|
||||
winnerLine= winner.GetColor() + C.Bold + winner.GetName() + " has won the round!";
|
||||
if(winner.GetName().contains("Bombers")) {
|
||||
winnerLine= winner.GetColor() + C.Bold + winner.GetName() + " have won the round!";
|
||||
} else {
|
||||
winnerLine= winner.GetColor() + C.Bold + winner.GetName() + " has won the round!";
|
||||
}
|
||||
addScore(winner);
|
||||
drawScoreboard();
|
||||
color = winner.GetColor();
|
||||
|
@ -79,6 +79,8 @@ public class Quiver extends SoloGame
|
||||
this.PrepareFreeze = false;
|
||||
this.BlockBreakAllow.add(102);
|
||||
this.BlockBreakAllow.add(20);
|
||||
this.BlockBreakAllow.add(Material.STAINED_GLASS_PANE.getId());
|
||||
this.BlockBreakAllow.add(Material.STAINED_GLASS.getId());
|
||||
|
||||
this.DeathSpectateSecs = 1;
|
||||
|
||||
|
@ -178,14 +178,14 @@ public class Spleef extends SoloGame
|
||||
BlockFade(event.getBlock(), event.getPlayer(), false);
|
||||
|
||||
//Snowball
|
||||
if (GetKit(event.getPlayer()) instanceof KitSnowballer)
|
||||
if (GetKit(event.getPlayer()) instanceof KitSnowballer && event.getBlock().getType() != Material.BEDROCK)
|
||||
if (!UtilInv.contains(event.getPlayer(), Material.SNOW_BALL, (byte)0, 16))
|
||||
event.getPlayer().getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.SNOW_BALL));
|
||||
}
|
||||
|
||||
public void BlockFade(Block block, Player player, boolean slowDamage)
|
||||
{
|
||||
if (block.getTypeId() == 7)
|
||||
if (block.getType() == Material.BEDROCK || block.getType() == Material.LAVA || block.getType() == Material.STATIONARY_LAVA)
|
||||
return;
|
||||
|
||||
//Prevent Super Hunger from Bow
|
||||
|
@ -31,6 +31,7 @@ import nautilus.game.arcade.stats.BehindEnemyLinesStatTracker;
|
||||
import nautilus.game.arcade.stats.BlockShreadStatTracker;
|
||||
import nautilus.game.arcade.stats.TheComebackStatTracker;
|
||||
import net.minecraft.server.v1_7_R4.EntityArrow;
|
||||
import net.minecraft.server.v1_7_R4.Item;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
@ -43,17 +44,15 @@ import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftArrow;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Arrow;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.event.block.BlockEvent;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.event.entity.EntityShootBowEvent;
|
||||
import org.bukkit.event.entity.ItemSpawnEvent;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.event.entity.ProjectileHitEvent;
|
||||
|
||||
@ -114,6 +113,7 @@ public class TurfForts extends TeamGame
|
||||
|
||||
new Kit[]
|
||||
{
|
||||
|
||||
new KitMarksman(manager),
|
||||
new KitInfiltrator(manager),
|
||||
new KitShredder(manager),
|
||||
@ -125,6 +125,7 @@ public class TurfForts extends TeamGame
|
||||
"",
|
||||
"Each kill advances your turf forwards.",
|
||||
"Take over all the turf to win!"
|
||||
|
||||
});
|
||||
|
||||
this.StrictAntiHack = true;
|
||||
@ -268,7 +269,7 @@ public class TurfForts extends TeamGame
|
||||
EndCheck();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void BowCancel(EntityShootBowEvent event)
|
||||
{
|
||||
@ -280,13 +281,21 @@ public class TurfForts extends TeamGame
|
||||
((Player) event.getEntity()).updateInventory();
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void BlockBreak(BlockBreakEvent event)
|
||||
{
|
||||
if (event.isCancelled()) // this statement might save just a small amount of time
|
||||
return;
|
||||
|
||||
if(getArcadeManager().isSpectator(event.getPlayer())) event.setCancelled(true);
|
||||
}
|
||||
|
||||
@EventHandler(ignoreCancelled = true)
|
||||
@EventHandler
|
||||
public void BlockPlace(BlockPlaceEvent event)
|
||||
{
|
||||
//Remoeved and replaced by ignoreCancelled = true
|
||||
//if (event.isCancelled())
|
||||
// return;
|
||||
if (event.isCancelled())
|
||||
return;
|
||||
|
||||
GameTeam team = GetTeam(event.getPlayer());
|
||||
if (team == null)
|
||||
@ -325,17 +334,6 @@ public class TurfForts extends TeamGame
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void BlockBreak(BlockBreakEvent event)
|
||||
{
|
||||
if (!IsAlive(event.getPlayer()))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -343,7 +341,7 @@ public class TurfForts extends TeamGame
|
||||
{
|
||||
if (event.getEntity().getShooter() == null)
|
||||
return;
|
||||
|
||||
|
||||
if (!(event.getEntity() instanceof Arrow))
|
||||
return;
|
||||
|
||||
@ -359,7 +357,6 @@ public class TurfForts extends TeamGame
|
||||
|
||||
Manager.getPlugin().getServer().getScheduler().scheduleSyncDelayedTask(Manager.getPlugin(), new Runnable()
|
||||
{
|
||||
|
||||
public void run()
|
||||
{
|
||||
try
|
||||
@ -379,22 +376,21 @@ public class TurfForts extends TeamGame
|
||||
int z = fieldZ.getInt(entityArrow);
|
||||
|
||||
Block block = arrow.getWorld().getBlockAt(x, y, z);
|
||||
|
||||
|
||||
if (block.getTypeId() == 35)
|
||||
{
|
||||
if (block.getData() == 14 /* && team.GetColor() != ChatColor.RED */)
|
||||
if (block.getData() == 14 && team.GetColor() != ChatColor.RED)
|
||||
{
|
||||
block.getWorld().playEffect(block.getLocation(), Effect.STEP_SOUND, Material.REDSTONE_BLOCK.getId());
|
||||
}
|
||||
else if (block.getData() == 3 /* && team.GetColor() != ChatColor.AQUA */)
|
||||
else if (block.getData() == 3 && team.GetColor() != ChatColor.AQUA)
|
||||
{
|
||||
block.getWorld().playEffect(block.getLocation(), Effect.STEP_SOUND, Material.LAPIS_BLOCK.getId());
|
||||
}
|
||||
|
||||
|
||||
Bukkit.getPluginManager().callEvent(new ShredBlockEvent(block, arrow));
|
||||
|
||||
|
||||
block.setType(Material.AIR);
|
||||
|
||||
block.breakNaturally();
|
||||
}
|
||||
|
||||
arrow.remove();
|
||||
@ -669,8 +665,7 @@ public class TurfForts extends TeamGame
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@EventHandler
|
||||
public void ItemRemoval(UpdateEvent event)
|
||||
{
|
||||
@ -689,37 +684,7 @@ public class TurfForts extends TeamGame
|
||||
ent.remove();
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//Added by TheMineBench.
|
||||
@EventHandler
|
||||
public void blockBreak(BlockBreakEvent event) {
|
||||
|
||||
Block block = event.getBlock();
|
||||
|
||||
GameTeam team = GetTeam(event.getPlayer());
|
||||
GameTeam otherTeam = GetOtherTeam(team);
|
||||
|
||||
if (block.getType().equals(Material.WOOL) && (block.getData() == 14 && team.GetColor() != ChatColor.RED) || (block.getData() == 3 && team.GetColor() != ChatColor.AQUA))
|
||||
{
|
||||
UtilPlayer.message(event.getPlayer(), F.main("Game", "You cannot break the " + F.elem(otherTeam.GetColor() + otherTeam.GetName()) + " team's blocks!"));
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public GameTeam GetOtherTeam(GameTeam team) {
|
||||
return team.GetColor() == ChatColor.RED ? GetTeam(ChatColor.AQUA) : GetTeam(ChatColor.RED);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onItem(ItemSpawnEvent e) {
|
||||
if (e.getEntityType().equals(EntityType.DROPPED_ITEM)) {
|
||||
e.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void EndCheck()
|
||||
{
|
||||
@ -749,7 +714,7 @@ public class TurfForts extends TeamGame
|
||||
if (player.isOnline())
|
||||
AddGems(player, 10, "Participation", false, false);
|
||||
}
|
||||
|
||||
|
||||
//End
|
||||
SetState(GameState.End);
|
||||
}
|
||||
@ -758,4 +723,4 @@ public class TurfForts extends TeamGame
|
||||
{
|
||||
return _enemyTurf.get(player);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,40 +1,42 @@
|
||||
package nautilus.game.arcade.kit.perks;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.disguise.disguises.DisguiseBase;
|
||||
import mineplex.core.disguise.disguises.DisguiseCreeper;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
import nautilus.game.arcade.kit.SmashPerk;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class PerkCreeperExplode extends SmashPerk
|
||||
{
|
||||
private HashMap<Player, Long> _active = new HashMap<Player, Long>();
|
||||
@ -144,7 +146,15 @@ public class PerkCreeperExplode extends SmashPerk
|
||||
player.getWorld().playSound(player.getLocation(), Sound.EXPLODE, (float)(2 + Math.random()*4), (float)(Math.random() + 0.2));
|
||||
|
||||
//Blocks
|
||||
Manager.GetExplosion().BlockExplosion(UtilBlock.getInRadius(player.getLocation(), 12).keySet(), player.getLocation(), false);
|
||||
Collection<Block> blocks = UtilBlock.getInRadius(player.getLocation(), 12).keySet();
|
||||
Iterator<Block> iter = blocks.iterator();
|
||||
|
||||
while (iter.hasNext()) {
|
||||
Block b = iter.next();
|
||||
|
||||
if(b.getType() == Material.STATIONARY_LAVA || b.getType() == Material.LAVA || b.getType() == Material.BEDROCK) iter.remove();;
|
||||
}
|
||||
Manager.GetExplosion().BlockExplosion(blocks, player.getLocation(), false);
|
||||
|
||||
//Remove Spawns
|
||||
Iterator<Location> spawnIterator = Manager.GetGame().GetTeam(player).GetSpawns().iterator();
|
||||
|
Loading…
Reference in New Issue
Block a user