Swapped Morph and Pet active slot.
Fixed a couple things on Staff server.
This commit is contained in:
parent
5fdf466722
commit
417d398195
@ -143,20 +143,23 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (Plugin.getPetManager().hasActivePet(Player.getName()))
|
||||
|
||||
if (Plugin.getGadgetManager().getActive(Player, GadgetType.Morph) != null)
|
||||
{
|
||||
AddButton(40, new ShopItem(Material.MONSTER_EGG, (byte)Plugin.getPetManager().getActivePet(Player.getName()).getType().getTypeId(), C.mItem + Plugin.getPetManager().getActivePet(Player.getName()).getCustomName(), new String[] {}, 1, false, false),
|
||||
new SingleButton()
|
||||
final Gadget gadget = Plugin.getGadgetManager().getActive(Player, GadgetType.Morph);
|
||||
|
||||
AddButton(40,
|
||||
new ShopItem(gadget.GetDisplayMaterial(), gadget.GetDisplayData(), C.mItem + gadget.GetName(), new String[] {}, 1, false, false),
|
||||
new SingleButton()
|
||||
{
|
||||
@Override
|
||||
public void Clicked(Player player)
|
||||
{
|
||||
@Override
|
||||
public void Clicked(Player player)
|
||||
{
|
||||
PlayAcceptSound(player);
|
||||
Plugin.getPetManager().RemovePet(player, true);
|
||||
Refresh();
|
||||
}
|
||||
});
|
||||
PlayAcceptSound(player);
|
||||
gadget.Disable(player);
|
||||
Refresh();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (Plugin.getMountManager().getActive(Player) != null)
|
||||
@ -177,22 +180,19 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
|
||||
});
|
||||
}
|
||||
|
||||
if (Plugin.getGadgetManager().getActive(Player, GadgetType.Morph) != null)
|
||||
if (Plugin.getPetManager().hasActivePet(Player.getName()))
|
||||
{
|
||||
final Gadget gadget = Plugin.getGadgetManager().getActive(Player, GadgetType.Morph);
|
||||
|
||||
AddButton(44,
|
||||
new ShopItem(gadget.GetDisplayMaterial(), gadget.GetDisplayData(), C.mItem + gadget.GetName(), new String[] {}, 1, false, false),
|
||||
new SingleButton()
|
||||
{
|
||||
@Override
|
||||
public void Clicked(Player player)
|
||||
AddButton(44, new ShopItem(Material.MONSTER_EGG, (byte)Plugin.getPetManager().getActivePet(Player.getName()).getType().getTypeId(), C.mItem + Plugin.getPetManager().getActivePet(Player.getName()).getCustomName(), new String[] {}, 1, false, false),
|
||||
new SingleButton()
|
||||
{
|
||||
PlayAcceptSound(player);
|
||||
gadget.Disable(player);
|
||||
Refresh();
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void Clicked(Player player)
|
||||
{
|
||||
PlayAcceptSound(player);
|
||||
Plugin.getPetManager().RemovePet(player, true);
|
||||
Refresh();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,7 @@ import mineplex.core.command.CommandCenter;
|
||||
import mineplex.core.creature.Creature;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.inventory.InventoryManager;
|
||||
import mineplex.core.join.JoinQuit;
|
||||
import mineplex.core.memory.MemoryFix;
|
||||
import mineplex.core.monitor.LagMeter;
|
||||
import mineplex.core.npc.NpcManager;
|
||||
@ -15,10 +16,13 @@ import mineplex.core.preferences.PreferencesManager;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.status.ServerStatusManager;
|
||||
import mineplex.core.updater.FileUpdater;
|
||||
import mineplex.core.updater.Updater;
|
||||
import mineplex.staffServer.customerSupport.CustomerSupport;
|
||||
import mineplex.staffServer.password.Password;
|
||||
import mineplex.staffServer.salespackage.SalesPackageManager;
|
||||
import net.minecraft.server.v1_7_R4.MinecraftServer;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public class StaffServer extends JavaPlugin
|
||||
@ -52,8 +56,15 @@ public class StaffServer extends JavaPlugin
|
||||
new Chat(this, clientManager, preferenceManager, serverStatusManager.getCurrentServerName());
|
||||
new MemoryFix(this);
|
||||
new FileUpdater(this, portal);
|
||||
|
||||
|
||||
new CustomerSupport(this, clientManager, donationManager, new SalesPackageManager(this, clientManager, donationManager, new InventoryManager(this)));
|
||||
new Password(this);
|
||||
|
||||
//Updates
|
||||
getServer().getScheduler().scheduleSyncRepeatingTask(this, new Updater(this), 1, 1);
|
||||
|
||||
MinecraftServer.getServer().getPropertyManager().setProperty("debug", true);
|
||||
|
||||
Bukkit.getWorlds().get(0).setSpawnLocation(0, 102, 0);
|
||||
}
|
||||
}
|
||||
|
@ -9,15 +9,21 @@ import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.event.entity.EntityDeathEvent;
|
||||
import org.bukkit.event.entity.FoodLevelChangeEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import mineplex.core.MiniPlugin;
|
||||
import mineplex.core.account.CoreClient;
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
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.UtilMath;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.donation.Donor;
|
||||
import mineplex.core.donation.repository.token.CoinTransactionToken;
|
||||
@ -42,6 +48,27 @@ public class CustomerSupport extends MiniPlugin
|
||||
_salesPackageManager = salesPackageManager;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Join(PlayerJoinEvent event)
|
||||
{
|
||||
event.setJoinMessage(F.sys("Join", event.getPlayer().getName()));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Quit(PlayerQuitEvent event)
|
||||
{
|
||||
event.setQuitMessage(F.sys("Quit", event.getPlayer().getName()));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void PlayerChat(AsyncPlayerChatEvent event)
|
||||
{
|
||||
if (event.isCancelled())
|
||||
return;
|
||||
|
||||
event.setFormat(C.cGold + "%1$s " + C.cWhite + "%2$s");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void AddCommands()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user