Fix imports and item related bugs
This commit is contained in:
parent
dd675b407a
commit
a9b4519843
@ -1,5 +1,31 @@
|
||||
package mineplex.core.gadget;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerMoveEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.event.player.PlayerToggleSneakEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import mineplex.core.MiniPlugin;
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.achievement.AchievementManager;
|
||||
@ -261,31 +287,6 @@ import mineplex.core.pet.custom.CustomPet;
|
||||
import mineplex.core.preferences.PreferencesManager;
|
||||
import mineplex.core.projectile.ProjectileManager;
|
||||
import mineplex.core.treasure.TreasureManager;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerMoveEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.event.player.PlayerToggleSneakEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
public class GadgetManager extends MiniPlugin
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ public class MorphAnath extends MorphGadget
|
||||
{
|
||||
|
||||
private static final ItemStack ACTIVE_ITEN = new ItemBuilder(Material.FIREBALL)
|
||||
.setTitle(C.cGreenB + "Anath's Butn Beam")
|
||||
.setTitle(C.cGreenB + "Anath's Burn Beam")
|
||||
.addLore("Clicking this fires out a huge wave of fiery particles!")
|
||||
.setUnbreakable(true)
|
||||
.build();
|
||||
@ -99,17 +99,16 @@ public class MorphAnath extends MorphGadget
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = event.getPlayer();
|
||||
ItemStack itemStack = event.getItem();
|
||||
|
||||
if (itemStack == null || itemStack.equals(ACTIVE_ITEN))
|
||||
if (!isActive(player) || itemStack == null || !itemStack.equals(ACTIVE_ITEN))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
event.setCancelled(true);
|
||||
|
||||
Player player = event.getPlayer();
|
||||
|
||||
if (!Recharge.Instance.use(player, "Burn Beam", 8000,true, true, "Cosmetics"))
|
||||
{
|
||||
return;
|
||||
|
@ -60,16 +60,12 @@ public class MorphDana extends MorphGadget
|
||||
public MorphDana(GadgetManager manager)
|
||||
{
|
||||
super(manager, "Dana", UtilText.splitLinesToArray(new String[]{
|
||||
C.cGray + "Ever wanted to dash around",
|
||||
C.cGray + "the hub like a Ninja?",
|
||||
C.cGray + "Well now you can!",
|
||||
C.cGray + "TODO make a description",
|
||||
"",
|
||||
C.cGreen + "Click" + C.cWhite + " your " + C.cYellow + "Snowball" + C.cWhite + " to fire",
|
||||
C.cWhite + "snowballs in the direction you are looking.",
|
||||
"",
|
||||
C.cGreen + "Sneak" + C.cWhite + " to " + C.cYellow + "Dash" + C.cWhite + "."
|
||||
C.cGreen + "Click" + C.cWhite + " your " + C.cYellow + "Nether Star" + C.cWhite + " to",
|
||||
C.cWhite + "deploy your " + C.cYellow + "Rally" + C.cWhite + ".",
|
||||
}, LineFormat.LORE), -2, Material.GLASS, (byte) 0);
|
||||
setDisplayItem(SkinData.HATTORI.getSkull());
|
||||
setDisplayItem(SkinData.DANA.getSkull());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -109,7 +105,7 @@ public class MorphDana extends MorphGadget
|
||||
Player player = event.getPlayer();
|
||||
ItemStack itemStack = event.getItem();
|
||||
|
||||
if (!isActive(player) || itemStack == null || itemStack.equals(ACTIVE_ITEM))
|
||||
if (!isActive(player) || itemStack == null || !itemStack.equals(ACTIVE_ITEM))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -148,7 +144,7 @@ public class MorphDana extends MorphGadget
|
||||
{
|
||||
iterator.remove();
|
||||
}
|
||||
else if (UtilTime.elapsed(data.LaunchTime, 1000) && UtilEnt.isGrounded(data.Owner))
|
||||
else if (!data.Landed && UtilTime.elapsed(data.LaunchTime, 1000) && UtilEnt.isGrounded(data.Owner))
|
||||
{
|
||||
data.LandTime = System.currentTimeMillis();
|
||||
data.Landed = true;
|
||||
|
@ -96,7 +96,7 @@ public class MorphHattori extends MorphGadget
|
||||
Player player = event.getPlayer();
|
||||
ItemStack itemStack = event.getItem();
|
||||
|
||||
if (!isActive(player) || itemStack == null || itemStack.equals(ACTIVE_ITEM))
|
||||
if (!isActive(player) || itemStack == null || !itemStack.equals(ACTIVE_ITEM))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user