Merge remote-tracking branch 'refs/remotes/origin/develop' into update/oitq
This commit is contained in:
commit
a8503d2fb8
@ -811,6 +811,11 @@ public class ItemStackFactory extends MiniPlugin
|
||||
return CreateStack(id, data, amount, damage, name, lore, owner, unbreakable, 0, null);
|
||||
}
|
||||
|
||||
public ItemStack CreateStack(Material type, Integer enchLevel, Enchantment... enchantments)
|
||||
{
|
||||
return CreateStack(type.getId(), (byte)0, 1, (short)0, null, ArrayToList(new String[] {}), null, true, enchLevel, enchantments);
|
||||
}
|
||||
|
||||
//XXX Owner Variant End
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@ -886,7 +891,7 @@ public class ItemStackFactory extends MiniPlugin
|
||||
{
|
||||
for(Enchantment enchantment : enchantments)
|
||||
{
|
||||
stack.addEnchantment(enchantment, enchLevel);
|
||||
stack.addUnsafeEnchantment(enchantment, enchLevel);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,14 +2,7 @@ package mineplex.core.npc;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.configuration.InvalidConfigurationException;
|
||||
@ -87,6 +80,7 @@ public class NpcManager extends MiniPlugin
|
||||
|
||||
private final Creature _creature;
|
||||
private final List<Npc> _npcs = new ArrayList<>();
|
||||
private final Queue<NpcsRecord> _queuedNpcs = new LinkedList<>();
|
||||
final Map<UUID, Npc> _npcMap = new HashMap<>();
|
||||
private final Set<UUID> _npcDeletingPlayers = new HashSet<>();
|
||||
|
||||
@ -504,14 +498,22 @@ public class NpcManager extends MiniPlugin
|
||||
{
|
||||
record.detach();
|
||||
|
||||
if (Bukkit.getWorld(record.getWorld()) == null)
|
||||
{
|
||||
// World isnt loaded yet, add to queue
|
||||
_queuedNpcs.add(record);
|
||||
}
|
||||
else
|
||||
{
|
||||
Npc npc = new Npc(this, record);
|
||||
_npcs.add(npc);
|
||||
|
||||
if (npc.getChunk().isLoaded())
|
||||
if (npc.getChunk() != null && npc.getChunk().isLoaded())
|
||||
spawnNpc(npc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void clearNpcs(boolean deleteFromDatabase) throws SQLException
|
||||
{
|
||||
@ -561,11 +563,34 @@ public class NpcManager extends MiniPlugin
|
||||
|
||||
for (Npc npc : _npcs)
|
||||
{
|
||||
if (npc.getEntity() != null && !npc.getEntity().isValid() && npc.getChunk().isLoaded())
|
||||
if (npc.getEntity() != null && !npc.getEntity().isValid() && npc.getChunk() != null && npc.getChunk().isLoaded())
|
||||
spawnNpc(npc);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void processNpcQueue(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.SEC_05)
|
||||
return;
|
||||
|
||||
Iterator<NpcsRecord> iterator = _queuedNpcs.iterator();
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
NpcsRecord record = iterator.next();
|
||||
if (Bukkit.getWorld(record.getWorld()) != null)
|
||||
{
|
||||
Npc npc = new Npc(this, record);
|
||||
_npcs.add(npc);
|
||||
iterator.remove();
|
||||
|
||||
if (npc.getChunk() != null && npc.getChunk().isLoaded())
|
||||
spawnNpc(npc);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onChunkLoad(ChunkLoadEvent event)
|
||||
{
|
||||
|
@ -31,14 +31,9 @@ public class Party
|
||||
private transient boolean _alreadyTeamed = false;
|
||||
|
||||
/**
|
||||
* The standard size for parties, for ALL {@code {@link mineplex.core.common.Rank}}
|
||||
* The maximum amount of players a party can have.
|
||||
*/
|
||||
private static final int PARTY_MIN_SIZE = 5;
|
||||
|
||||
/**
|
||||
* An upgraded size for the party, given to donators and staff.
|
||||
*/
|
||||
private static final int PARTY_MAX_SIZE = 10;
|
||||
private static final int PARTY_MAX_SIZE = 16;
|
||||
|
||||
/**
|
||||
* The current leader of this party
|
||||
|
@ -3,9 +3,11 @@ package mineplex.core.party;
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.party.constants.PartyRemoveReason;
|
||||
import mineplex.core.party.event.PartyMemberKickGUIEvent;
|
||||
import mineplex.core.party.event.PartySendToServerEvent;
|
||||
import mineplex.core.party.event.PartyTransferOwnerEvent;
|
||||
import mineplex.core.party.ui.Menu;
|
||||
import mineplex.core.portal.ServerTransferEvent;
|
||||
import mineplex.serverdata.data.MinecraftServer;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -128,6 +130,7 @@ public class PartyEventListener implements Listener
|
||||
return;
|
||||
}
|
||||
|
||||
event.setParty(party);
|
||||
event.setCancel(true);
|
||||
|
||||
if (!party.getOwner().equalsIgnoreCase(player.getName()))
|
||||
@ -136,8 +139,21 @@ public class PartyEventListener implements Listener
|
||||
return;
|
||||
}
|
||||
|
||||
_plugin.getJoinManager().requestServerJoin(event.getServer(), party);
|
||||
String server = event.getServer();
|
||||
if(server.equalsIgnoreCase("Lobby"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_plugin.getJoinManager().requestServerJoin(event.getServer(), party);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onSend(PartySendToServerEvent event)
|
||||
{
|
||||
Party party = event.getParty();
|
||||
MinecraftServer server = event.getMinecraftServer();
|
||||
_plugin.getRedisManager().sendPartyInfo(server.getName(), party);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -0,0 +1,44 @@
|
||||
package mineplex.core.party.event;
|
||||
|
||||
import mineplex.core.party.Party;
|
||||
import mineplex.serverdata.data.MinecraftServer;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class PartySendToServerEvent extends Event
|
||||
{
|
||||
private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
|
||||
private final Party _party;
|
||||
private final MinecraftServer _minecraftServer;
|
||||
|
||||
public PartySendToServerEvent(Party party, MinecraftServer minecraftServer)
|
||||
{
|
||||
_party = party;
|
||||
_minecraftServer = minecraftServer;
|
||||
}
|
||||
|
||||
public Party getParty()
|
||||
{
|
||||
return _party;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers()
|
||||
{
|
||||
return HANDLER_LIST;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList()
|
||||
{
|
||||
return HANDLER_LIST;
|
||||
}
|
||||
|
||||
public MinecraftServer getMinecraftServer()
|
||||
{
|
||||
return _minecraftServer;
|
||||
}
|
||||
}
|
@ -114,7 +114,7 @@ public class PartyInviteManager
|
||||
*/
|
||||
public void handleInviteRequest(String sender, String target, String serverFrom)
|
||||
{
|
||||
Player player = Bukkit.getPlayer(target);
|
||||
Player player = Bukkit.getPlayerExact(target);
|
||||
if (player == null)
|
||||
{
|
||||
//Shouldn't happen, as a "findPLayer" packet will be sent out first.
|
||||
|
@ -50,30 +50,7 @@ public class PartyMethodManager
|
||||
return;
|
||||
}
|
||||
|
||||
//Same Server
|
||||
if (possible != null)
|
||||
{
|
||||
|
||||
if(!_plugin.getPreferencesManager().Get(possible).PartyRequests)
|
||||
{
|
||||
caller.sendMessage(F.main("Party> ", F.name(target) + " is not accepting invites at this time."));
|
||||
return;
|
||||
}
|
||||
|
||||
if (party == null)
|
||||
{
|
||||
if(_plugin.getParty(target) != null)
|
||||
{
|
||||
Lang.PLAYER_IN_DIFFERENT_PARTY.send(caller, target);
|
||||
return;
|
||||
}
|
||||
if(_plugin.getInviteManager().isInvitedTo(possible.getUniqueId(), caller.getName()))
|
||||
{
|
||||
Lang.ALREADY_INVITED.send(caller, target);
|
||||
return;
|
||||
}
|
||||
Lang.INVITE_SUCCESS_PLAYER.send(caller, possible.getName());
|
||||
} else
|
||||
if(party != null)
|
||||
{
|
||||
if(!party.getOwner().equalsIgnoreCase(caller.getName()))
|
||||
{
|
||||
@ -100,7 +77,32 @@ public class PartyMethodManager
|
||||
Lang.PARTY_FULL.send(caller);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//Same Server
|
||||
if (possible != null)
|
||||
{
|
||||
if(!_plugin.getPreferencesManager().Get(possible).PartyRequests)
|
||||
{
|
||||
caller.sendMessage(F.main("Party> ", F.name(target) + " is not accepting invites at this time."));
|
||||
return;
|
||||
}
|
||||
|
||||
if (party == null)
|
||||
{
|
||||
if(_plugin.getParty(target) != null)
|
||||
{
|
||||
Lang.PLAYER_IN_DIFFERENT_PARTY.send(caller, target);
|
||||
return;
|
||||
}
|
||||
if(_plugin.getInviteManager().isInvitedTo(possible.getUniqueId(), caller.getName()))
|
||||
{
|
||||
Lang.ALREADY_INVITED.send(caller, target);
|
||||
return;
|
||||
}
|
||||
Lang.INVITE_SUCCESS_PLAYER.send(caller, possible.getName());
|
||||
} else
|
||||
{
|
||||
Lang.SUCCESS_INVITE.send(party, caller.getName(), target);
|
||||
}
|
||||
|
||||
@ -316,7 +318,7 @@ public class PartyMethodManager
|
||||
{
|
||||
List<UUID> members = Lists.newArrayList(party.getMembersByUUID());
|
||||
Lang.DISBANDED_BY_OWNER.send(party);
|
||||
members.stream().forEach(player -> removeFromParty(player, PartyRemoveReason.DISBANDED_BY_OWNER));
|
||||
members.forEach(player -> removeFromParty(player, PartyRemoveReason.DISBANDED_BY_OWNER));
|
||||
party.getMembers().clear();
|
||||
party.getMembersByUUID().clear();
|
||||
_plugin.removeParty(party);
|
||||
|
@ -3,7 +3,6 @@ package mineplex.core.party.ui.button.tools.invite;
|
||||
import mineplex.core.itemstack.ItemBuilder;
|
||||
import mineplex.core.party.PartyManager;
|
||||
import mineplex.core.party.ui.Button;
|
||||
import mineplex.core.party.ui.menus.PartyMainMenu;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -29,6 +28,6 @@ public class BackButton extends Button
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
player.closeInventory();
|
||||
new PartyMainMenu(getPlugin()).open(player);
|
||||
player.chat("/party");
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ public class PartyInvitesMenu extends Menu
|
||||
.setTitle(C.cRedB + "No Invites")
|
||||
.build(), null);
|
||||
|
||||
private final int INV_SIZE = 54;
|
||||
private final int SLOTS_PER_PAGE = 27;
|
||||
private final int STARTING_SLOT = 18;
|
||||
private final int BACK_BUTTON_SLOT = 0;
|
||||
@ -59,7 +60,7 @@ public class PartyInvitesMenu extends Menu
|
||||
@Override
|
||||
protected Button[] setUp(Player player)
|
||||
{
|
||||
Button[] buttons = new Button[54];
|
||||
Button[] buttons = new Button[INV_SIZE];
|
||||
boolean showFiltered = false;
|
||||
|
||||
buttons[BACK_BUTTON_SLOT] = new BackButton(_plugin);
|
||||
|
@ -13,15 +13,21 @@ import mineplex.core.party.ui.button.tools.owner.SelectServerButton;
|
||||
import mineplex.core.party.ui.button.tools.owner.TransferOwnerButton;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* The display menu for managing parties by the owner
|
||||
*/
|
||||
public class PartyOwnerMenu extends Menu
|
||||
{
|
||||
|
||||
private final int INV_SIZE = 54;
|
||||
private final int OWNER_HEAD_SLOT = 13;
|
||||
private final int STARTING_SLOT = 20;
|
||||
private final int CUT_OFF_SLOT = 25;
|
||||
private final int CUT_OFF_SLOT_2 = 34;
|
||||
private final int SKIP_TO_SLOT = 29;
|
||||
private final int SKIP_TO_SLOT_2 = 38;
|
||||
private final int ADD_PLAYER_BUTTON_SLOT = 1;
|
||||
private final int KICK_PLAYER_BUTTON_SLOT = 4;
|
||||
private final int TRANSFER_OWNER_BUTTON_SLOT = 7;
|
||||
@ -45,7 +51,7 @@ public class PartyOwnerMenu extends Menu
|
||||
@Override
|
||||
protected Button[] setUp(Player player)
|
||||
{
|
||||
Button[] buttons = new Button[54];
|
||||
Button[] buttons = new Button[INV_SIZE];
|
||||
//Tools
|
||||
buttons[ADD_PLAYER_BUTTON_SLOT] = new AddPlayerButton(_plugin, _party);
|
||||
//Kick player
|
||||
@ -59,16 +65,23 @@ public class PartyOwnerMenu extends Menu
|
||||
//Disband
|
||||
buttons[DISBAND_PARTY_BUTTON_SLOW] = new DisbandPartyButton(_plugin);
|
||||
|
||||
List<String> members = _party.getMembers();
|
||||
members.remove(_party.getOwner());
|
||||
buttons[OWNER_HEAD_SLOT] = new PartyMemberIcon(_party.getOwner(), _party, true);
|
||||
|
||||
int slot = STARTING_SLOT;
|
||||
//Players
|
||||
for (int i = 0; i < _party.getMembers().size(); i++)
|
||||
for (String member : members)
|
||||
{
|
||||
if (slot == CUT_OFF_SLOT)
|
||||
{
|
||||
slot = SKIP_TO_SLOT;
|
||||
} else if (slot == CUT_OFF_SLOT_2)
|
||||
{
|
||||
slot = SKIP_TO_SLOT_2;
|
||||
}
|
||||
String member = _party.getMembers().get(i);
|
||||
buttons[slot++] = new PartyMemberIcon(member, _party, member.equalsIgnoreCase(_party.getOwner()));
|
||||
|
||||
buttons[slot++] = new PartyMemberIcon(member, _party, false);
|
||||
}
|
||||
|
||||
if(_party.getSize() == 5)
|
||||
|
@ -9,15 +9,21 @@ import mineplex.core.party.ui.button.tools.LeavePartyButton;
|
||||
import mineplex.core.party.ui.button.tools.view.SuggestPlayerButton;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* The menu a player see's when he is a member, and not an owner, of a party.
|
||||
*/
|
||||
public class PartyViewMenu extends Menu
|
||||
{
|
||||
|
||||
private final int INV_SIZE = 54;
|
||||
private final int OWNER_HEAD_SLOT = 13;
|
||||
private final int STARTING_SLOT = 20;
|
||||
private final int CUT_OFF_SLOT = 25;
|
||||
private final int CUT_OFF_SLOT_2 = 34;
|
||||
private final int SKIP_TO_SLOT = 29;
|
||||
private final int SKIP_TO_SLOT_2 = 38;
|
||||
private final int LEAVE_PARTY_BUTTON_SLOT = 3;
|
||||
private final int SUGGEST_PLAYER_BUTTON_SLOT = 5;
|
||||
|
||||
@ -32,22 +38,29 @@ public class PartyViewMenu extends Menu
|
||||
@Override
|
||||
protected Button[] setUp(Player player)
|
||||
{
|
||||
Button[] buttons = new Button[54];
|
||||
Button[] buttons = new Button[INV_SIZE];
|
||||
//Tools
|
||||
buttons[LEAVE_PARTY_BUTTON_SLOT] = new LeavePartyButton(_plugin);
|
||||
//Suggest Player
|
||||
buttons[SUGGEST_PLAYER_BUTTON_SLOT] = new SuggestPlayerButton(_party, _plugin);
|
||||
|
||||
List<String> members = _party.getMembers();
|
||||
members.remove(_party.getOwner());
|
||||
buttons[OWNER_HEAD_SLOT] = new PartyMemberIcon(_party.getOwner(), _party, true);
|
||||
|
||||
int slot = STARTING_SLOT;
|
||||
//Players
|
||||
for (int i = 0; i < _party.getMembers().size(); i++)
|
||||
for (String member : members)
|
||||
{
|
||||
if (slot == CUT_OFF_SLOT)
|
||||
{
|
||||
slot = SKIP_TO_SLOT;
|
||||
} else if (slot == CUT_OFF_SLOT_2)
|
||||
{
|
||||
slot = SKIP_TO_SLOT_2;
|
||||
}
|
||||
String member = _party.getMembers().get(i);
|
||||
buttons[slot++] = new PartyMemberIcon(member, _party, member.equalsIgnoreCase(_party.getOwner()));
|
||||
|
||||
buttons[slot++] = new PartyMemberIcon(member, _party, false);
|
||||
}
|
||||
|
||||
return addPanes(buttons);
|
||||
|
@ -1,18 +1,6 @@
|
||||
package mineplex.core.portal;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.HashSet;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import mineplex.core.MiniPlugin;
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.common.Rank;
|
||||
@ -21,6 +9,8 @@ import mineplex.core.common.util.Callback;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilTabTitle;
|
||||
import mineplex.core.party.Party;
|
||||
import mineplex.core.party.event.PartySendToServerEvent;
|
||||
import mineplex.core.portal.Commands.SendCommand;
|
||||
import mineplex.core.portal.Commands.ServerCommand;
|
||||
import mineplex.serverdata.Region;
|
||||
@ -30,6 +20,20 @@ import mineplex.serverdata.commands.TransferCommand;
|
||||
import mineplex.serverdata.data.MinecraftServer;
|
||||
import mineplex.serverdata.servers.ServerManager;
|
||||
import mineplex.serverdata.servers.ServerRepository;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class Portal extends MiniPlugin
|
||||
{
|
||||
@ -94,18 +98,24 @@ public class Portal extends MiniPlugin
|
||||
final boolean override = serverName.equalsIgnoreCase("Lobby");
|
||||
final Rank playerRank = _clientManager.Get(player).GetRank();
|
||||
|
||||
if(event.isCancel() && !event.isDraggedByParty())
|
||||
if(event.getParty() != null && override)
|
||||
{
|
||||
Party party = event.getParty();
|
||||
sendParty(party);
|
||||
return;
|
||||
}
|
||||
|
||||
if (override)
|
||||
{
|
||||
sendPlayer(player, serverName);
|
||||
return;
|
||||
}
|
||||
|
||||
else
|
||||
if(event.isCancel())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
runAsync(() -> {
|
||||
final MinecraftServer server = _repository.getServerStatus(serverName);
|
||||
|
||||
@ -122,6 +132,37 @@ public class Portal extends MiniPlugin
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private void sendParty(Party party)
|
||||
{
|
||||
ServerRepository repository = ServerManager.getServerRepository(_region);
|
||||
MinecraftServer best = null;
|
||||
List<MinecraftServer> serverList = Lists.newArrayList(repository.getServersByGroup("Lobby"));
|
||||
int lowest = Integer.MAX_VALUE;
|
||||
for(MinecraftServer server : serverList)
|
||||
{
|
||||
int playercount = server.getPlayerCount();
|
||||
if(playercount < 20)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if(playercount < lowest)
|
||||
{
|
||||
lowest = playercount;
|
||||
if(best == null)
|
||||
{
|
||||
best = server;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(best == null)
|
||||
{
|
||||
//Well, fuck.
|
||||
best = serverList.get(new Random().nextInt(serverList.size()));
|
||||
}
|
||||
|
||||
PartySendToServerEvent serverEvent = new PartySendToServerEvent(party, best);
|
||||
getPluginManager().callEvent(serverEvent);
|
||||
}
|
||||
|
||||
public static void transferPlayer(String playerName, String serverName)
|
||||
@ -195,4 +236,6 @@ public class Portal extends MiniPlugin
|
||||
|
||||
UtilPlayer.message(player, F.main(getName(), "You have been sent from " + C.cGold + _serverName + C.cGray + " to " + C.cGold + serverName));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package mineplex.core.portal;
|
||||
|
||||
import mineplex.core.party.Party;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
@ -10,6 +11,7 @@ public class ServerTransferEvent extends Event
|
||||
private static final HandlerList _handlers = new HandlerList();
|
||||
private Player _player;
|
||||
private String _server;
|
||||
private Party _party;
|
||||
private boolean _draggedByParty;
|
||||
private boolean _cancel;
|
||||
|
||||
@ -59,4 +61,14 @@ public class ServerTransferEvent extends Event
|
||||
{
|
||||
_cancel = cancel;
|
||||
}
|
||||
|
||||
public Party getParty()
|
||||
{
|
||||
return _party;
|
||||
}
|
||||
|
||||
public void setParty(Party party)
|
||||
{
|
||||
_party = party;
|
||||
}
|
||||
}
|
||||
|
@ -12,9 +12,6 @@ import mineplex.core.achievement.AchievementManager;
|
||||
import mineplex.core.antihack.AntiHack;
|
||||
import mineplex.core.blockrestore.BlockRestore;
|
||||
import mineplex.core.chat.Chat;
|
||||
import mineplex.core.chatsnap.SnapshotManager;
|
||||
import mineplex.core.chatsnap.SnapshotPlugin;
|
||||
import mineplex.core.chatsnap.publishing.SnapshotPublisher;
|
||||
import mineplex.core.command.CommandCenter;
|
||||
import mineplex.core.common.MinecraftVersion;
|
||||
import mineplex.core.common.Pair;
|
||||
@ -39,8 +36,6 @@ import mineplex.core.portal.Portal;
|
||||
import mineplex.core.preferences.PreferencesManager;
|
||||
import mineplex.core.punish.Punish;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.report.ReportManager;
|
||||
import mineplex.core.report.ReportPlugin;
|
||||
import mineplex.core.resourcepack.ResourcePackManager;
|
||||
import mineplex.core.serverConfig.ServerConfiguration;
|
||||
import mineplex.core.spawn.Spawn;
|
||||
|
@ -1,7 +1,6 @@
|
||||
package mineplex.hub;
|
||||
|
||||
import mineplex.core.brawl.fountain.FountainManager;
|
||||
import com.avaje.ebean.config.ServerConfig;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
@ -74,10 +73,6 @@ import mineplex.minecraft.game.core.combat.CombatManager;
|
||||
import mineplex.minecraft.game.core.damage.DamageManager;
|
||||
import mineplex.minecraft.game.core.fire.Fire;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public class Hub extends JavaPlugin implements IRelation
|
||||
{
|
||||
private String WEB_CONFIG = "webServer";
|
||||
|
@ -1,10 +1,12 @@
|
||||
package nautilus.game.arcade.game.games.micro.modes.kits;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.common.util.UtilItem;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.kit.KitAvailability;
|
||||
@ -19,15 +21,16 @@ public class KitOverlord extends ProgressingKit
|
||||
};
|
||||
|
||||
private static final Perk[] PERKS = {
|
||||
new PerkFletcher(3, 16, true)
|
||||
new PerkFletcher(7, 4, true)
|
||||
};
|
||||
|
||||
private static final ItemStack IN_HAND = new ItemStack(Material.GOLDEN_APPLE);
|
||||
|
||||
private static final ItemStack[] PLAYER_ITEMS = {
|
||||
ItemStackFactory.Instance.CreateStack(Material.DIAMOND_SWORD),
|
||||
ItemStackFactory.Instance.CreateStack(Material.DIAMOND_SWORD, 4, Enchantment.DAMAGE_ALL),
|
||||
ItemStackFactory.Instance.CreateStack(Material.DIAMOND_PICKAXE),
|
||||
ItemStackFactory.Instance.CreateStack(Material.BOW),
|
||||
ItemStackFactory.Instance.CreateStack(Material.BOW, 25, Enchantment.ARROW_DAMAGE),
|
||||
ItemStackFactory.Instance.CreateStack(Material.COOKED_BEEF, 64),
|
||||
ItemStackFactory.Instance.CreateStack(Material.GOLDEN_APPLE, 5)
|
||||
};
|
||||
|
||||
@ -41,9 +44,9 @@ public class KitOverlord extends ProgressingKit
|
||||
{
|
||||
player.getInventory().addItem(PLAYER_ITEMS);
|
||||
|
||||
player.getInventory().setHelmet(new ItemStack(Material.DIAMOND_HELMET));
|
||||
player.getInventory().setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));
|
||||
player.getInventory().setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS));
|
||||
player.getInventory().setBoots(new ItemStack(Material.DIAMOND_BOOTS));
|
||||
player.getInventory().setHelmet(UtilItem.makeUnbreakable(new ItemStack(Material.DIAMOND_HELMET)));
|
||||
player.getInventory().setChestplate(UtilItem.makeUnbreakable(new ItemStack(Material.DIAMOND_CHESTPLATE)));
|
||||
player.getInventory().setLeggings(UtilItem.makeUnbreakable(new ItemStack(Material.DIAMOND_LEGGINGS)));
|
||||
player.getInventory().setBoots(UtilItem.makeUnbreakable(new ItemStack(Material.DIAMOND_BOOTS)));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user