Changed so it music will never be 'active'.
This commit is contained in:
parent
2e031f1e4a
commit
11597285b8
@ -3,12 +3,16 @@ package mineplex.core.gadget.types;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.event.GadgetActivateEvent;
|
||||
import mineplex.core.gadget.gadgets.SongData;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -31,8 +35,17 @@ public class MusicGadget extends Gadget
|
||||
}
|
||||
|
||||
@Override
|
||||
public void EnableCustom(Player player)
|
||||
public void Enable(Player player)
|
||||
{
|
||||
GadgetActivateEvent gadgetEvent = new GadgetActivateEvent(player, this);
|
||||
Bukkit.getServer().getPluginManager().callEvent(gadgetEvent);
|
||||
|
||||
if (gadgetEvent.isCancelled())
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Inventory", "You cannot use Inventory Items."));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Recharge.Instance.use(player, "Play Disc", _duration, true, false))
|
||||
return;
|
||||
|
||||
@ -41,6 +54,12 @@ public class MusicGadget extends Gadget
|
||||
_songs.add(new SongData(player.getLocation().getBlock(), _duration));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void EnableCustom(Player player)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void DisableCustom(Player player)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user