Fixed merge conflicts
This commit is contained in:
parent
250306302f
commit
0a5dae5857
@ -54,5 +54,4 @@ public class AnimationPoint
|
|||||||
{
|
{
|
||||||
return Objects.hash(_tick, _move);
|
return Objects.hash(_tick, _move);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -6,6 +6,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
@ -154,7 +155,7 @@ public class IntlString
|
|||||||
@Override
|
@Override
|
||||||
public int hashCode()
|
public int hashCode()
|
||||||
{
|
{
|
||||||
return toString().hashCode();
|
return Objects.hash(getKey(), getArguments());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -220,7 +221,7 @@ public class IntlString
|
|||||||
@Override
|
@Override
|
||||||
public int hashCode()
|
public int hashCode()
|
||||||
{
|
{
|
||||||
return toString().hashCode();
|
return Objects.hash(getArgument(), getStyle());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,15 +1,7 @@
|
|||||||
package mineplex.core.common.util;
|
package mineplex.core.common.util;
|
||||||
|
|
||||||
import com.google.common.collect.Sets;
|
|
||||||
import org.apache.commons.lang3.Validate;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.EventHandler;
|
|
||||||
import org.bukkit.event.EventPriority;
|
|
||||||
import org.bukkit.event.Listener;
|
|
||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -17,12 +9,21 @@ import java.util.UUID;
|
|||||||
import java.util.WeakHashMap;
|
import java.util.WeakHashMap;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.EventPriority;
|
||||||
|
import org.bukkit.event.Listener;
|
||||||
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
|
|
||||||
public class PlayerMap<V> implements Map<UUID, V>
|
public class PlayerMap<V> implements Map<UUID, V>
|
||||||
{
|
{
|
||||||
private static final Object LOCK = new Object();
|
private static final Object LOCK = new Object();
|
||||||
|
|
||||||
private static final RemovalListener REMOVAL_LISTENER = new RemovalListener();
|
private static final RemovalListener REMOVAL_LISTENER = new RemovalListener();
|
||||||
private static final Set<PlayerMap<?>> ALL_PLAYER_MAPS = Sets.newSetFromMap(new WeakHashMap<>());
|
private static final Set<PlayerMap<?>> ALL_PLAYER_MAPS = Collections.newSetFromMap(new WeakHashMap<>());
|
||||||
|
|
||||||
static
|
static
|
||||||
{
|
{
|
||||||
|
@ -99,4 +99,10 @@ public class ItemFleshHook extends ItemGadget implements IThrown
|
|||||||
{
|
{
|
||||||
data.getThrown().remove();
|
data.getThrown().remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -182,6 +182,12 @@ public class ItemFreezeCannon extends ItemGadget implements IThrown
|
|||||||
smash(data.getThrown());
|
smash(data.getThrown());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
public void smash(Entity ent)
|
public void smash(Entity ent)
|
||||||
{
|
{
|
||||||
//Effect
|
//Effect
|
||||||
@ -190,5 +196,4 @@ public class ItemFreezeCannon extends ItemGadget implements IThrown
|
|||||||
//Remove
|
//Remove
|
||||||
ent.remove();
|
ent.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -101,6 +101,12 @@ public class ItemMelonLauncher extends ItemGadget implements IThrown
|
|||||||
smash(data.getThrown());
|
smash(data.getThrown());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
public void smash(Entity ent)
|
public void smash(Entity ent)
|
||||||
{
|
{
|
||||||
//Effect
|
//Effect
|
||||||
|
@ -108,6 +108,12 @@ public class ItemPartyPopper extends ItemGadget implements IThrown
|
|||||||
Explode(data);
|
Explode(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void particleTrail(UpdateEvent event)
|
public void particleTrail(UpdateEvent event)
|
||||||
{
|
{
|
||||||
|
@ -153,6 +153,12 @@ public class MorphBat extends MorphGadget implements IThrown
|
|||||||
data.getThrown().remove();
|
data.getThrown().remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void Flap(PlayerToggleFlightEvent event)
|
public void Flap(PlayerToggleFlightEvent event)
|
||||||
{
|
{
|
||||||
|
@ -156,4 +156,9 @@ public class MorphSquid extends MorphGadget implements IThrown
|
|||||||
data.getThrown().remove();
|
data.getThrown().remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -142,6 +142,12 @@ public class MorphVillager extends MorphGadget implements IThrown
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void Pickup(PlayerPickupItemEvent event)
|
public void Pickup(PlayerPickupItemEvent event)
|
||||||
{
|
{
|
||||||
|
@ -81,7 +81,6 @@ public class ParticleCandyCane extends ParticleGadget
|
|||||||
{
|
{
|
||||||
Double y = _map.get(p.getUniqueId());
|
Double y = _map.get(p.getUniqueId());
|
||||||
if (y == null) return 3;
|
if (y == null) return 3;
|
||||||
return y.doubleValue();
|
return y;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -71,7 +71,7 @@ public class GiveItemCommand extends CommandBase<InventoryManager>
|
|||||||
{
|
{
|
||||||
Plugin.addItemToInventoryForOffline(success ->
|
Plugin.addItemToInventoryForOffline(success ->
|
||||||
{
|
{
|
||||||
if (success.booleanValue())
|
if (success)
|
||||||
{
|
{
|
||||||
UtilPlayer.message(caller, F.main("Item", "You gave " + F.elem(amount + " " + itemName) + " to offline player " + F.name(playerName)));
|
UtilPlayer.message(caller, F.main("Item", "You gave " + F.elem(amount + " " + itemName) + " to offline player " + F.name(playerName)));
|
||||||
}
|
}
|
||||||
|
@ -59,4 +59,10 @@ public class RandomItem
|
|||||||
|
|
||||||
return _item.getType() == item.getItemStack().getType();
|
return _item.getType() == item.getItemStack().getType();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
return _item.getType().hashCode();
|
||||||
|
}
|
||||||
}
|
}
|
@ -70,4 +70,10 @@ public class Poll
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
return Integer.hashCode(getId());
|
||||||
|
}
|
||||||
}
|
}
|
@ -38,7 +38,7 @@ public class SendCommand extends CommandBase<Portal>
|
|||||||
|
|
||||||
Plugin.doesServerExist(serverTarget, serverExists ->
|
Plugin.doesServerExist(serverTarget, serverExists ->
|
||||||
{
|
{
|
||||||
if (!serverExists.booleanValue())
|
if (!serverExists)
|
||||||
{
|
{
|
||||||
UtilPlayer.message(player, F.main(Plugin.getName(), C.cGray + "Server " + C.cGold + serverTarget + C.cGray + " does not exist!"));
|
UtilPlayer.message(player, F.main(Plugin.getName(), C.cGray + "Server " + C.cGold + serverTarget + C.cGray + " does not exist!"));
|
||||||
return;
|
return;
|
||||||
|
@ -39,7 +39,7 @@ public class ServerCommand extends CommandBase<Portal>
|
|||||||
{
|
{
|
||||||
Plugin.doesServerExist(args[0], serverExists ->
|
Plugin.doesServerExist(args[0], serverExists ->
|
||||||
{
|
{
|
||||||
if (!serverExists.booleanValue())
|
if (!serverExists)
|
||||||
{
|
{
|
||||||
UtilPlayer.message(
|
UtilPlayer.message(
|
||||||
player,
|
player,
|
||||||
|
@ -9,4 +9,5 @@ public interface IThrown
|
|||||||
public void Collide(LivingEntity target, Block block, ProjectileUser data);
|
public void Collide(LivingEntity target, Block block, ProjectileUser data);
|
||||||
public void Idle(ProjectileUser data);
|
public void Idle(ProjectileUser data);
|
||||||
public void Expire(ProjectileUser data);
|
public void Expire(ProjectileUser data);
|
||||||
|
public void ChunkUnload(ProjectileUser data);
|
||||||
}
|
}
|
||||||
|
@ -5,11 +5,6 @@ import java.util.List;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.WeakHashMap;
|
import java.util.WeakHashMap;
|
||||||
|
|
||||||
import mineplex.core.MiniPlugin;
|
|
||||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
|
||||||
import mineplex.core.updater.UpdateType;
|
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
|
||||||
|
|
||||||
import org.bukkit.Effect;
|
import org.bukkit.Effect;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
@ -19,8 +14,14 @@ import org.bukkit.event.EventHandler;
|
|||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.inventory.InventoryPickupItemEvent;
|
import org.bukkit.event.inventory.InventoryPickupItemEvent;
|
||||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||||
|
import org.bukkit.event.world.ChunkUnloadEvent;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
|
import mineplex.core.MiniPlugin;
|
||||||
|
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||||
|
import mineplex.core.updater.UpdateType;
|
||||||
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
|
|
||||||
public class ProjectileManager extends MiniPlugin
|
public class ProjectileManager extends MiniPlugin
|
||||||
{
|
{
|
||||||
private WeakHashMap<Entity, ProjectileUser> _thrown = new WeakHashMap<Entity, ProjectileUser>();
|
private WeakHashMap<Entity, ProjectileUser> _thrown = new WeakHashMap<Entity, ProjectileUser>();
|
||||||
@ -212,4 +213,16 @@ public class ProjectileManager extends MiniPlugin
|
|||||||
if (_thrown.containsKey(event.getItem()))
|
if (_thrown.containsKey(event.getItem()))
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
|
||||||
|
public void chunkUnload(ChunkUnloadEvent event)
|
||||||
|
{
|
||||||
|
for (Entity e : event.getChunk().getEntities())
|
||||||
|
{
|
||||||
|
if (_thrown.containsKey(e))
|
||||||
|
{
|
||||||
|
_thrown.get(e).chunkUnload();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -2,6 +2,18 @@ package mineplex.core.projectile;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.bukkit.Effect;
|
||||||
|
import org.bukkit.GameMode;
|
||||||
|
import org.bukkit.Sound;
|
||||||
|
import org.bukkit.block.Block;
|
||||||
|
import org.bukkit.block.BlockFace;
|
||||||
|
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
|
||||||
|
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftEntity;
|
||||||
|
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftLivingEntity;
|
||||||
|
import org.bukkit.entity.Entity;
|
||||||
|
import org.bukkit.entity.LivingEntity;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import mineplex.core.common.util.UtilBlock;
|
import mineplex.core.common.util.UtilBlock;
|
||||||
import mineplex.core.common.util.UtilParticle;
|
import mineplex.core.common.util.UtilParticle;
|
||||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||||
@ -16,19 +28,6 @@ import net.minecraft.server.v1_8_R3.MathHelper;
|
|||||||
import net.minecraft.server.v1_8_R3.MovingObjectPosition;
|
import net.minecraft.server.v1_8_R3.MovingObjectPosition;
|
||||||
import net.minecraft.server.v1_8_R3.Vec3D;
|
import net.minecraft.server.v1_8_R3.Vec3D;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.Effect;
|
|
||||||
import org.bukkit.GameMode;
|
|
||||||
import org.bukkit.Sound;
|
|
||||||
import org.bukkit.block.Block;
|
|
||||||
import org.bukkit.block.BlockFace;
|
|
||||||
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
|
|
||||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftEntity;
|
|
||||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftLivingEntity;
|
|
||||||
import org.bukkit.entity.Entity;
|
|
||||||
import org.bukkit.entity.LivingEntity;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
public class ProjectileUser
|
public class ProjectileUser
|
||||||
{
|
{
|
||||||
public ProjectileManager Throw;
|
public ProjectileManager Throw;
|
||||||
@ -186,6 +185,10 @@ public class ProjectileUser
|
|||||||
_canHit = canHit;
|
_canHit = canHit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void chunkUnload()
|
||||||
|
{
|
||||||
|
_callback.ChunkUnload(this);
|
||||||
|
}
|
||||||
|
|
||||||
public void effect(UpdateEvent event)
|
public void effect(UpdateEvent event)
|
||||||
{
|
{
|
||||||
|
@ -77,4 +77,10 @@ public class ChestReward extends Reward
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
return _type.getName().hashCode();
|
||||||
|
}
|
||||||
}
|
}
|
@ -75,4 +75,10 @@ public class GameAmplifierReward extends Reward
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
return getClass().hashCode();
|
||||||
|
}
|
||||||
}
|
}
|
@ -7,7 +7,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import mineplex.core.common.currency.GlobalCurrency;
|
import mineplex.core.common.currency.GlobalCurrency;
|
||||||
import mineplex.core.common.util.Callback;
|
|
||||||
import mineplex.core.donation.DonationManager;
|
import mineplex.core.donation.DonationManager;
|
||||||
import mineplex.core.reward.Reward;
|
import mineplex.core.reward.Reward;
|
||||||
import mineplex.core.reward.RewardData;
|
import mineplex.core.reward.RewardData;
|
||||||
@ -66,4 +65,10 @@ public class GemReward extends Reward
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
return getClass().hashCode();
|
||||||
|
}
|
||||||
}
|
}
|
@ -11,9 +11,6 @@ import mineplex.core.reward.RewardData;
|
|||||||
import mineplex.core.reward.RewardRarity;
|
import mineplex.core.reward.RewardRarity;
|
||||||
import mineplex.core.reward.RewardType;
|
import mineplex.core.reward.RewardType;
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by shaun on 14-09-12.
|
|
||||||
*/
|
|
||||||
public class InventoryReward extends Reward
|
public class InventoryReward extends Reward
|
||||||
{
|
{
|
||||||
private Random _random;
|
private Random _random;
|
||||||
@ -88,4 +85,10 @@ public class InventoryReward extends Reward
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
return _packageName.hashCode();
|
||||||
|
}
|
||||||
}
|
}
|
@ -65,4 +65,10 @@ public class PowerPlayReward extends Reward
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
return getClass().hashCode();
|
||||||
|
}
|
||||||
}
|
}
|
@ -110,4 +110,10 @@ public class RankReward extends Reward
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
return getClass().hashCode();
|
||||||
|
}
|
||||||
}
|
}
|
@ -75,4 +75,10 @@ public class RuneAmplifierReward extends Reward
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
return Integer.hashCode(_minutes);
|
||||||
|
}
|
||||||
}
|
}
|
@ -119,4 +119,10 @@ public class SpinTicketReward extends Reward
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
return getClass().hashCode();
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,16 +1,14 @@
|
|||||||
package mineplex.core.reward.rewards;
|
package mineplex.core.reward.rewards;
|
||||||
|
|
||||||
import mineplex.core.account.CoreClient;
|
|
||||||
import mineplex.core.account.CoreClientManager;
|
|
||||||
import mineplex.core.common.currency.GlobalCurrency;
|
|
||||||
import mineplex.core.common.util.UtilMath;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import mineplex.core.common.util.Callback;
|
import mineplex.core.account.CoreClient;
|
||||||
|
import mineplex.core.account.CoreClientManager;
|
||||||
|
import mineplex.core.common.currency.GlobalCurrency;
|
||||||
|
import mineplex.core.common.util.UtilMath;
|
||||||
import mineplex.core.donation.DonationManager;
|
import mineplex.core.donation.DonationManager;
|
||||||
import mineplex.core.reward.Reward;
|
import mineplex.core.reward.Reward;
|
||||||
import mineplex.core.reward.RewardData;
|
import mineplex.core.reward.RewardData;
|
||||||
@ -99,5 +97,10 @@ public class TreasureShardReward extends Reward
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
return getClass().hashCode();
|
||||||
|
}
|
||||||
|
}
|
@ -116,6 +116,12 @@ public class UnknownPackageReward extends Reward
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
return _packageName.hashCode();
|
||||||
|
}
|
||||||
|
|
||||||
public String getHeader()
|
public String getHeader()
|
||||||
{
|
{
|
||||||
return _header;
|
return _header;
|
||||||
|
@ -129,12 +129,6 @@ public class ShopItem extends ItemStack
|
|||||||
return new ShopItem(super.clone(), _name, _deliveryName, _deliveryAmount, _locked, _displayItem);
|
return new ShopItem(super.clone(), _name, _deliveryName, _deliveryAmount, _locked, _displayItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object obj)
|
|
||||||
{
|
|
||||||
return super.equals(obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void UpdateVisual(boolean clone)
|
protected void UpdateVisual(boolean clone)
|
||||||
{
|
{
|
||||||
ItemMeta meta = getItemMeta();
|
ItemMeta meta = getItemMeta();
|
||||||
|
@ -9,7 +9,6 @@ import org.bukkit.plugin.java.JavaPlugin;
|
|||||||
|
|
||||||
import mineplex.core.MiniPlugin;
|
import mineplex.core.MiniPlugin;
|
||||||
import mineplex.core.common.util.C;
|
import mineplex.core.common.util.C;
|
||||||
import mineplex.core.common.util.F;
|
|
||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.game.clans.clans.ClanTips.TipType;
|
import mineplex.game.clans.clans.ClanTips.TipType;
|
||||||
@ -61,7 +60,7 @@ public class ClanEnergyTracker extends MiniPlugin
|
|||||||
|
|
||||||
Triple<Long, Long, String[]> energyBounds = _updateMap.get(type);
|
Triple<Long, Long, String[]> energyBounds = _updateMap.get(type);
|
||||||
|
|
||||||
if (energyBounds != null && energyRemaining > energyBounds.getLeft().longValue() && energyRemaining < energyBounds.getMiddle().longValue())
|
if (energyBounds != null && energyRemaining > energyBounds.getLeft() && energyRemaining < energyBounds.getMiddle())
|
||||||
{
|
{
|
||||||
_clans.middleTextClan(clan, energyBounds.getRight()[0], energyBounds.getRight()[1], 20, 200, 80);
|
_clans.middleTextClan(clan, energyBounds.getRight()[0], energyBounds.getRight()[1], 20, 200, 80);
|
||||||
_clans.sendTipToClan(clan, TipType.ENERGY);
|
_clans.sendTipToClan(clan, TipType.ENERGY);
|
||||||
|
@ -751,7 +751,7 @@ public class ClansDataAccessLayer
|
|||||||
{
|
{
|
||||||
if (callback != null)
|
if (callback != null)
|
||||||
{
|
{
|
||||||
callback.run(Boolean.valueOf(ran));
|
callback.run(ran);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -879,9 +879,9 @@ public class ClansUtility
|
|||||||
// Claim Timer
|
// Claim Timer
|
||||||
if (_clansManager.getUnclaimMap().containsKey(chunk))
|
if (_clansManager.getUnclaimMap().containsKey(chunk))
|
||||||
{
|
{
|
||||||
if (!UtilTime.elapsed(_clansManager.getUnclaimMap().get(chunk).longValue(), _clansManager.getReclaimTime()))
|
if (!UtilTime.elapsed(_clansManager.getUnclaimMap().get(chunk), _clansManager.getReclaimTime()))
|
||||||
{
|
{
|
||||||
UtilPlayer.message(caller, F.main("Clans", "This Territory cannot be claimed for " + F.time(UtilTime.convertString(_clansManager.getReclaimTime() - (System.currentTimeMillis() - _clansManager.getUnclaimMap().get(chunk).longValue()), 1, UtilTime.TimeUnit.FIT)) + "."));
|
UtilPlayer.message(caller, F.main("Clans", "This Territory cannot be claimed for " + F.time(UtilTime.convertString(_clansManager.getReclaimTime() - (System.currentTimeMillis() - _clansManager.getUnclaimMap().get(chunk)), 1, UtilTime.TimeUnit.FIT)) + "."));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -332,7 +332,7 @@ public class MountManager extends MiniDbClientPlugin<MountOwnerData>
|
|||||||
if (UtilEnt.GetMetadata(entry.getKey(), "DISMOUNT_TIME") != null)
|
if (UtilEnt.GetMetadata(entry.getKey(), "DISMOUNT_TIME") != null)
|
||||||
{
|
{
|
||||||
Long dismount = UtilEnt.GetMetadata(entry.getKey(), "DISMOUNT_TIME");
|
Long dismount = UtilEnt.GetMetadata(entry.getKey(), "DISMOUNT_TIME");
|
||||||
if (UtilTime.elapsed(dismount.longValue(), MAX_TIME_DISMOUNTED))
|
if (UtilTime.elapsed(dismount, MAX_TIME_DISMOUNTED))
|
||||||
{
|
{
|
||||||
mountIterator.remove();
|
mountIterator.remove();
|
||||||
entry.getValue().despawn(false);
|
entry.getValue().despawn(false);
|
||||||
|
@ -135,4 +135,10 @@ public class PotatoManager extends MiniPlugin implements IThrown
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -119,7 +119,7 @@ public class OutpostRepository extends RepositoryBase
|
|||||||
public void updateOutpost(OutpostToken token)
|
public void updateOutpost(OutpostToken token)
|
||||||
{
|
{
|
||||||
executeUpdate(UPDATE_OUTPOST,
|
executeUpdate(UPDATE_OUTPOST,
|
||||||
new ColumnByte("outpostState", Byte.valueOf(token.OutpostState.getId())),
|
new ColumnByte("outpostState", token.OutpostState.getId()),
|
||||||
new ColumnInt("uniqueId", token.UniqueId));
|
new ColumnInt("uniqueId", token.UniqueId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,6 +132,6 @@ public class OutpostRepository extends RepositoryBase
|
|||||||
new ColumnInt("outpostType", token.Type.getId()),
|
new ColumnInt("outpostType", token.Type.getId()),
|
||||||
new ColumnInt("ownerClan", token.OwnerClan.getId()),
|
new ColumnInt("ownerClan", token.OwnerClan.getId()),
|
||||||
new ColumnTimestamp("timeSpawned", new Timestamp(token.TimeSpawned)),
|
new ColumnTimestamp("timeSpawned", new Timestamp(token.TimeSpawned)),
|
||||||
new ColumnByte("outpostState", Byte.valueOf(token.OutpostState.getId())));
|
new ColumnByte("outpostState", token.OutpostState.getId()));
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -51,4 +51,10 @@ public class IronHook implements IThrown
|
|||||||
{
|
{
|
||||||
data.getThrown().remove();
|
data.getThrown().remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -313,4 +313,10 @@ public abstract class RaidWorldEvent extends WorldEvent
|
|||||||
|
|
||||||
return ((RaidWorldEvent)object).getId() == getId();
|
return ((RaidWorldEvent)object).getId() == getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
return Integer.hashCode(getId());
|
||||||
|
}
|
||||||
}
|
}
|
@ -289,7 +289,7 @@ public class GearPage extends ShopPageBase<GearManager, GearShop>
|
|||||||
if (_factory == null || _factory.getItemType() == null)
|
if (_factory == null || _factory.getItemType() == null)
|
||||||
{
|
{
|
||||||
performBack();
|
performBack();
|
||||||
return Triple.of(Boolean.valueOf(true), stageTitle, stageMaterial);
|
return Triple.of(true, stageTitle, stageMaterial);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_factory.getItemType().equals(ItemType.RARE))
|
if (_factory.getItemType().equals(ItemType.RARE))
|
||||||
@ -429,7 +429,7 @@ public class GearPage extends ShopPageBase<GearManager, GearShop>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Triple.of(Boolean.valueOf($return), stageTitle, stageMaterial);
|
return Triple.of($return, stageTitle, stageMaterial);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Triple<Boolean, String, Material> doStageThree() throws InstantiationException, IllegalAccessException
|
private Triple<Boolean, String, Material> doStageThree() throws InstantiationException, IllegalAccessException
|
||||||
@ -439,7 +439,7 @@ public class GearPage extends ShopPageBase<GearManager, GearShop>
|
|||||||
if (_factory.getMaterial() == null)
|
if (_factory.getMaterial() == null)
|
||||||
{
|
{
|
||||||
performBack();
|
performBack();
|
||||||
return Triple.of(Boolean.valueOf(true), null, null);
|
return Triple.of(true, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
Material stageMaterial = _factory.getMaterial();
|
Material stageMaterial = _factory.getMaterial();
|
||||||
@ -535,7 +535,7 @@ public class GearPage extends ShopPageBase<GearManager, GearShop>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Triple.of(Boolean.valueOf(false), stageTitle, stageMaterial);
|
return Triple.of(false, stageTitle, stageMaterial);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Pair<String, Material> doStageFour() throws InstantiationException, IllegalAccessException
|
private Pair<String, Material> doStageFour() throws InstantiationException, IllegalAccessException
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package mineplex.game.clans.tutorial.tutorials.clans.objective.goals.attackenemy;
|
package mineplex.game.clans.tutorial.tutorials.clans.objective.goals.attackenemy;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import org.bukkit.DyeColor;
|
import org.bukkit.DyeColor;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@ -11,7 +12,6 @@ import org.bukkit.entity.Zombie;
|
|||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
|
|
||||||
import mineplex.core.common.util.F;
|
import mineplex.core.common.util.F;
|
||||||
import mineplex.core.common.util.UtilInv;
|
|
||||||
import mineplex.core.common.util.UtilMath;
|
import mineplex.core.common.util.UtilMath;
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
import mineplex.core.fallingblock.FallingBlocks;
|
import mineplex.core.fallingblock.FallingBlocks;
|
||||||
@ -64,7 +64,7 @@ public class BlowUpWallGoal extends ObjectiveGoal<AttackEnemyObjective>
|
|||||||
|
|
||||||
double radius = 5.2;
|
double radius = 5.2;
|
||||||
|
|
||||||
HashMap<Block, Double> blockList = new HashMap<Block, Double>();
|
Map<Block, Double> blockList = new HashMap<>();
|
||||||
int iR = (int) radius + 1;
|
int iR = (int) radius + 1;
|
||||||
|
|
||||||
for (int x = -iR; x <= iR; x++)
|
for (int x = -iR; x <= iR; x++)
|
||||||
@ -91,7 +91,7 @@ public class BlowUpWallGoal extends ObjectiveGoal<AttackEnemyObjective>
|
|||||||
|| block.getType() == Material.SMOOTH_STAIRS
|
|| block.getType() == Material.SMOOTH_STAIRS
|
||||||
|| block.getType() == Material.IRON_DOOR_BLOCK)
|
|| block.getType() == Material.IRON_DOOR_BLOCK)
|
||||||
|
|
||||||
if (Math.random() < 0.2 + (dist.doubleValue() / 2.55) || dist.doubleValue() < 1.75)
|
if (Math.random() < 0.2 + (dist / 2.55) || dist < 1.75)
|
||||||
{
|
{
|
||||||
block.setType(Material.AIR, false);
|
block.setType(Material.AIR, false);
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ public class NewsAddCommand extends CommandBase<HubManager>
|
|||||||
|
|
||||||
newsMang.AddNewsEntry(entry, success ->
|
newsMang.AddNewsEntry(entry, success ->
|
||||||
{
|
{
|
||||||
if (success.booleanValue())
|
if (success)
|
||||||
{
|
{
|
||||||
UtilPlayer.message(caller, F.main(Plugin.getName(), C.cGray + "The news entry: " + C.cGold + entry + C.cGray + " has been added to the database!"));
|
UtilPlayer.message(caller, F.main(Plugin.getName(), C.cGray + "The news entry: " + C.cGold + entry + C.cGray + " has been added to the database!"));
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ public class NewsDeleteCommand extends CommandBase<HubManager>
|
|||||||
}
|
}
|
||||||
newsMang.DeleteNewsEntry(newsPosition, success ->
|
newsMang.DeleteNewsEntry(newsPosition, success ->
|
||||||
{
|
{
|
||||||
if (success.booleanValue())
|
if (success)
|
||||||
{
|
{
|
||||||
UtilPlayer.message(caller, F.main(Plugin.getName(), C.cGray + "The news entry at position " + C.cGold + newsPosition + C.cGray + " has been deleted!"));
|
UtilPlayer.message(caller, F.main(Plugin.getName(), C.cGray + "The news entry at position " + C.cGold + newsPosition + C.cGray + " has been deleted!"));
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ public class NewsListCommand extends CommandBase<HubManager>
|
|||||||
// Order newsEntries set or its output by newsPosition, not hash order...
|
// Order newsEntries set or its output by newsPosition, not hash order...
|
||||||
newsMang.RetrieveMaxNewsPosition(maxPosition ->
|
newsMang.RetrieveMaxNewsPosition(maxPosition ->
|
||||||
{
|
{
|
||||||
String[] newsStrings = new String[maxPosition.intValue()];
|
String[] newsStrings = new String[maxPosition];
|
||||||
for (Iterator<String> iterator = entries.keySet().iterator(); iterator.hasNext();)
|
for (Iterator<String> iterator = entries.keySet().iterator(); iterator.hasNext();)
|
||||||
{
|
{
|
||||||
String newsPosition = iterator.next();
|
String newsPosition = iterator.next();
|
||||||
|
@ -58,7 +58,7 @@ public class NewsSetCommand extends CommandBase<HubManager>
|
|||||||
|
|
||||||
newsMang.SetNewsEntry(entry, newsPosition, success ->
|
newsMang.SetNewsEntry(entry, newsPosition, success ->
|
||||||
{
|
{
|
||||||
if (success.booleanValue())
|
if (success)
|
||||||
{
|
{
|
||||||
UtilPlayer.message(caller, F.main(Plugin.getName(), C.cGray + "The news entry at position " + C.cGold + newsPosition + C.cGray + " has been updated to: " + C.cGold + entry + C.cGray + "!"));
|
UtilPlayer.message(caller, F.main(Plugin.getName(), C.cGray + "The news entry at position " + C.cGold + newsPosition + C.cGray + " has been updated to: " + C.cGold + entry + C.cGray + "!"));
|
||||||
}
|
}
|
||||||
|
@ -450,6 +450,12 @@ public class BlockToss extends SkillCharge implements IThrown
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void Reset(Player player)
|
public void Reset(Player player)
|
||||||
{
|
{
|
||||||
|
@ -180,4 +180,10 @@ public class FleshHook extends SkillActiveCharge implements IThrown
|
|||||||
//Remove
|
//Remove
|
||||||
data.getThrown().remove();
|
data.getThrown().remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -226,4 +226,10 @@ public class AxeThrow extends SkillActive implements IThrown
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -147,4 +147,10 @@ public class FreezingBlast extends SkillActive implements IThrown
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -119,4 +119,10 @@ public class GlacialBlade extends SkillActive implements IThrown
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -193,4 +193,10 @@ public class IcePrison extends SkillActive implements IThrown
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -199,4 +199,10 @@ public class LightningOrb extends SkillActive implements IThrown
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -9,7 +9,6 @@ import org.bukkit.event.EventHandler;
|
|||||||
import org.bukkit.potion.PotionEffect;
|
import org.bukkit.potion.PotionEffect;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
|
|
||||||
import mineplex.core.common.util.F;
|
|
||||||
import mineplex.core.common.util.UtilTime;
|
import mineplex.core.common.util.UtilTime;
|
||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
@ -45,7 +44,7 @@ public class VitalitySpores extends Skill
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_lastDamage.put(event.GetDamageePlayer(), Long.valueOf(System.currentTimeMillis()));
|
_lastDamage.put(event.GetDamageePlayer(), System.currentTimeMillis());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -63,7 +62,7 @@ public class VitalitySpores extends Skill
|
|||||||
{
|
{
|
||||||
Entry<Player, Long> entry = iterator.next();
|
Entry<Player, Long> entry = iterator.next();
|
||||||
|
|
||||||
if (UtilTime.elapsed(entry.getValue().longValue(), 10000))
|
if (UtilTime.elapsed(entry.getValue(), 10000))
|
||||||
{
|
{
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
entry.getKey().addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, (20 * (5 + getLevel(entry.getKey()))), 1));
|
entry.getKey().addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, (20 * (5 + getLevel(entry.getKey()))), 1));
|
||||||
|
@ -81,4 +81,10 @@ public class Apple extends ItemUsable
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -68,4 +68,10 @@ public class Soup extends ItemUsable
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -188,4 +188,10 @@ public class Pistol extends ItemUsable
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -72,4 +72,10 @@ public class PoisonBall extends ItemUsable
|
|||||||
if (ent instanceof Item)
|
if (ent instanceof Item)
|
||||||
((Item)ent).setPickupDelay(5);
|
((Item)ent).setPickupDelay(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -2,6 +2,7 @@ package mineplex.minecraft.game.classcombat.item.Throwable;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Effect;
|
import org.bukkit.Effect;
|
||||||
@ -18,27 +19,28 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
|||||||
import org.bukkit.event.inventory.InventoryPickupItemEvent;
|
import org.bukkit.event.inventory.InventoryPickupItemEvent;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||||
|
import org.bukkit.event.world.ChunkUnloadEvent;
|
||||||
|
|
||||||
import mineplex.core.projectile.ProjectileUser;
|
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
|
||||||
import mineplex.core.updater.UpdateType;
|
|
||||||
import mineplex.core.common.util.F;
|
import mineplex.core.common.util.F;
|
||||||
import mineplex.core.common.util.UtilAction;
|
import mineplex.core.common.util.UtilAction;
|
||||||
import mineplex.core.common.util.UtilAlg;
|
import mineplex.core.common.util.UtilAlg;
|
||||||
import mineplex.core.common.util.UtilEnt;
|
import mineplex.core.common.util.UtilEnt;
|
||||||
import mineplex.core.common.util.UtilParticle;
|
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
|
||||||
import mineplex.core.common.util.UtilServer;
|
|
||||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||||
|
import mineplex.core.common.util.UtilParticle;
|
||||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||||
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
|
import mineplex.core.common.util.UtilServer;
|
||||||
|
import mineplex.core.projectile.ProjectileUser;
|
||||||
|
import mineplex.core.updater.UpdateType;
|
||||||
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.minecraft.game.classcombat.item.ItemFactory;
|
import mineplex.minecraft.game.classcombat.item.ItemFactory;
|
||||||
import mineplex.minecraft.game.classcombat.item.ItemUsable;
|
import mineplex.minecraft.game.classcombat.item.ItemUsable;
|
||||||
import mineplex.minecraft.game.classcombat.item.event.ProximityUseEvent;
|
import mineplex.minecraft.game.classcombat.item.event.ProximityUseEvent;
|
||||||
|
|
||||||
public class ProximityExplosive extends ItemUsable
|
public class ProximityExplosive extends ItemUsable
|
||||||
{
|
{
|
||||||
private HashMap<Entity, LivingEntity> _armed = new HashMap<Entity, LivingEntity>();
|
private Map<Entity, LivingEntity> _armed = new HashMap<>();
|
||||||
|
|
||||||
public ProximityExplosive(ItemFactory factory, Material type,
|
public ProximityExplosive(ItemFactory factory, Material type,
|
||||||
int amount, boolean canDamage, int gemCost, int tokenCost,
|
int amount, boolean canDamage, int gemCost, int tokenCost,
|
||||||
@ -185,5 +187,22 @@ public class ProximityExplosive extends ItemUsable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
|
||||||
|
public void chunkUnload(ChunkUnloadEvent event)
|
||||||
|
{
|
||||||
|
for (Entity e : event.getChunk().getEntities())
|
||||||
|
{
|
||||||
|
if (_armed.remove(e) != null)
|
||||||
|
{
|
||||||
|
e.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
}
|
@ -4,15 +4,10 @@ import java.util.AbstractMap;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
import mineplex.core.common.util.F;
|
|
||||||
import mineplex.core.common.util.UtilMath;
|
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
|
||||||
import mineplex.core.updater.UpdateType;
|
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
|
||||||
import mineplex.minecraft.game.classcombat.item.event.ProximityUseEvent;
|
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -20,11 +15,18 @@ import org.bukkit.event.EventHandler;
|
|||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
|
|
||||||
|
import mineplex.core.common.util.F;
|
||||||
|
import mineplex.core.common.util.UtilMath;
|
||||||
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
|
import mineplex.core.updater.UpdateType;
|
||||||
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
|
import mineplex.minecraft.game.classcombat.item.event.ProximityUseEvent;
|
||||||
|
|
||||||
public class ProximityManager implements Listener
|
public class ProximityManager implements Listener
|
||||||
{
|
{
|
||||||
private int _proxyLimit = 6;
|
private int _proxyLimit = 6;
|
||||||
|
|
||||||
private HashMap<Player, ArrayList<Entry<String, Entity>>> _proxyMap = new HashMap<Player, ArrayList<Entry<String, Entity>>>();
|
private Map<Player, List<Entry<String, Entity>>> _proxyMap = new HashMap<>();
|
||||||
|
|
||||||
public void setProxyLimit(int limit)
|
public void setProxyLimit(int limit)
|
||||||
{
|
{
|
||||||
@ -41,7 +43,7 @@ public class ProximityManager implements Listener
|
|||||||
if (!_proxyMap.containsKey(event.getPlayer()))
|
if (!_proxyMap.containsKey(event.getPlayer()))
|
||||||
_proxyMap.put(event.getPlayer(), new ArrayList<Entry<String,Entity>>());
|
_proxyMap.put(event.getPlayer(), new ArrayList<Entry<String,Entity>>());
|
||||||
|
|
||||||
ArrayList<Entry<String, Entity>> proxies = _proxyMap.get(event.getPlayer());
|
List<Entry<String, Entity>> proxies = _proxyMap.get(event.getPlayer());
|
||||||
|
|
||||||
//Store New
|
//Store New
|
||||||
proxies.add(new AbstractMap.SimpleEntry<String, Entity>(event.getItemType().GetName(), event.getEntity()));
|
proxies.add(new AbstractMap.SimpleEntry<String, Entity>(event.getItemType().GetName(), event.getEntity()));
|
||||||
@ -79,7 +81,7 @@ public class ProximityManager implements Listener
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayList<Entry<String,Entity>> proxies = _proxyMap.get(player);
|
List<Entry<String,Entity>> proxies = _proxyMap.get(player);
|
||||||
|
|
||||||
Iterator<Entry<String,Entity>> proxyIter = proxies.iterator();
|
Iterator<Entry<String,Entity>> proxyIter = proxies.iterator();
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ package mineplex.minecraft.game.classcombat.item.Throwable;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Effect;
|
import org.bukkit.Effect;
|
||||||
@ -17,25 +18,26 @@ import org.bukkit.event.EventPriority;
|
|||||||
import org.bukkit.event.inventory.InventoryPickupItemEvent;
|
import org.bukkit.event.inventory.InventoryPickupItemEvent;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||||
|
import org.bukkit.event.world.ChunkUnloadEvent;
|
||||||
|
|
||||||
import mineplex.core.projectile.ProjectileUser;
|
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
|
||||||
import mineplex.core.updater.UpdateType;
|
|
||||||
import mineplex.core.common.util.F;
|
import mineplex.core.common.util.F;
|
||||||
import mineplex.core.common.util.UtilEnt;
|
import mineplex.core.common.util.UtilEnt;
|
||||||
|
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||||
import mineplex.core.common.util.UtilParticle;
|
import mineplex.core.common.util.UtilParticle;
|
||||||
import mineplex.core.common.util.UtilServer;
|
|
||||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
import mineplex.core.common.util.UtilServer;
|
||||||
|
import mineplex.core.projectile.ProjectileUser;
|
||||||
|
import mineplex.core.updater.UpdateType;
|
||||||
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.minecraft.game.classcombat.item.ItemFactory;
|
import mineplex.minecraft.game.classcombat.item.ItemFactory;
|
||||||
import mineplex.minecraft.game.classcombat.item.ItemUsable;
|
import mineplex.minecraft.game.classcombat.item.ItemUsable;
|
||||||
import mineplex.minecraft.game.classcombat.item.event.ProximityUseEvent;
|
import mineplex.minecraft.game.classcombat.item.event.ProximityUseEvent;
|
||||||
|
|
||||||
public class ProximityZapper extends ItemUsable
|
public class ProximityZapper extends ItemUsable
|
||||||
{
|
{
|
||||||
private HashMap<Entity, LivingEntity> _armed = new HashMap<Entity, LivingEntity>();
|
private Map<Entity, LivingEntity> _armed = new HashMap<>();
|
||||||
|
|
||||||
public ProximityZapper(ItemFactory factory, Material type,
|
public ProximityZapper(ItemFactory factory, Material type,
|
||||||
int amount, boolean canDamage, int gemCost, int tokenCost,
|
int amount, boolean canDamage, int gemCost, int tokenCost,
|
||||||
@ -178,5 +180,22 @@ public class ProximityZapper extends ItemUsable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
|
||||||
|
public void chunkUnload(ChunkUnloadEvent event)
|
||||||
|
{
|
||||||
|
for (Entity e : event.getChunk().getEntities())
|
||||||
|
{
|
||||||
|
if (_armed.remove(e) != null)
|
||||||
|
{
|
||||||
|
e.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
}
|
@ -77,6 +77,12 @@ public class WaterBottle extends ItemUsable
|
|||||||
Break(data);
|
Break(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
public void Break(ProjectileUser data)
|
public void Break(ProjectileUser data)
|
||||||
{
|
{
|
||||||
//Splash
|
//Splash
|
||||||
|
@ -69,6 +69,12 @@ public class Web extends ItemUsable
|
|||||||
CreateWeb(data.getThrown());
|
CreateWeb(data.getThrown());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
public void CreateWeb(Entity ent)
|
public void CreateWeb(Entity ent)
|
||||||
{
|
{
|
||||||
LivingEntity thrower = Factory.Throw().getThrower(ent);
|
LivingEntity thrower = Factory.Throw().getThrower(ent);
|
||||||
|
@ -63,4 +63,9 @@ public class SpiderPoison implements IThrown
|
|||||||
burst(data);
|
burst(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -51,4 +51,10 @@ public class IronHook implements IThrown
|
|||||||
{
|
{
|
||||||
data.getThrown().remove();
|
data.getThrown().remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -133,6 +133,12 @@ public class RocketAbility extends SlimeAbility implements IThrown
|
|||||||
_rocketsHit++;
|
_rocketsHit++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
private static class ShotData
|
private static class ShotData
|
||||||
{
|
{
|
||||||
private LivingEntity _entity;
|
private LivingEntity _entity;
|
||||||
|
@ -1259,7 +1259,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
UtilPlayer.setGliding(player, false);
|
UtilPlayer.setGliding(player, false);
|
||||||
UtilPlayer.setAutoDeployDistance(player, 1.15F);
|
UtilPlayer.setAutoDeployDistance(player, 1.15F);
|
||||||
|
|
||||||
((CraftEntity) player).getHandle().getDataWatcher().watch(0, Byte.valueOf((byte) 0), EntityLiving.META_ENTITYDATA, (byte) 0);
|
((CraftEntity) player).getHandle().getDataWatcher().watch(0, (byte) 0, EntityLiving.META_ENTITYDATA, (byte) 0);
|
||||||
|
|
||||||
player.setCustomName("");
|
player.setCustomName("");
|
||||||
player.setCustomNameVisible(false);
|
player.setCustomNameVisible(false);
|
||||||
|
@ -205,6 +205,11 @@ public class PerkBlockTossEVO extends Perk implements IThrown
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
@ -120,6 +120,12 @@ public class PerkSulphurBombEVO extends Perk implements IThrown
|
|||||||
Explode(data);
|
Explode(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
public void Explode(ProjectileUser data)
|
public void Explode(ProjectileUser data)
|
||||||
{
|
{
|
||||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, data.getThrown().getLocation(), 0, 0, 0, 0, 1,
|
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, data.getThrown().getLocation(), 0, 0, 0, 0, 1,
|
||||||
@ -136,5 +142,4 @@ public class PerkSulphurBombEVO extends Perk implements IThrown
|
|||||||
|
|
||||||
event.AddKnockback(GetName(), 1.5);
|
event.AddKnockback(GetName(), 1.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -110,6 +110,12 @@ public class PerkWebEVO extends Perk implements IThrown
|
|||||||
Web(data);
|
Web(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
public void Web(ProjectileUser data)
|
public void Web(ProjectileUser data)
|
||||||
{
|
{
|
||||||
Location loc = data.getThrown().getLocation();
|
Location loc = data.getThrown().getLocation();
|
||||||
|
@ -82,7 +82,7 @@ public class BlockForm extends Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
EntityPlayer player = ((CraftPlayer) Player).getHandle();
|
EntityPlayer player = ((CraftPlayer) Player).getHandle();
|
||||||
player.getDataWatcher().watch(0, Byte.valueOf((byte) 32), Entity.META_ENTITYDATA, (byte) 32);
|
player.getDataWatcher().watch(0, (byte) 32, Entity.META_ENTITYDATA, (byte) 32);
|
||||||
|
|
||||||
// Player > Chicken
|
// Player > Chicken
|
||||||
DisguiseChicken disguise = new DisguiseChicken(Player);
|
DisguiseChicken disguise = new DisguiseChicken(Player);
|
||||||
@ -209,7 +209,7 @@ public class BlockForm extends Form
|
|||||||
public void SolidifyUpdate()
|
public void SolidifyUpdate()
|
||||||
{
|
{
|
||||||
if (!Player.isSprinting())
|
if (!Player.isSprinting())
|
||||||
((CraftEntity) Player).getHandle().getDataWatcher().watch(0, Byte.valueOf((byte) 32), Entity.META_ENTITYDATA,
|
((CraftEntity) Player).getHandle().getDataWatcher().watch(0, (byte) 32, Entity.META_ENTITYDATA,
|
||||||
(byte) 32);
|
(byte) 32);
|
||||||
|
|
||||||
// Not a Block
|
// Not a Block
|
||||||
|
@ -44,7 +44,7 @@ public class CreatureForm extends Form
|
|||||||
_disguise.setSoundDisguise(new DisguiseCat(Player));
|
_disguise.setSoundDisguise(new DisguiseCat(Player));
|
||||||
Host.Manager.GetDisguise().disguise(_disguise);
|
Host.Manager.GetDisguise().disguise(_disguise);
|
||||||
|
|
||||||
((CraftEntity)Player).getHandle().getDataWatcher().watch(0, Byte.valueOf((byte) 0), Entity.META_ENTITYDATA, (byte) 0);
|
((CraftEntity)Player).getHandle().getDataWatcher().watch(0, (byte) 0, Entity.META_ENTITYDATA, (byte) 0);
|
||||||
|
|
||||||
//Inform
|
//Inform
|
||||||
UtilPlayer.message(Player, F.main("Game", C.cWhite + "You are now a " + F.elem(UtilEnt.getName(_type)) + "!"));
|
UtilPlayer.message(Player, F.main("Game", C.cWhite + "You are now a " + F.elem(UtilEnt.getName(_type)) + "!"));
|
||||||
@ -62,6 +62,6 @@ public class CreatureForm extends Form
|
|||||||
{
|
{
|
||||||
Host.Manager.GetDisguise().undisguise(Player);
|
Host.Manager.GetDisguise().undisguise(Player);
|
||||||
|
|
||||||
((CraftEntity)Player).getHandle().getDataWatcher().watch(0, Byte.valueOf((byte) 0), Entity.META_ENTITYDATA, (byte) 0);
|
((CraftEntity)Player).getHandle().getDataWatcher().watch(0, (byte) 0, Entity.META_ENTITYDATA, (byte) 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -610,6 +610,12 @@ public class BombLobbers extends TeamGame implements IThrown
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
public void knockbackIncrease(CustomDamageEvent event)
|
public void knockbackIncrease(CustomDamageEvent event)
|
||||||
{
|
{
|
||||||
if (event.GetCause() != DamageCause.ENTITY_EXPLOSION && event.GetCause() != DamageCause.BLOCK_EXPLOSION)
|
if (event.GetCause() != DamageCause.ENTITY_EXPLOSION && event.GetCause() != DamageCause.BLOCK_EXPLOSION)
|
||||||
|
@ -1634,6 +1634,12 @@ public class BawkBawkBattles extends TeamGame implements IThrown
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void Idle(ProjectileUser data)
|
public void Idle(ProjectileUser data)
|
||||||
{
|
{
|
||||||
|
@ -179,10 +179,15 @@ public class SkillMeteor extends HeroSkill implements IThrown
|
|||||||
data.getThrown().remove();
|
data.getThrown().remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
private void startShower(ProjectileUser data)
|
private void startShower(ProjectileUser data)
|
||||||
{
|
{
|
||||||
Manager.GetBlockRestore().add(data.getThrown().getLocation().getBlock(), Material.NETHERRACK.getId(), (byte) 0, 6000);
|
Manager.GetBlockRestore().add(data.getThrown().getLocation().getBlock(), Material.NETHERRACK.getId(), (byte) 0, 6000);
|
||||||
_data.add(new MeteorShowerData((Player) data.getThrower(), data.getThrown().getLocation(), 6000));
|
_data.add(new MeteorShowerData((Player) data.getThrower(), data.getThrown().getLocation(), 6000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,6 +188,12 @@ public class SkillBuildPainting extends HeroSkill implements IThrown
|
|||||||
damage(data);
|
damage(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
private void damage(ProjectileUser data)
|
private void damage(ProjectileUser data)
|
||||||
{
|
{
|
||||||
Entity entity = data.getThrown();
|
Entity entity = data.getThrown();
|
||||||
@ -205,5 +211,4 @@ public class SkillBuildPainting extends HeroSkill implements IThrown
|
|||||||
{
|
{
|
||||||
return AXIS[Math.round(yaw / 90F) & 0x3];
|
return AXIS[Math.round(yaw / 90F) & 0x3];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -100,4 +100,10 @@ public class SkillPaint extends HeroSkill implements IThrown
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -91,5 +91,10 @@ public class SkillSnowball extends HeroSkill implements IThrown
|
|||||||
public void Expire(ProjectileUser data)
|
public void Expire(ProjectileUser data)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
}
|
@ -105,6 +105,12 @@ public class SkillAOEHeal extends HeroSkill implements IThrown
|
|||||||
deployAoe((Player) data.getThrower(), data.getThrown(), data.getThrown().getLocation());
|
deployAoe((Player) data.getThrower(), data.getThrown(), data.getThrown().getLocation());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void updateAOE(UpdateEvent event)
|
public void updateAOE(UpdateEvent event)
|
||||||
{
|
{
|
||||||
|
@ -366,4 +366,10 @@ public class Runner extends SoloGame implements IThrown
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -65,6 +65,12 @@ public class PerkCreeperSulphurBomb extends SmashPerk
|
|||||||
Explode(data);
|
Explode(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
private void Explode(ProjectileUser data)
|
private void Explode(ProjectileUser data)
|
||||||
{
|
{
|
||||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, data.getThrown().getLocation(), 0, 0, 0, 0, 1, ViewDist.MAX, UtilServer.getPlayers());
|
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, data.getThrown().getLocation(), 0, 0, 0, 0, 1, ViewDist.MAX, UtilServer.getPlayers());
|
||||||
@ -100,6 +106,12 @@ public class PerkCreeperSulphurBomb extends SmashPerk
|
|||||||
Explode(data);
|
Explode(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
private void Explode(ProjectileUser data)
|
private void Explode(ProjectileUser data)
|
||||||
{
|
{
|
||||||
UtilParticle.PlayParticleToAll(ParticleType.EXPLODE, data.getThrown().getLocation(), 0, 0, 0, 0, 1, ViewDist.LONG);
|
UtilParticle.PlayParticleToAll(ParticleType.EXPLODE, data.getThrown().getLocation(), 0, 0, 0, 0, 1, ViewDist.LONG);
|
||||||
|
@ -245,6 +245,12 @@ public class PerkBlockToss extends SmashPerk implements IThrown
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void BlockForm(EntityChangeBlockEvent event)
|
public void BlockForm(EntityChangeBlockEvent event)
|
||||||
{
|
{
|
||||||
|
@ -129,4 +129,9 @@ public class PerkIronHook extends Perk implements IThrown
|
|||||||
data.getThrown().remove();
|
data.getThrown().remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -160,4 +160,10 @@ public class PerkWhirlpoolBlade extends Perk implements IThrown
|
|||||||
{
|
{
|
||||||
data.getThrown().remove();
|
data.getThrown().remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -160,6 +160,12 @@ public class PerkPigBaconBounce extends SmashPerk implements IThrown
|
|||||||
Rebound(data.getThrower(), data.getThrown());
|
Rebound(data.getThrower(), data.getThrown());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
public void Rebound(LivingEntity player, Entity ent)
|
public void Rebound(LivingEntity player, Entity ent)
|
||||||
{
|
{
|
||||||
ent.getWorld().playSound(ent.getLocation(), Sound.ITEM_PICKUP, 1f, 0.5f);
|
ent.getWorld().playSound(ent.getLocation(), Sound.ITEM_PICKUP, 1f, 0.5f);
|
||||||
|
@ -250,4 +250,10 @@ public class PerkBoneRush extends SmashPerk implements IThrown
|
|||||||
{
|
{
|
||||||
_active.remove(event.getEntity().getUniqueId());
|
_active.remove(event.getEntity().getUniqueId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -335,6 +335,12 @@ public class PerkSlimeRocket extends SmashPerk implements IThrown
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void SlimeDamage(CustomDamageEvent event)
|
public void SlimeDamage(CustomDamageEvent event)
|
||||||
{
|
{
|
||||||
|
@ -138,6 +138,12 @@ public class PerkWebShot extends SmashPerk implements IThrown
|
|||||||
Web(data);
|
Web(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
public void Web(ProjectileUser data)
|
public void Web(ProjectileUser data)
|
||||||
{
|
{
|
||||||
Location loc = data.getThrown().getLocation();
|
Location loc = data.getThrown().getLocation();
|
||||||
|
@ -208,6 +208,12 @@ public class PerkFishFlurry extends SmashPerk implements IThrown
|
|||||||
data.getThrown().remove();
|
data.getThrown().remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void Knockback(CustomDamageEvent event)
|
public void Knockback(CustomDamageEvent event)
|
||||||
{
|
{
|
||||||
|
@ -174,4 +174,10 @@ public class PerkInkBlast extends SmashPerk implements IThrown
|
|||||||
|
|
||||||
event.AddKnockback(GetName(), _knockbackMagnitude);
|
event.AddKnockback(GetName(), _knockbackMagnitude);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -191,4 +191,10 @@ public class PerkWitchPotion extends SmashPerk implements IThrown
|
|||||||
{
|
{
|
||||||
Collide(null, null, data);
|
Collide(null, null, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -190,6 +190,12 @@ public class PerkZombieBile extends SmashPerk implements IThrown
|
|||||||
data.getThrown().remove();
|
data.getThrown().remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void Knockback(CustomDamageEvent event)
|
public void Knockback(CustomDamageEvent event)
|
||||||
{
|
{
|
||||||
|
@ -216,4 +216,10 @@ public class Stacker extends SoloGame implements IThrown
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -107,6 +107,12 @@ public class SpellIcePrison extends Spell implements SpellClick, IThrown
|
|||||||
IcePrison(data);
|
IcePrison(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onUpdate(UpdateEvent event)
|
public void onUpdate(UpdateEvent event)
|
||||||
{
|
{
|
||||||
|
@ -153,4 +153,9 @@ public class SpellIceShards extends Spell implements SpellClick, IThrown
|
|||||||
handleShard(data);
|
handleShard(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -157,6 +157,12 @@ public class SpellWebShot extends Spell implements SpellClick, IThrown
|
|||||||
Web(data, data.getThrown().getLocation());
|
Web(data, data.getThrown().getLocation());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
public void Web(ProjectileUser data, Location loc)
|
public void Web(ProjectileUser data, Location loc)
|
||||||
{
|
{
|
||||||
data.getThrown().remove();
|
data.getThrown().remove();
|
||||||
|
@ -23,7 +23,6 @@ import mineplex.core.projectile.ProjectileUser;
|
|||||||
import mineplex.core.recharge.Recharge;
|
import mineplex.core.recharge.Recharge;
|
||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
|
|
||||||
import nautilus.game.arcade.kit.Perk;
|
import nautilus.game.arcade.kit.Perk;
|
||||||
|
|
||||||
public class PerkApple extends Perk implements IThrown
|
public class PerkApple extends Perk implements IThrown
|
||||||
@ -142,6 +141,12 @@ public class PerkApple extends Perk implements IThrown
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void playerDeath(PlayerDeathEvent event)
|
public void playerDeath(PlayerDeathEvent event)
|
||||||
{
|
{
|
||||||
|
@ -20,7 +20,6 @@ import mineplex.core.common.util.UtilInv;
|
|||||||
import mineplex.core.itemstack.ItemStackFactory;
|
import mineplex.core.itemstack.ItemStackFactory;
|
||||||
import mineplex.core.projectile.IThrown;
|
import mineplex.core.projectile.IThrown;
|
||||||
import mineplex.core.projectile.ProjectileUser;
|
import mineplex.core.projectile.ProjectileUser;
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
|
||||||
import nautilus.game.arcade.kit.Perk;
|
import nautilus.game.arcade.kit.Perk;
|
||||||
|
|
||||||
public class PerkAxeThrower extends Perk implements IThrown
|
public class PerkAxeThrower extends Perk implements IThrown
|
||||||
@ -107,4 +106,10 @@ public class PerkAxeThrower extends Perk implements IThrown
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -106,6 +106,12 @@ public class PerkBaconBlast extends Perk implements IThrown
|
|||||||
Explode(data);
|
Explode(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
public void Explode(ProjectileUser data)
|
public void Explode(ProjectileUser data)
|
||||||
{
|
{
|
||||||
// for whatever reason, you can't put a location in createExplosion if you don't want it to break blocks >.>
|
// for whatever reason, you can't put a location in createExplosion if you don't want it to break blocks >.>
|
||||||
|
@ -92,4 +92,10 @@ public class PerkBlockRestorer extends Perk implements IThrown
|
|||||||
|
|
||||||
UtilFirework.playFirework(entity.getLocation(), Type.BALL_LARGE, Color.WHITE, false, true);
|
UtilFirework.playFirework(entity.getLocation(), Type.BALL_LARGE, Color.WHITE, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
@ -123,6 +123,12 @@ public class PerkCowBomb extends Perk implements IThrown
|
|||||||
data.getThrown().remove();
|
data.getThrown().remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void Knockback(CustomDamageEvent event)
|
public void Knockback(CustomDamageEvent event)
|
||||||
{
|
{
|
||||||
|
@ -218,4 +218,9 @@ public class PerkDirtCannon extends Perk implements IThrown
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ChunkUnload(ProjectileUser data)
|
||||||
|
{
|
||||||
|
data.getThrown().remove();
|
||||||
|
}
|
||||||
}
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user