[BlockHunt,Wizards,Champions] Disable particle effects [PC-156]
This commit is contained in:
parent
bad9077144
commit
1e0b94d870
@ -3,6 +3,7 @@ package nautilus.game.arcade.game.games.champions;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.gadget.types.GadgetType;
|
||||
import mineplex.core.inventory.data.Item;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
@ -10,7 +11,9 @@ import mineplex.minecraft.game.core.combat.DeathMessageType;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.Game.GameState;
|
||||
import nautilus.game.arcade.game.games.champions.kits.KitAssassin;
|
||||
import nautilus.game.arcade.game.games.champions.kits.KitBrute;
|
||||
import nautilus.game.arcade.game.games.champions.kits.KitKnight;
|
||||
@ -149,6 +152,18 @@ public class ChampionsCTF extends CaptureTheFlag
|
||||
player.closeInventory();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void disableParticles(GameStateChangeEvent event)
|
||||
{
|
||||
if (event.GetState() == GameState.Prepare)
|
||||
{
|
||||
for (Player player : GetPlayers(false))
|
||||
{
|
||||
getArcadeManager().getCosmeticManager().getGadgetManager().removeGadgetType(player, GadgetType.Particle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void validateSkills(UpdateEvent event)
|
||||
{
|
||||
|
@ -2,13 +2,16 @@ package nautilus.game.arcade.game.games.champions;
|
||||
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.gadget.types.GadgetType;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.combat.DeathMessageType;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.Game.GameState;
|
||||
import nautilus.game.arcade.game.games.champions.kits.KitAssassin;
|
||||
import nautilus.game.arcade.game.games.champions.kits.KitBrute;
|
||||
import nautilus.game.arcade.game.games.champions.kits.KitKnight;
|
||||
@ -119,6 +122,18 @@ public class ChampionsDominate extends Domination
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void disableParticles(GameStateChangeEvent event)
|
||||
{
|
||||
if (event.GetState() == GameState.Prepare)
|
||||
{
|
||||
for (Player player : GetPlayers(false))
|
||||
{
|
||||
getArcadeManager().getCosmeticManager().getGadgetManager().removeGadgetType(player, GadgetType.Particle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
public void InventoryDamageCancel(CustomDamageEvent event)
|
||||
{
|
||||
|
@ -2,13 +2,16 @@ package nautilus.game.arcade.game.games.champions;
|
||||
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.gadget.types.GadgetType;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.combat.DeathMessageType;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.Game.GameState;
|
||||
import nautilus.game.arcade.game.games.champions.kits.KitAssassin;
|
||||
import nautilus.game.arcade.game.games.champions.kits.KitBrute;
|
||||
import nautilus.game.arcade.game.games.champions.kits.KitKnight;
|
||||
@ -119,6 +122,18 @@ public class ChampionsTDM extends TeamDeathmatch
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void disableParticles(GameStateChangeEvent event)
|
||||
{
|
||||
if (event.GetState() == GameState.Prepare)
|
||||
{
|
||||
for (Player player : GetPlayers(false))
|
||||
{
|
||||
getArcadeManager().getCosmeticManager().getGadgetManager().removeGadgetType(player, GadgetType.Particle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
public void InventoryDamageCancel(CustomDamageEvent event)
|
||||
{
|
||||
|
@ -60,6 +60,7 @@ import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.gadget.types.GadgetType;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilFirework;
|
||||
@ -84,6 +85,7 @@ import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.events.PlayerPrepareTeleportEvent;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.TeamGame;
|
||||
import nautilus.game.arcade.game.Game.GameState;
|
||||
import nautilus.game.arcade.game.GameTeam.PlayerState;
|
||||
import nautilus.game.arcade.game.games.hideseek.forms.BlockForm;
|
||||
import nautilus.game.arcade.game.games.hideseek.forms.CreatureForm;
|
||||
@ -349,15 +351,28 @@ public class HideSeek extends TeamGame
|
||||
{
|
||||
if (event.GetState() == GameState.Prepare)
|
||||
{
|
||||
System.out.println("prep");
|
||||
this.getArcadeManager().getPacketHandler().addPacketHandler(_blockDisguise, PacketPlayOutSpawnEntityLiving.class, PacketPlayOutEntityDestroy.class);
|
||||
this.getArcadeManager().getPacketHandler().addPacketHandler(_useEntity, true, PacketPlayInUseEntity.class);
|
||||
}
|
||||
else if (event.GetState() == GameState.Dead)
|
||||
{
|
||||
this.getArcadeManager().getPacketHandler().removePacketHandler(_blockDisguise);
|
||||
this.getArcadeManager().getPacketHandler().removePacketHandler(_useEntity);
|
||||
this.getArcadeManager().getPacketHandler().removePacketHandler(_blockDisguise);
|
||||
this.getArcadeManager().getPacketHandler().removePacketHandler(_useEntity);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void disableParticles(GameStateChangeEvent event)
|
||||
{
|
||||
if (event.GetState() == GameState.Prepare)
|
||||
{
|
||||
for (Player player : GetPlayers(false))
|
||||
{
|
||||
getArcadeManager().getCosmeticManager().getGadgetManager().removeGadgetType(player, GadgetType.Particle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Material GetItemEquivilent(Material mat)
|
||||
{
|
||||
|
@ -1,6 +1,5 @@
|
||||
package nautilus.game.arcade.game.games.wizards;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
@ -11,50 +10,6 @@ import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Random;
|
||||
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.NautHashMap;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
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.common.util.UtilTextBottom;
|
||||
import mineplex.core.common.util.UtilTextTop;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilTime.TimeUnit;
|
||||
import mineplex.core.common.util.UtilWorld;
|
||||
import mineplex.core.hologram.Hologram;
|
||||
import mineplex.core.itemstack.ItemBuilder;
|
||||
import mineplex.core.loot.ChestLoot;
|
||||
import mineplex.core.packethandler.IPacketHandler;
|
||||
import mineplex.core.packethandler.PacketInfo;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import mineplex.minecraft.game.core.explosion.CustomExplosion;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.SoloGame;
|
||||
import nautilus.game.arcade.game.games.wizards.kit.KitMage;
|
||||
import nautilus.game.arcade.game.games.wizards.kit.KitMystic;
|
||||
import nautilus.game.arcade.game.games.wizards.kit.KitSorcerer;
|
||||
import nautilus.game.arcade.game.games.wizards.kit.KitWitchDoctor;
|
||||
import nautilus.game.arcade.game.games.wizards.spellinterfaces.SpellClick;
|
||||
import nautilus.game.arcade.game.games.wizards.spellinterfaces.SpellClickBlock;
|
||||
import nautilus.game.arcade.game.games.wizards.spellinterfaces.SpellClickEntity;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
import net.minecraft.server.v1_8_R3.EntityFireball;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutSetSlot;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutWindowItems;
|
||||
|
||||
import nautilus.game.arcade.managers.chat.ChatStatData;
|
||||
import org.apache.commons.lang.IllegalClassException;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
@ -105,6 +60,51 @@ import org.bukkit.metadata.FixedMetadataValue;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.NautHashMap;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
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.common.util.UtilTextBottom;
|
||||
import mineplex.core.common.util.UtilTextTop;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilTime.TimeUnit;
|
||||
import mineplex.core.common.util.UtilWorld;
|
||||
import mineplex.core.gadget.types.GadgetType;
|
||||
import mineplex.core.hologram.Hologram;
|
||||
import mineplex.core.itemstack.ItemBuilder;
|
||||
import mineplex.core.loot.ChestLoot;
|
||||
import mineplex.core.packethandler.IPacketHandler;
|
||||
import mineplex.core.packethandler.PacketInfo;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import mineplex.minecraft.game.core.explosion.CustomExplosion;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.SoloGame;
|
||||
import nautilus.game.arcade.game.games.wizards.kit.KitMage;
|
||||
import nautilus.game.arcade.game.games.wizards.kit.KitMystic;
|
||||
import nautilus.game.arcade.game.games.wizards.kit.KitSorcerer;
|
||||
import nautilus.game.arcade.game.games.wizards.kit.KitWitchDoctor;
|
||||
import nautilus.game.arcade.game.games.wizards.spellinterfaces.SpellClick;
|
||||
import nautilus.game.arcade.game.games.wizards.spellinterfaces.SpellClickBlock;
|
||||
import nautilus.game.arcade.game.games.wizards.spellinterfaces.SpellClickEntity;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
import nautilus.game.arcade.managers.chat.ChatStatData;
|
||||
import net.minecraft.server.v1_8_R3.EntityFireball;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutSetSlot;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutWindowItems;
|
||||
|
||||
public class Wizards extends SoloGame
|
||||
{
|
||||
private ArrayList<Item> _droppedWandsBooks = new ArrayList<Item>();
|
||||
@ -735,7 +735,7 @@ public class Wizards extends SoloGame
|
||||
done++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void displayProgress(String progressColor, String prefix, double amount, String suffix, Player... players)
|
||||
{
|
||||
// Generate Bar
|
||||
@ -862,7 +862,19 @@ public class Wizards extends SoloGame
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void disableParticles(GameStateChangeEvent event)
|
||||
{
|
||||
if (event.GetState() == GameState.Prepare)
|
||||
{
|
||||
for (Player player : GetPlayers(false))
|
||||
{
|
||||
getArcadeManager().getCosmeticManager().getGadgetManager().removeGadgetType(player, GadgetType.Particle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void dropSpells(Player player)
|
||||
{
|
||||
HashSet<SpellType> spells = new HashSet<SpellType>();
|
||||
|
Loading…
Reference in New Issue
Block a user