Merge branch 'master' of ssh://184.154.0.242:7999/min/mineplex
This commit is contained in:
commit
d4512e464a
@ -16,9 +16,17 @@
|
||||
<include name="*.yml"/>
|
||||
</fileset>
|
||||
|
||||
<zipfileset src="../Libraries/jooq-3.4.2.jar" />
|
||||
<zipfileset src="../Libraries/httpclient-4.2.jar" />
|
||||
<zipfileset src="../Libraries/httpcore-4.2.jar" />
|
||||
<zipfileset src="../Libraries/httpclient-cache-4.2.jar" />
|
||||
<zipfileset src="../Libraries/httpmime-4.2.jar" />
|
||||
<zipfileset src="../Libraries/gson-2.2.1.jar" />
|
||||
<zipfileset src="../Libraries/commons-logging-1.1.1.jar" />
|
||||
<zipfileset src="../Libraries/commons-codec-1.6.jar" />
|
||||
<zipfileset src="../Libraries/commons-dbcp2-2.0.1.jar" />
|
||||
<zipfileset src="../Libraries/jedis-2.4.2.jar" />
|
||||
<zipfileset src="../Libraries/commons-pool2-2.2.jar" />
|
||||
</jar>
|
||||
<copy file="../bin/EnjinTranslator.jar" todir="../../Testing/EnjinTranslator/plugins"/>
|
||||
</target>
|
||||
|
@ -35,6 +35,7 @@
|
||||
<zipfileset src="../Libraries/gson-2.2.1.jar" />
|
||||
<zipfileset src="../Libraries/commons-logging-1.1.1.jar" />
|
||||
<zipfileset src="../Libraries/commons-codec-1.6.jar" />
|
||||
<zipfileset src="../Libraries/commons-dbcp2-2.0.1.jar" />
|
||||
<zipfileset src="../Libraries/jedis-2.4.2.jar" />
|
||||
<zipfileset src="../Libraries/commons-pool2-2.2.jar" />
|
||||
<zipfileset src="../Libraries/commons-dbcp2-2.0.1.jar" />
|
||||
@ -75,6 +76,7 @@
|
||||
<zipfileset src="../Libraries/gson-2.2.1.jar" />
|
||||
<zipfileset src="../Libraries/commons-logging-1.1.1.jar" />
|
||||
<zipfileset src="../Libraries/commons-io-2.4.jar" />
|
||||
<zipfileset src="../Libraries/commons-dbcp2-2.0.1.jar" />
|
||||
<zipfileset src="../Libraries/commons-codec-1.6.jar" />
|
||||
<zipfileset src="../Libraries/jooq-3.4.2.jar" />
|
||||
<zipfileset src="../Libraries/jedis-2.4.2.jar" />
|
||||
@ -97,21 +99,25 @@
|
||||
<fileset dir="../Mineplex.StaffServer">
|
||||
<include name="*.yml"/>
|
||||
</fileset>
|
||||
<fileset dir="../Mineplex.Database/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
<fileset dir="../Mineplex.ServerData/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
|
||||
<zipfileset src="../Libraries/jooq-3.4.2.jar" />
|
||||
<zipfileset src="../Libraries/httpclient-4.2.jar" />
|
||||
<zipfileset src="../Libraries/httpcore-4.2.jar" />
|
||||
<zipfileset src="../Libraries/httpclient-cache-4.2.jar" />
|
||||
<zipfileset src="../Libraries/httpmime-4.2.jar" />
|
||||
<zipfileset src="../Libraries/gson-2.2.1.jar" />
|
||||
<zipfileset src="../Libraries/commons-logging-1.1.1.jar" />
|
||||
<zipfileset src="../Libraries/commons-io-2.4.jar" />
|
||||
<zipfileset src="../Libraries/commons-codec-1.6.jar" />
|
||||
<zipfileset src="../Libraries/jooq-3.4.2.jar" />
|
||||
<zipfileset src="../Libraries/commons-dbcp2-2.0.1.jar" />
|
||||
<zipfileset src="../Libraries/jedis-2.4.2.jar" />
|
||||
<zipfileset src="../Libraries/commons-pool2-2.2.jar" />
|
||||
<zipfileset src="../Libraries/commons-dbcp2-2.0.1.jar" />
|
||||
</jar>
|
||||
<copy file="../bin/StaffServer.jar" todir="../../Testing/StaffServer/plugins"/>
|
||||
</target>
|
||||
|
@ -3,7 +3,6 @@ package mineplex.core;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import mineplex.core.common.DummyEntity;
|
||||
import mineplex.core.common.util.NautHashMap;
|
||||
@ -27,7 +26,6 @@ import net.minecraft.server.v1_7_R4.WatchableObject;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.CraftWorld;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
@ -64,6 +62,8 @@ public class CustomTagFix extends MiniPlugin implements IPacketHandler
|
||||
public void playerQuit(PlayerQuitEvent event)
|
||||
{
|
||||
_entityMap.remove(event.getPlayer());
|
||||
_entityNameMap.remove(event.getPlayer());
|
||||
_entityVehicleMap.remove(event.getPlayer());
|
||||
_loggedIn.remove(event.getPlayer());
|
||||
}
|
||||
|
||||
@ -81,6 +81,8 @@ public class CustomTagFix extends MiniPlugin implements IPacketHandler
|
||||
{
|
||||
iterator.remove();
|
||||
_entityMap.remove(player);
|
||||
_entityNameMap.remove(player);
|
||||
_entityVehicleMap.remove(player);
|
||||
System.out.println("Found broken player in CustomTagFix.... '" + player.getName() + "'");
|
||||
}
|
||||
}
|
||||
@ -437,3 +439,4 @@ public class CustomTagFix extends MiniPlugin implements IPacketHandler
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
79
Plugins/Mineplex.Core/src/mineplex/core/Replay.java
Normal file
79
Plugins/Mineplex.Core/src/mineplex/core/Replay.java
Normal file
@ -0,0 +1,79 @@
|
||||
package mineplex.core;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import mineplex.core.common.util.NautHashMap;
|
||||
import mineplex.core.packethandler.IPacketHandler;
|
||||
import mineplex.core.packethandler.PacketHandler;
|
||||
import mineplex.core.packethandler.PacketInfo;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public class Replay extends MiniPlugin implements IPacketHandler
|
||||
{
|
||||
private NautHashMap<PacketInfo, Long> _packetList = new NautHashMap<PacketInfo, Long>();
|
||||
private long _startTime = 0;
|
||||
private long _replayTime = 0;
|
||||
private boolean _replay = false;
|
||||
private long _speed = 20;
|
||||
|
||||
public Replay(JavaPlugin plugin, PacketHandler packetHandler)
|
||||
{
|
||||
super("Replay", plugin);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void interact(PlayerInteractEvent event)
|
||||
{
|
||||
if (event.getItem().getType() == Material.WEB)
|
||||
{
|
||||
event.getPlayer().setItemInHand(new ItemStack(Material.STICK, 1));
|
||||
_replay = true;
|
||||
_replayTime = System.currentTimeMillis();
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void replay(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.TICK || !_replay)
|
||||
return;
|
||||
|
||||
for (Iterator<Entry<PacketInfo, Long>> entryIterator = _packetList.entrySet().iterator(); entryIterator.hasNext();)
|
||||
{
|
||||
Entry<PacketInfo, Long> entry = entryIterator.next();
|
||||
|
||||
if ((System.currentTimeMillis() + _speed) - _replayTime > entry.getValue())
|
||||
{
|
||||
entry.getKey().getVerifier().bypassProcess(entry.getKey().getPacket());
|
||||
entryIterator.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void handle(PacketInfo packetInfo)
|
||||
{
|
||||
if (_replay)
|
||||
{
|
||||
packetInfo.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_startTime == 0)
|
||||
_startTime = System.currentTimeMillis();
|
||||
|
||||
_packetList.put(packetInfo, System.currentTimeMillis() - _startTime);
|
||||
|
||||
// write out packets?
|
||||
if (packetInfo.isCancelled())
|
||||
return;
|
||||
}
|
||||
}
|
@ -68,7 +68,7 @@ public class AccountRepository extends RepositoryBase
|
||||
return new JsonWebCall(_webAddress + "PlayerAccount/GetAccountByUUID").ExecuteReturnStream(uuid.toString());
|
||||
}
|
||||
|
||||
public void saveRank(final Callback<Rank> callback, final String name, Rank rank, final boolean perm)
|
||||
public void saveRank(final Callback<Rank> callback, final String name, final Rank rank, final boolean perm)
|
||||
{
|
||||
final RankUpdateToken token = new RankUpdateToken();
|
||||
token.Name = name;
|
||||
@ -79,19 +79,19 @@ public class AccountRepository extends RepositoryBase
|
||||
{
|
||||
public void run(Rank response)
|
||||
{
|
||||
if (response == Rank.ULTRA || response == Rank.HERO)
|
||||
if (rank == Rank.ULTRA || rank == Rank.HERO)
|
||||
{
|
||||
if (perm)
|
||||
executeUpdate(UPDATE_ACCOUNT_RANK_DONOR_PERM, new ColumnVarChar("rank", 100, response.toString()), new ColumnVarChar("donorRank", 100, response.toString()), new ColumnVarChar("uuid", 100, UUIDFetcher.getUUIDOf(name).toString()));
|
||||
executeUpdate(UPDATE_ACCOUNT_RANK_DONOR_PERM, new ColumnVarChar("rank", 100, rank.toString()), new ColumnVarChar("donorRank", 100, rank.toString()), new ColumnVarChar("uuid", 100, UUIDFetcher.getUUIDOf(name).toString()));
|
||||
else
|
||||
executeUpdate(UPDATE_ACCOUNT_RANK_DONOR, new ColumnVarChar("rank", 100, response.toString()), new ColumnVarChar("donorRank", 100, response.toString()), new ColumnVarChar("uuid", 100, UUIDFetcher.getUUIDOf(name).toString()));
|
||||
executeUpdate(UPDATE_ACCOUNT_RANK_DONOR, new ColumnVarChar("rank", 100, rank.toString()), new ColumnVarChar("donorRank", 100, rank.toString()), new ColumnVarChar("uuid", 100, UUIDFetcher.getUUIDOf(name).toString()));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (perm)
|
||||
executeUpdate(UPDATE_ACCOUNT_RANK_PERM, new ColumnVarChar("rank", 100, response.toString()), new ColumnVarChar("uuid", 100, UUIDFetcher.getUUIDOf(name).toString()));
|
||||
executeUpdate(UPDATE_ACCOUNT_RANK_PERM, new ColumnVarChar("rank", 100, rank.toString()), new ColumnVarChar("uuid", 100, UUIDFetcher.getUUIDOf(name).toString()));
|
||||
else
|
||||
executeUpdate(UPDATE_ACCOUNT_RANK, new ColumnVarChar("rank", 100, response.toString()), new ColumnVarChar("uuid", 100, UUIDFetcher.getUUIDOf(name).toString()));
|
||||
executeUpdate(UPDATE_ACCOUNT_RANK, new ColumnVarChar("rank", 100, rank.toString()), new ColumnVarChar("uuid", 100, UUIDFetcher.getUUIDOf(name).toString()));
|
||||
}
|
||||
|
||||
callback.run(response);
|
||||
|
@ -265,7 +265,7 @@ public class NpcManager extends MiniPlugin
|
||||
String inHand = itemStackToYaml(player.getInventory().getItemInHand());
|
||||
|
||||
NpcsRecord npcsRecord = DSL.using(connection).newRecord(Tables.npcs);
|
||||
npcsRecord.setServer(GetPlugin().getClass().getSimpleName());
|
||||
npcsRecord.setServer(getServerName());
|
||||
npcsRecord.setName(name);
|
||||
npcsRecord.setWorld(player.getWorld().getName());
|
||||
npcsRecord.setX(player.getLocation().getX());
|
||||
@ -410,7 +410,7 @@ public class NpcManager extends MiniPlugin
|
||||
((EntityInsentient) ((CraftLivingEntity) entity).getHandle()).persistent = true;
|
||||
UtilEnt.silence(entity, true);
|
||||
|
||||
if (!entity.getLocation().getChunk().isLoaded() || !(entity instanceof CraftCreature))
|
||||
if (!entity.getLocation().getChunk().isLoaded())
|
||||
continue;
|
||||
|
||||
if (!entity.isDead() && entity.isValid())
|
||||
@ -476,7 +476,7 @@ public class NpcManager extends MiniPlugin
|
||||
|
||||
public void loadNpcs() throws SQLException
|
||||
{
|
||||
String serverType = _plugin.getClass().getSimpleName();
|
||||
String serverType = getServerName();
|
||||
|
||||
try (Connection connection = DBPool.getInstance().getConnection())
|
||||
{
|
||||
@ -502,7 +502,7 @@ public class NpcManager extends MiniPlugin
|
||||
{
|
||||
if (deleteFromDatabase)
|
||||
{
|
||||
String serverType = _plugin.getClass().getSimpleName();
|
||||
String serverType = getServerName();
|
||||
|
||||
try (Connection connection = DBPool.getInstance().getConnection())
|
||||
{
|
||||
@ -585,4 +585,14 @@ public class NpcManager extends MiniPlugin
|
||||
if (npc != null)
|
||||
npc.setEntity(null);
|
||||
}
|
||||
|
||||
public String getServerName()
|
||||
{
|
||||
String serverName = GetPlugin().getClass().getSimpleName();
|
||||
|
||||
if (Bukkit.getMotd() != null && Bukkit.getMotd().equalsIgnoreCase("test"))
|
||||
serverName += "-Test";
|
||||
|
||||
return serverName;
|
||||
}
|
||||
}
|
||||
|
@ -10,5 +10,5 @@
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${BUILD_FILES}/EnjinTranslator.xml"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/>
|
||||
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${${build_files}:/EnjinTranslator}"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/EnjinTranslator}"/>
|
||||
</launchConfiguration>
|
||||
|
@ -14,6 +14,7 @@ import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import mineplex.core.MiniPlugin;
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.UUIDFetcher;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.inventory.InventoryManager;
|
||||
@ -73,7 +74,6 @@ public class Enjin extends MiniPlugin implements CommandExecutor
|
||||
String name = args[1];
|
||||
int amount = Integer.parseInt(args[2]);
|
||||
|
||||
;
|
||||
_donationManager.RewardGems(null, "purchase", name, UUIDFetcher.getUUIDOf(name), amount);
|
||||
System.out.println("[" + _dateFormat.format(new Date()) + "] " + name + " received " + amount + " gems.");
|
||||
}
|
||||
@ -96,12 +96,25 @@ public class Enjin extends MiniPlugin implements CommandExecutor
|
||||
}
|
||||
else if (args.length == 4 && args[0].equalsIgnoreCase("rank"))
|
||||
{
|
||||
String name = args[1];
|
||||
String rank = args[2];
|
||||
boolean perm = Boolean.parseBoolean(args[3]);
|
||||
final String name = args[1];
|
||||
final String rank = args[2];
|
||||
final boolean perm = Boolean.parseBoolean(args[3]);
|
||||
|
||||
_clientManager.SaveRank(name, mineplex.core.common.Rank.valueOf(rank), perm);
|
||||
System.out.println("[" + _dateFormat.format(new Date()) + "] " + name + " received " + rank + " " + (perm ? "permanently." : "for 1 month."));
|
||||
_clientManager.loadClientByName(name, new Runnable()
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
if (_clientManager.Get(name).GetRank() == Rank.ALL || _clientManager.Get(name).GetRank() == Rank.ULTRA || _clientManager.Get(name).GetRank() == Rank.HERO)
|
||||
{
|
||||
_clientManager.SaveRank(name, mineplex.core.common.Rank.valueOf(rank), perm);
|
||||
System.out.println("[" + _dateFormat.format(new Date()) + "] " + name + " received " + rank + " " + (perm ? "permanently." : "for 1 month."));
|
||||
}
|
||||
else
|
||||
{
|
||||
System.out.println("[" + _dateFormat.format(new Date()) + "] " + name + " DENIED INFERIOR " + rank + " " + (perm ? "permanently." : "for 1 month."));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (args.length >= 3 && args[0].equalsIgnoreCase("purchase"))
|
||||
{
|
||||
|
@ -4,6 +4,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import mineplex.core.CustomTagFix;
|
||||
import mineplex.core.Replay;
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.antihack.AntiHack;
|
||||
import mineplex.core.antistack.AntiStack;
|
||||
@ -108,6 +109,7 @@ public class Hub extends JavaPlugin implements IRelation
|
||||
new MemoryFix(this);
|
||||
new FileUpdater(this, portal);
|
||||
new CustomTagFix(this, packetHandler);
|
||||
//new Replay(this, packetHandler);
|
||||
|
||||
CombatManager combatManager = new CombatManager(this);
|
||||
BlockRestore blockRestore = new BlockRestore(this);
|
||||
|
@ -142,7 +142,8 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "Dragons",
|
||||
ChatColor.RESET + "One in the Quiver",
|
||||
ChatColor.RESET + "Dragon Escape",
|
||||
ChatColor.RESET + "Milk the Cow",
|
||||
ChatColor.RESET + "Sneaky Assassins",
|
||||
ChatColor.RESET + "Micro Battle",
|
||||
ChatColor.RESET + "Super Paintball",
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
@ -159,7 +160,8 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "Dragons",
|
||||
ChatColor.RESET + "One in the Quiver",
|
||||
ChatColor.RESET + "Dragon Escape",
|
||||
ChatColor.RESET + "Milk the Cow",
|
||||
ChatColor.RESET + "Sneaky Assassins",
|
||||
ChatColor.RESET + "Micro Battle",
|
||||
ChatColor.RESET + "Super Paintball",
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
@ -176,7 +178,8 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + C.Bold + ChatColor.GREEN + "Dragons",
|
||||
ChatColor.RESET + "One in the Quiver",
|
||||
ChatColor.RESET + "Dragon Escape",
|
||||
ChatColor.RESET + "Milk the Cow",
|
||||
ChatColor.RESET + "Sneaky Assassins",
|
||||
ChatColor.RESET + "Micro Battle",
|
||||
ChatColor.RESET + "Super Paintball",
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
@ -193,7 +196,8 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "Dragons",
|
||||
ChatColor.RESET + C.Bold + ChatColor.GREEN + "One in the Quiver",
|
||||
ChatColor.RESET + "Dragon Escape",
|
||||
ChatColor.RESET + "Milk the Cow",
|
||||
ChatColor.RESET + "Sneaky Assassins",
|
||||
ChatColor.RESET + "Micro Battle",
|
||||
ChatColor.RESET + "Super Paintball",
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
@ -210,7 +214,8 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "Dragons",
|
||||
ChatColor.RESET + "One in the Quiver",
|
||||
ChatColor.RESET + C.Bold + ChatColor.GREEN + "Dragon Escape",
|
||||
ChatColor.RESET + "Milk the Cow",
|
||||
ChatColor.RESET + "Sneaky Assassins",
|
||||
ChatColor.RESET + "Micro Battle",
|
||||
ChatColor.RESET + "Super Paintball",
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
@ -227,7 +232,26 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "Dragons",
|
||||
ChatColor.RESET + "One in the Quiver",
|
||||
ChatColor.RESET + "Dragon Escape",
|
||||
ChatColor.RESET + C.Bold + ChatColor.GREEN + "Milk the Cow",
|
||||
ChatColor.RESET + C.Bold + ChatColor.GREEN + "Sneaky Assassins",
|
||||
ChatColor.RESET + "Micro Battle",
|
||||
ChatColor.RESET + "Super Paintball",
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
ChatColor.RESET + "Bacon Brawl",
|
||||
}));
|
||||
|
||||
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(Material.MILK_BUCKET.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Play all of these fun minigames:",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Super Spleef",
|
||||
ChatColor.RESET + "Runner",
|
||||
ChatColor.RESET + "Dragons",
|
||||
ChatColor.RESET + "One in the Quiver",
|
||||
ChatColor.RESET + "Dragon Escape",
|
||||
ChatColor.RESET + "Sneaky Assassins",
|
||||
ChatColor.RESET + C.Bold + ChatColor.GREEN + "Micro Battle",
|
||||
ChatColor.RESET + "Super Paintball",
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
@ -244,7 +268,8 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "Dragons",
|
||||
ChatColor.RESET + "One in the Quiver",
|
||||
ChatColor.RESET + "Dragon Escape",
|
||||
ChatColor.RESET + "Milk the Cow",
|
||||
ChatColor.RESET + "Sneaky Assassins",
|
||||
ChatColor.RESET + "Micro Battle",
|
||||
ChatColor.RESET + C.Bold + ChatColor.GREEN + "Super Paintball",
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
@ -261,7 +286,8 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "Dragons",
|
||||
ChatColor.RESET + "One in the Quiver",
|
||||
ChatColor.RESET + "Dragon Escape",
|
||||
ChatColor.RESET + "Milk the Cow",
|
||||
ChatColor.RESET + "Sneaky Assassins",
|
||||
ChatColor.RESET + "Micro Battle",
|
||||
ChatColor.RESET + "Super Paintball",
|
||||
ChatColor.RESET + C.Bold + ChatColor.GREEN + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
@ -278,7 +304,8 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "Dragons",
|
||||
ChatColor.RESET + "One in the Quiver",
|
||||
ChatColor.RESET + "Dragon Escape",
|
||||
ChatColor.RESET + "Milk the Cow",
|
||||
ChatColor.RESET + "Sneaky Assassins",
|
||||
ChatColor.RESET + "Micro Battle",
|
||||
ChatColor.RESET + "Super Paintball",
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + C.Bold + ChatColor.GREEN + "Death Tag",
|
||||
@ -295,7 +322,8 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "Dragons",
|
||||
ChatColor.RESET + "One in the Quiver",
|
||||
ChatColor.RESET + "Dragon Escape",
|
||||
ChatColor.RESET + "Milk the Cow",
|
||||
ChatColor.RESET + "Sneaky Assassins",
|
||||
ChatColor.RESET + "Micro Battle",
|
||||
ChatColor.RESET + "Super Paintball",
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
|
@ -119,13 +119,13 @@ public class Arcade extends JavaPlugin
|
||||
GadgetManager gadgetManager = new GadgetManager(this, _clientManager, _donationManager, inventoryManager, mountManager, petManager, preferenceManager, disguiseManager, blockRestore, projectileManager);
|
||||
CosmeticManager cosmeticManager = new CosmeticManager(this, _clientManager, _donationManager, inventoryManager, gadgetManager, mountManager, petManager, true);
|
||||
cosmeticManager.setInterfaceSlot(7);
|
||||
new CustomTagFix(this, packetHandler);
|
||||
|
||||
//Arcade Manager
|
||||
_gameManager = new ArcadeManager(this, serverStatusManager, ReadServerConfig(), _clientManager, _donationManager, _damageManager, disguiseManager, creature, teleport, new Blood(this), antistack, portal, preferenceManager, inventoryManager, packetHandler, cosmeticManager, projectileManager, petManager, webServerAddress);
|
||||
new PlayerTracker(this, serverStatusManager.getCurrentServerName(), serverStatusManager.getUs());
|
||||
|
||||
new MemoryFix(this);
|
||||
new CustomTagFix(this, packetHandler);
|
||||
|
||||
new FriendManager(this, preferenceManager);
|
||||
|
||||
|
@ -625,15 +625,11 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
||||
// Reserved Slot Check
|
||||
if (Bukkit.getOnlinePlayers().size() >= Bukkit.getServer().getMaxPlayers())
|
||||
{
|
||||
if (_serverStatusManager.getCurrentServerName().contains("BETA"))
|
||||
if (_clientManager.Get(event.getPlayer().getName()).GetRank().Has(event.getPlayer(), Rank.HELPER, false))
|
||||
{
|
||||
if (_clientManager.Get(event.getPlayer().getName()).GetRank()
|
||||
.Has(event.getPlayer(), Rank.HELPER, false))
|
||||
{
|
||||
event.allow();
|
||||
event.setResult(PlayerLoginEvent.Result.ALLOWED);
|
||||
return;
|
||||
}
|
||||
event.allow();
|
||||
event.setResult(PlayerLoginEvent.Result.ALLOWED);
|
||||
return;
|
||||
}
|
||||
else if (_clientManager.Get(event.getPlayer().getName()).GetRank()
|
||||
.Has(event.getPlayer(), Rank.ULTRA, false)
|
||||
@ -641,7 +637,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
||||
_serverConfig.ServerType + " ULTRA"))
|
||||
{
|
||||
|
||||
if (GetGame() != null && (GetGame().GetType() == GameType.UHC || GetGame().GetType() == GameType.ChampionsDominate || GetGame().GetType() == GameType.ChampionsTDM || GetGame().GetType() == GameType.MineStrike))
|
||||
if (GetGame() != null && (GetGame().GetType() == GameType.UHC || GetGame().GetType() == GameType.Halloween || GetGame().GetType() == GameType.ChampionsDominate || GetGame().GetType() == GameType.ChampionsTDM || GetGame().GetType() == GameType.MineStrike))
|
||||
{
|
||||
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, C.Bold + "Server has reached max capacity for gameplay purposes.");
|
||||
return;
|
||||
|
@ -86,6 +86,7 @@ public class Halloween extends SoloGame
|
||||
public long updateBossN = 0;
|
||||
public long updateBossO = 0;
|
||||
|
||||
public boolean debug = false;
|
||||
public boolean bossDebug = false;
|
||||
|
||||
public Halloween(ArcadeManager manager)
|
||||
@ -183,18 +184,21 @@ public class Halloween extends SoloGame
|
||||
if (event.getType() != UpdateType.SLOW)
|
||||
return;
|
||||
|
||||
System.out.println("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
|
||||
System.out.println("Wave: " + _wave);
|
||||
System.out.println("Mobs: " + _mobs.size());
|
||||
System.out.println(" ");
|
||||
System.out.println("Total Time: " + UtilTime.convertString(total, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Move Time: " + UtilTime.convertString(move, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Move Count: " + moves);
|
||||
System.out.println("Wave Time: " + UtilTime.convertString(wave, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Sound Time: " + UtilTime.convertString(sound, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Update Time: " + UtilTime.convertString(update, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Damage Time: " + UtilTime.convertString(damage, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Target Time: " + UtilTime.convertString(target, 4, TimeUnit.MILLISECONDS));
|
||||
if (debug)
|
||||
{
|
||||
System.out.println("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
|
||||
System.out.println("Wave: " + _wave);
|
||||
System.out.println("Mobs: " + _mobs.size());
|
||||
System.out.println(" ");
|
||||
System.out.println("Total Time: " + UtilTime.convertString(total, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Move Time: " + UtilTime.convertString(move, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Move Count: " + moves);
|
||||
System.out.println("Wave Time: " + UtilTime.convertString(wave, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Sound Time: " + UtilTime.convertString(sound, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Update Time: " + UtilTime.convertString(update, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Damage Time: " + UtilTime.convertString(damage, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Target Time: " + UtilTime.convertString(target, 4, TimeUnit.MILLISECONDS));
|
||||
}
|
||||
|
||||
if (bossDebug)
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ public class KitNecromancer extends Kit
|
||||
new PerkSkeletons(true)
|
||||
},
|
||||
EntityType.ZOMBIE,
|
||||
new ItemStack(Material.SKULL));
|
||||
new ItemStack(Material.SKULL_ITEM));
|
||||
|
||||
}
|
||||
|
||||
|
@ -69,8 +69,7 @@ import nautilus.game.arcade.kit.Kit;
|
||||
import nautilus.game.arcade.kit.KitAvailability;
|
||||
import nautilus.game.arcade.kit.KitSorter;
|
||||
import net.minecraft.server.v1_7_R4.Packet;
|
||||
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityMetadata;
|
||||
import net.minecraft.server.v1_7_R4.WatchableObject;
|
||||
import net.minecraft.server.v1_7_R4.PacketPlayOutSpawnEntityLiving;
|
||||
|
||||
public class GameLobbyManager implements Listener, IPacketHandler
|
||||
{
|
||||
@ -1093,9 +1092,9 @@ public class GameLobbyManager implements Listener, IPacketHandler
|
||||
|
||||
int entityId = -1;
|
||||
|
||||
if (packet instanceof PacketPlayOutEntityMetadata)
|
||||
if (packet instanceof PacketPlayOutSpawnEntityLiving)
|
||||
{
|
||||
entityId = ((PacketPlayOutEntityMetadata)packet).a;
|
||||
entityId = ((PacketPlayOutSpawnEntityLiving)packet).a;
|
||||
}
|
||||
|
||||
if (entityId != -1)
|
||||
@ -1116,31 +1115,10 @@ public class GameLobbyManager implements Listener, IPacketHandler
|
||||
{
|
||||
try
|
||||
{
|
||||
if (packet instanceof PacketPlayOutEntityMetadata)
|
||||
if (packet instanceof PacketPlayOutSpawnEntityLiving)
|
||||
{
|
||||
List<WatchableObject> watchables = new ArrayList<WatchableObject>();
|
||||
|
||||
for (WatchableObject watchableObject : (List<WatchableObject>)((PacketPlayOutEntityMetadata) packet).b)
|
||||
{
|
||||
WatchableObject newWatch = new WatchableObject(watchableObject.c(), watchableObject.a(), watchableObject.b());
|
||||
|
||||
if (newWatch.a() == 10)
|
||||
{
|
||||
newWatch.a(customName);
|
||||
}
|
||||
|
||||
watchables.add(newWatch);
|
||||
}
|
||||
|
||||
PacketPlayOutEntityMetadata newPacket = new PacketPlayOutEntityMetadata();
|
||||
newPacket.a = entityId;
|
||||
newPacket.b = watchables;
|
||||
|
||||
_handlingPacket = true;
|
||||
packetVerifier.process(newPacket);
|
||||
_handlingPacket = false;
|
||||
|
||||
packetInfo.setCancelled(true);
|
||||
((PacketPlayOutSpawnEntityLiving)packet).l.watch(2, customName);
|
||||
((PacketPlayOutSpawnEntityLiving)packet).l.watch(10, customName);
|
||||
}
|
||||
}
|
||||
catch (IllegalArgumentException e)
|
||||
|
Loading…
Reference in New Issue
Block a user