Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
4193ee53ea
@ -1,10 +1,17 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact name="Mineplex.Hub:test">
|
||||
<output-path>$PROJECT_DIR$/../Testing/Hub</output-path>
|
||||
<root id="root">
|
||||
<element id="directory" name="plugins">
|
||||
<element id="artifact" artifact-name="Mineplex.Hub:jar" />
|
||||
</element>
|
||||
<artifact type="jar" build-on-make="true" name="Mineplex.Hub:test">
|
||||
<output-path>$PROJECT_DIR$/../Testing/Hub/plugins</output-path>
|
||||
<root id="archive" name="Hub.jar">
|
||||
<element id="module-output" name="Mineplex.Core" />
|
||||
<element id="module-output" name="Mineplex.Core.Common" />
|
||||
<element id="module-output" name="Mineplex.Hub" />
|
||||
<element id="module-output" name="Mineplex.Minecraft.Game.ClassCombat" />
|
||||
<element id="module-output" name="Mineplex.Minecraft.Game.Core" />
|
||||
<element id="extracted-dir" path="$PROJECT_DIR$/Libraries/commons-codec-1.6.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$PROJECT_DIR$/Libraries/commons-io-2.4.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$PROJECT_DIR$/Libraries/httpclient-4.2.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$PROJECT_DIR$/Libraries/httpcore-4.2.jar" path-in-jar="/" />
|
||||
<element id="file-copy" path="$PROJECT_DIR$/Mineplex.Hub/plugin.yml" />
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
@ -58,11 +58,12 @@ public class LobbyBalancer implements Listener, Runnable
|
||||
|
||||
while (_bestServerIndex < _sortedLobbies.size())
|
||||
{
|
||||
_bestServerIndex++;
|
||||
_maxPlayersToSendToBestServer = (_sortedLobbies.get(_bestServerIndex).getMaxPlayerCount() - _sortedLobbies.get(_bestServerIndex).getPlayerCount()) / bungeeBufferNumber;
|
||||
|
||||
if (_maxPlayersToSendToBestServer > 0)
|
||||
break;
|
||||
|
||||
_bestServerIndex++;
|
||||
}
|
||||
|
||||
if (_maxPlayersToSendToBestServer == 0)
|
||||
|
@ -1,5 +1,6 @@
|
||||
package mineplex.core.disguise.disguises;
|
||||
|
||||
import mineplex.core.common.*;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.CraftWorld;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftEntity;
|
||||
@ -8,6 +9,7 @@ import net.minecraft.server.v1_7_R4.DataWatcher;
|
||||
import net.minecraft.server.v1_7_R4.Entity;
|
||||
import net.minecraft.server.v1_7_R4.Packet;
|
||||
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityMetadata;
|
||||
import org.bukkit.entity.*;
|
||||
|
||||
public abstract class DisguiseBase
|
||||
{
|
||||
|
@ -3,8 +3,10 @@ package mineplex.core.disguise.disguises;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import mineplex.core.common.*;
|
||||
import net.minecraft.server.v1_7_R4.Packet;
|
||||
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityEquipment;
|
||||
import org.bukkit.*;
|
||||
|
||||
public abstract class DisguiseInsentient extends DisguiseLiving
|
||||
{
|
||||
@ -20,9 +22,23 @@ public abstract class DisguiseInsentient extends DisguiseLiving
|
||||
|
||||
public void SetName(String name)
|
||||
{
|
||||
DataWatcher.watch(10, name);
|
||||
SetName(name, null);
|
||||
}
|
||||
|
||||
public void SetName(String name, Rank rank)
|
||||
{
|
||||
if (rank != null)
|
||||
{
|
||||
if (rank.Has(Rank.ULTRA))
|
||||
{
|
||||
name = rank.GetTag(true, true) + " " + ChatColor.RESET + name;
|
||||
}
|
||||
}
|
||||
|
||||
DataWatcher.watch(10, name);
|
||||
}
|
||||
|
||||
|
||||
public boolean HasCustomName()
|
||||
{
|
||||
return DataWatcher.getString(10).length() > 0;
|
||||
|
@ -5,7 +5,6 @@ import java.util.UUID;
|
||||
import mineplex.core.MiniPlugin;
|
||||
import mineplex.core.account.event.RetrieveClientInformationEvent;
|
||||
import mineplex.core.common.util.NautHashMap;
|
||||
import mineplex.core.timing.TimingManager;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -52,9 +51,7 @@ public class EloManager extends MiniPlugin
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
TimingManager.start(event.getPlayerName() + " elo Account call.");
|
||||
NautHashMap<String, Integer> eloMap = _repository.loadClientInformation(event.getUniqueId());
|
||||
TimingManager.stop(event.getPlayerName() + " elo Account call.");
|
||||
|
||||
synchronized (_playerEloLock)
|
||||
{
|
||||
|
@ -288,6 +288,8 @@ public class GadgetManager extends MiniPlugin
|
||||
public void quit(PlayerQuitEvent event)
|
||||
{
|
||||
_lastMove.remove(event.getPlayer());
|
||||
|
||||
_playerActiveGadgetMap.remove(event.getPlayer());
|
||||
}
|
||||
|
||||
public void setActive(Player player, Gadget gadget)
|
||||
|
@ -40,7 +40,7 @@ public class MorphBlaze extends MorphGadget
|
||||
this.ApplyArmor(player);
|
||||
|
||||
DisguiseBlaze disguise = new DisguiseBlaze(player);
|
||||
disguise.SetName(Manager.getClientManager().Get(player).GetRank().GetTag(true, true) + " " + ChatColor.RESET + player.getName());
|
||||
disguise.SetName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
Manager.getDisguiseManager().disguise(disguise);
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ public class MorphChicken extends MorphGadget
|
||||
this.ApplyArmor(player);
|
||||
|
||||
DisguiseChicken disguise = new DisguiseChicken(player);
|
||||
disguise.SetName(Manager.getClientManager().Get(player).GetRank().GetTag(true, true) + " " + ChatColor.RESET + player.getName());
|
||||
disguise.SetName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
Manager.getDisguiseManager().disguise(disguise);
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ public class MorphCreeper extends MorphGadget
|
||||
this.ApplyArmor(player);
|
||||
|
||||
DisguiseCreeper disguise = new DisguiseCreeper(player);
|
||||
disguise.SetName(Manager.getClientManager().Get(player).GetRank().GetTag(true, true) + " " + ChatColor.RESET + player.getName());
|
||||
disguise.SetName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
Manager.getDisguiseManager().disguise(disguise);
|
||||
}
|
||||
|
@ -7,9 +7,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerToggleFlightEvent;
|
||||
import org.bukkit.event.player.*;
|
||||
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.C;
|
||||
@ -52,7 +50,7 @@ public class MorphPig extends MorphGadget
|
||||
this.ApplyArmor(player);
|
||||
|
||||
DisguisePig disguise = new DisguisePig(player);
|
||||
disguise.SetName(Manager.getClientManager().Get(player).GetRank().GetTag(true, true) + " " + ChatColor.RESET + player.getName());
|
||||
disguise.SetName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
Manager.getDisguiseManager().disguise(disguise);
|
||||
}
|
||||
@ -172,4 +170,10 @@ public class MorphPig extends MorphGadget
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Clean(PlayerQuitEvent event)
|
||||
{
|
||||
_double.remove(event.getPlayer());
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ public class MorphPumpkinKing extends MorphGadget
|
||||
|
||||
DisguiseSkeleton disguise = new DisguiseSkeleton(player);
|
||||
disguise.showArmor();
|
||||
disguise.SetName(Manager.getClientManager().Get(player).GetRank().GetTag(true, true) + " " + ChatColor.RESET + player.getName());
|
||||
disguise.SetName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.SetSkeletonType(SkeletonType.WITHER);
|
||||
Manager.getDisguiseManager().disguise(disguise);
|
||||
|
@ -32,7 +32,7 @@ public class MorphSnowman extends MorphGadget
|
||||
this.ApplyArmor(player);
|
||||
|
||||
DisguiseSnowman disguise = new DisguiseSnowman(player);
|
||||
disguise.SetName(Manager.getClientManager().Get(player).GetRank().GetTag(true, true) + " " + ChatColor.RESET + player.getName());
|
||||
disguise.SetName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
Manager.getDisguiseManager().disguise(disguise);
|
||||
}
|
||||
|
@ -20,7 +20,6 @@ import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.preferences.command.PreferencesCommand;
|
||||
import mineplex.core.preferences.ui.PreferencesShop;
|
||||
import mineplex.core.timing.TimingManager;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
|
||||
@ -73,9 +72,7 @@ public class PreferencesManager extends MiniClientPlugin<UserPreferences>
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
TimingManager.start(event.getPlayerName() + " pref Account call.");
|
||||
Set(event.getPlayerName(), _repository.loadClientInformation(event.getUniqueId()));
|
||||
TimingManager.stop(event.getPlayerName() + " pref Account call.");
|
||||
event.decreaseProcessingCount();
|
||||
}
|
||||
});
|
||||
|
@ -200,8 +200,6 @@ public abstract class ShopBase<PluginType extends MiniPlugin> implements Listene
|
||||
SetCurrentPageForPlayer(player, page);
|
||||
|
||||
player.openInventory(page);
|
||||
|
||||
System.out.println(this.getClass().getName() + " - player.openInventory(page);");
|
||||
}
|
||||
|
||||
public void SetCurrentPageForPlayer(Player player, ShopPageBase<PluginType, ? extends ShopBase<PluginType>> page)
|
||||
|
@ -426,7 +426,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
{
|
||||
DisguiseSlime disguise = new DisguiseSlime(entity);
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.SetName(((LivingEntity)entity).getCustomName());
|
||||
disguise.SetName(((LivingEntity)entity).getCustomName(), null);
|
||||
disguise.SetSize(2);
|
||||
_disguiseManager.disguise(disguise);
|
||||
}
|
||||
|
@ -86,6 +86,7 @@ public class LobbyMenu extends ShopPageBase<ServerManager, LobbyShop> implements
|
||||
public void Update()
|
||||
{
|
||||
clear();
|
||||
ButtonMap.clear();
|
||||
BuildPage();
|
||||
}
|
||||
|
||||
|
@ -126,6 +126,9 @@ public class ServerMonitor
|
||||
for (MinecraftServer minecraftServer : _repository.getServerStatuses())
|
||||
{
|
||||
onlineServers.add(minecraftServer.getName());
|
||||
|
||||
if (minecraftServer.getTps() <= 17)
|
||||
System.out.println("[Performance] " + minecraftServer.getName() + ":" + minecraftServer.getPublicAddress() + "] Running poorly at " + minecraftServer.getTps() + " TPS");
|
||||
}
|
||||
|
||||
for (Iterator<Entry<String, Entry<String, Long>>> iterator = serverTracker.entrySet().iterator(); iterator.hasNext();)
|
||||
@ -259,7 +262,6 @@ public class ServerMonitor
|
||||
{
|
||||
List<MinecraftServer> emptyServers = new ArrayList<MinecraftServer>(serverGroup.getEmptyServers());
|
||||
MinecraftServer emptyServer = emptyServers.get(serversToKill - 1);
|
||||
System.out.println("[" + emptyServer.getName() + ":" + emptyServer.getPublicAddress() + "] Killing " + serverGroup.getName() + " Req Total: " + serverGroup.getRequiredTotalServers() + " Req Joinable: " + serverGroup.getRequiredJoinableServers() + " | Actual Total: " + serverGroup.getServerCount() + " Actual Joinable: " + serverGroup.getJoinableCount());
|
||||
killServer(emptyServer);
|
||||
serversToKill--;
|
||||
}
|
||||
|
@ -302,7 +302,7 @@ public class SuperSmashTeam extends TeamGame
|
||||
player.playSound(player.getLocation(), Sound.NOTE_PLING, 1f, 2f);
|
||||
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void ExplosionDamageCancel(EntityDamageEvent event)
|
||||
|
Loading…
Reference in New Issue
Block a user