Merge branch 'clans-beta' of http://184.154.0.242:7990/scm/min/mineplex into clans_custom_gear

This commit is contained in:
Ty Sayers 2015-08-28 14:17:22 -07:00
commit 35c79804ac
19 changed files with 2143 additions and 32 deletions

View File

@ -6,7 +6,6 @@
<directory url="file://$PROJECT_DIR$/Nautilus.Game.PvP" includeSubdirectories="true" />
<directory url="file://$PROJECT_DIR$/Mineplex.ServerMonitor" includeSubdirectories="true" />
<directory url="file://$PROJECT_DIR$/Nautilus.Game.Arcade" includeSubdirectories="true" />
<directory url="file://$PROJECT_DIR$/Mineplex.Hub" includeSubdirectories="true" />
</excludeFromCompile>
<resourceExtensions />
<wildcardResourcePatterns>

View File

@ -12,5 +12,4 @@
<orderEntry type="library" name="commons-pool2" level="project" />
<orderEntry type="library" name="commons-logging" level="project" />
</component>
</module>
</module>

View File

@ -0,0 +1,537 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package net.minecraft.server.v1_7_R4;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import net.minecraft.server.v1_7_R4.AttributeMapServer;
import net.minecraft.server.v1_7_R4.Block;
import net.minecraft.server.v1_7_R4.DataWatcher;
import net.minecraft.server.v1_7_R4.Entity;
import net.minecraft.server.v1_7_R4.EntityArrow;
import net.minecraft.server.v1_7_R4.EntityBoat;
import net.minecraft.server.v1_7_R4.EntityEgg;
import net.minecraft.server.v1_7_R4.EntityEnderCrystal;
import net.minecraft.server.v1_7_R4.EntityEnderDragon;
import net.minecraft.server.v1_7_R4.EntityEnderPearl;
import net.minecraft.server.v1_7_R4.EntityEnderSignal;
import net.minecraft.server.v1_7_R4.EntityExperienceOrb;
import net.minecraft.server.v1_7_R4.EntityFallingBlock;
import net.minecraft.server.v1_7_R4.EntityFireball;
import net.minecraft.server.v1_7_R4.EntityFireworks;
import net.minecraft.server.v1_7_R4.EntityFishingHook;
import net.minecraft.server.v1_7_R4.EntityHuman;
import net.minecraft.server.v1_7_R4.EntityInsentient;
import net.minecraft.server.v1_7_R4.EntityItem;
import net.minecraft.server.v1_7_R4.EntityItemFrame;
import net.minecraft.server.v1_7_R4.EntityLeash;
import net.minecraft.server.v1_7_R4.EntityLiving;
import net.minecraft.server.v1_7_R4.EntityMinecartAbstract;
import net.minecraft.server.v1_7_R4.EntityPainting;
import net.minecraft.server.v1_7_R4.EntityPlayer;
import net.minecraft.server.v1_7_R4.EntityPotion;
import net.minecraft.server.v1_7_R4.EntitySmallFireball;
import net.minecraft.server.v1_7_R4.EntitySnowball;
import net.minecraft.server.v1_7_R4.EntityTNTPrimed;
import net.minecraft.server.v1_7_R4.EntityThrownExpBottle;
import net.minecraft.server.v1_7_R4.EntityWitherSkull;
import net.minecraft.server.v1_7_R4.IAnimal;
import net.minecraft.server.v1_7_R4.ItemStack;
import net.minecraft.server.v1_7_R4.ItemWorldMap;
import net.minecraft.server.v1_7_R4.Items;
import net.minecraft.server.v1_7_R4.MathHelper;
import net.minecraft.server.v1_7_R4.MobEffect;
import net.minecraft.server.v1_7_R4.Packet;
import net.minecraft.server.v1_7_R4.PacketPlayOutAttachEntity;
import net.minecraft.server.v1_7_R4.PacketPlayOutBed;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityEffect;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityEquipment;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityHeadRotation;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityLook;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityMetadata;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityTeleport;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityVelocity;
import net.minecraft.server.v1_7_R4.PacketPlayOutNamedEntitySpawn;
import net.minecraft.server.v1_7_R4.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_7_R4.PacketPlayOutRelEntityMove;
import net.minecraft.server.v1_7_R4.PacketPlayOutRelEntityMoveLook;
import net.minecraft.server.v1_7_R4.PacketPlayOutSpawnEntity;
import net.minecraft.server.v1_7_R4.PacketPlayOutSpawnEntityExperienceOrb;
import net.minecraft.server.v1_7_R4.PacketPlayOutSpawnEntityLiving;
import net.minecraft.server.v1_7_R4.PacketPlayOutSpawnEntityPainting;
import net.minecraft.server.v1_7_R4.PacketPlayOutUpdateAttributes;
import net.minecraft.server.v1_7_R4.WorldMap;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerVelocityEvent;
import org.bukkit.util.Vector;
import org.spigotmc.AsyncCatcher;
public class EntityTrackerEntry {
private static final Logger p = LogManager.getLogger();
public Entity tracker;
public int b;
public int c;
public int xLoc;
public int yLoc;
public int zLoc;
public int yRot;
public int xRot;
public int i;
public double j;
public double k;
public double l;
public int m;
private double q;
private double r;
private double s;
private boolean isMoving;
private boolean u;
private int v;
private Entity w;
private boolean x;
public boolean n;
public Set trackedPlayers = new HashSet();
public EntityTrackerEntry(Entity entity, int i, int j, boolean flag) {
this.tracker = entity;
this.b = i;
this.c = j;
this.u = flag;
this.xLoc = MathHelper.floor(entity.locX * 32.0D);
this.yLoc = MathHelper.floor(entity.locY * 32.0D);
this.zLoc = MathHelper.floor(entity.locZ * 32.0D);
this.yRot = MathHelper.d(entity.yaw * 256.0F / 360.0F);
this.xRot = MathHelper.d(entity.pitch * 256.0F / 360.0F);
this.i = MathHelper.d(entity.getHeadRotation() * 256.0F / 360.0F);
}
public boolean equals(Object object) {
return object instanceof EntityTrackerEntry?((EntityTrackerEntry)object).tracker.getId() == this.tracker.getId():false;
}
public int hashCode() {
return this.tracker.getId();
}
public void track(List list) {
this.n = false;
if(!this.isMoving || this.tracker.e(this.q, this.r, this.s) > 16.0D) {
this.q = this.tracker.locX;
this.r = this.tracker.locY;
this.s = this.tracker.locZ;
this.isMoving = true;
this.n = true;
this.scanPlayers(list);
}
if(this.w != this.tracker.vehicle || this.tracker.vehicle != null && this.m % 60 == 0) {
this.w = this.tracker.vehicle;
this.broadcast(new PacketPlayOutAttachEntity(0, this.tracker, this.tracker.vehicle));
}
if(this.tracker instanceof EntityItemFrame) {
EntityItemFrame cancelled = (EntityItemFrame)this.tracker;
ItemStack player = cancelled.getItem();
if(this.m % 10 == 0 && player != null && player.getItem() instanceof ItemWorldMap) {
WorldMap velocity = Items.MAP.getSavedMap(player, this.tracker.world);
Iterator event = this.trackedPlayers.iterator();
while(event.hasNext()) {
EntityHuman i1 = (EntityHuman)event.next();
EntityPlayer j1 = (EntityPlayer)i1;
velocity.a(j1, player);
Packet k1 = Items.MAP.c(player, this.tracker.world, j1);
if(k1 != null) {
j1.playerConnection.sendPacket(k1);
}
}
}
this.b();
} else if(this.m % this.c == 0 || this.tracker.al || this.tracker.getDataWatcher().a()) {
int var23;
int var24;
if(this.tracker.vehicle == null) {
++this.v;
var23 = this.tracker.as.a(this.tracker.locX);
var24 = MathHelper.floor(this.tracker.locY * 32.0D);
int var28 = this.tracker.as.a(this.tracker.locZ);
int var30 = MathHelper.d(this.tracker.yaw * 256.0F / 360.0F);
int var32 = MathHelper.d(this.tracker.pitch * 256.0F / 360.0F);
int var33 = var23 - this.xLoc;
int var34 = var24 - this.yLoc;
int l1 = var28 - this.zLoc;
Object object = null;
boolean flag = Math.abs(var33) >= 4 || Math.abs(var34) >= 4 || Math.abs(l1) >= 4 || this.m % 60 == 0;
boolean flag1 = Math.abs(var30 - this.yRot) >= 4 || Math.abs(var32 - this.xRot) >= 4;
if(flag) {
this.xLoc = var23;
this.yLoc = var24;
this.zLoc = var28;
}
if(flag1) {
this.yRot = var30;
this.xRot = var32;
}
if(this.m > 0 || this.tracker instanceof EntityArrow) {
if(var33 >= -128 && var33 < 128 && var34 >= -128 && var34 < 128 && l1 >= -128 && l1 < 128 && this.v <= 400 && !this.x) {
if(flag && flag1) {
object = new PacketPlayOutRelEntityMoveLook(this.tracker.getId(), (byte)var33, (byte)var34, (byte)l1, (byte)var30, (byte)var32, this.tracker.onGround);
} else if(flag) {
object = new PacketPlayOutRelEntityMove(this.tracker.getId(), (byte)var33, (byte)var34, (byte)l1, this.tracker.onGround);
} else if(flag1) {
object = new PacketPlayOutEntityLook(this.tracker.getId(), (byte)var30, (byte)var32, this.tracker.onGround);
}
} else {
this.v = 0;
if(this.tracker instanceof EntityPlayer) {
this.scanPlayers(new ArrayList(this.trackedPlayers));
}
object = new PacketPlayOutEntityTeleport(this.tracker.getId(), var23, var24, var28, (byte)var30, (byte)var32, this.tracker.onGround);
}
}
if(this.u) {
double d0 = this.tracker.motX - this.j;
double d1 = this.tracker.motY - this.k;
double d2 = this.tracker.motZ - this.l;
double d3 = 0.02D;
double d4 = d0 * d0 + d1 * d1 + d2 * d2;
if(d4 > d3 * d3 || d4 > 0.0D && this.tracker.motX == 0.0D && this.tracker.motY == 0.0D && this.tracker.motZ == 0.0D) {
this.j = this.tracker.motX;
this.k = this.tracker.motY;
this.l = this.tracker.motZ;
this.broadcast(new PacketPlayOutEntityVelocity(this.tracker.getId(), this.j, this.k, this.l));
}
}
if(object != null) {
this.broadcast((Packet)object);
}
this.b();
this.x = false;
} else {
var23 = MathHelper.d(this.tracker.yaw * 256.0F / 360.0F);
var24 = MathHelper.d(this.tracker.pitch * 256.0F / 360.0F);
boolean var27 = Math.abs(var23 - this.yRot) >= 4 || Math.abs(var24 - this.xRot) >= 4;
if(var27) {
this.broadcast(new PacketPlayOutEntityLook(this.tracker.getId(), (byte)var23, (byte)var24, this.tracker.onGround));
this.yRot = var23;
this.xRot = var24;
}
this.xLoc = this.tracker.as.a(this.tracker.locX);
this.yLoc = MathHelper.floor(this.tracker.locY * 32.0D);
this.zLoc = this.tracker.as.a(this.tracker.locZ);
this.b();
this.x = true;
}
var23 = MathHelper.d(this.tracker.getHeadRotation() * 256.0F / 360.0F);
if(Math.abs(var23 - this.i) >= 4) {
this.broadcast(new PacketPlayOutEntityHeadRotation(this.tracker, (byte)var23));
this.i = var23;
}
this.tracker.al = false;
}
++this.m;
if(this.tracker.velocityChanged) {
boolean var25 = false;
if(this.tracker instanceof EntityPlayer) {
Player var26 = (Player)this.tracker.getBukkitEntity();
Vector var29 = var26.getVelocity();
PlayerVelocityEvent var31 = new PlayerVelocityEvent(var26, var29);
this.tracker.world.getServer().getPluginManager().callEvent(var31);
if(var31.isCancelled()) {
var25 = true;
} else if(!var29.equals(var31.getVelocity())) {
var26.setVelocity(var29);
}
}
if(!var25) {
this.broadcastIncludingSelf(new PacketPlayOutEntityVelocity(this.tracker));
}
this.tracker.velocityChanged = false;
}
}
private void b() {
DataWatcher datawatcher = this.tracker.getDataWatcher();
if(datawatcher.a()) {
this.broadcastIncludingSelf(new PacketPlayOutEntityMetadata(this.tracker.getId(), datawatcher, false));
}
if(this.tracker instanceof EntityLiving) {
AttributeMapServer attributemapserver = (AttributeMapServer)((EntityLiving)this.tracker).getAttributeMap();
Set set = attributemapserver.getAttributes();
if(!set.isEmpty()) {
if(this.tracker instanceof EntityPlayer) {
((EntityPlayer)this.tracker).getBukkitEntity().injectScaledMaxHealth(set, false);
}
this.broadcastIncludingSelf(new PacketPlayOutUpdateAttributes(this.tracker.getId(), set));
}
set.clear();
}
}
public void broadcast(Packet packet) {
Iterator iterator = this.trackedPlayers.iterator();
while(iterator.hasNext()) {
EntityPlayer entityplayer = (EntityPlayer)iterator.next();
entityplayer.playerConnection.sendPacket(packet);
}
}
public void broadcastIncludingSelf(Packet packet) {
this.broadcast(packet);
if(this.tracker instanceof EntityPlayer) {
((EntityPlayer)this.tracker).playerConnection.sendPacket(packet);
}
}
public void a() {
Iterator iterator = this.trackedPlayers.iterator();
while(iterator.hasNext()) {
EntityPlayer entityplayer = (EntityPlayer)iterator.next();
entityplayer.d(this.tracker);
}
}
public void a(EntityPlayer entityplayer) {
if(this.trackedPlayers.contains(entityplayer)) {
entityplayer.d(this.tracker);
this.trackedPlayers.remove(entityplayer);
}
}
public void updatePlayer(EntityPlayer entityplayer) {
AsyncCatcher.catchOp("player tracker update");
if(entityplayer != this.tracker) {
double d0 = entityplayer.locX - (double)(this.xLoc / 32);
double d1 = entityplayer.locZ - (double)(this.zLoc / 32);
if(d0 >= (double)(-this.b) && d0 <= (double)this.b && d1 >= (double)(-this.b) && d1 <= (double)this.b) {
if(!this.trackedPlayers.contains(entityplayer) && (this.d(entityplayer) || this.tracker.attachedToPlayer)) {
if(this.tracker instanceof EntityPlayer) {
CraftPlayer packet = ((EntityPlayer)this.tracker).getBukkitEntity();
if(!entityplayer.getBukkitEntity().canSee(packet)) {
return;
}
}
entityplayer.removeQueue.remove(Integer.valueOf(this.tracker.getId()));
this.trackedPlayers.add(entityplayer);
Packet var10 = this.c();
if(this.tracker instanceof EntityPlayer) {
entityplayer.playerConnection.sendPacket(PacketPlayOutPlayerInfo.addPlayer(entityplayer, (EntityPlayer)this.tracker));
}
entityplayer.playerConnection.sendPacket(var10);
if(!this.tracker.getDataWatcher().d()) {
entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityMetadata(this.tracker.getId(), this.tracker.getDataWatcher(), true));
}
if(this.tracker instanceof EntityLiving) {
AttributeMapServer entityliving = (AttributeMapServer)((EntityLiving)this.tracker).getAttributeMap();
Collection iterator = entityliving.c();
if(this.tracker.getId() == entityplayer.getId()) {
((EntityPlayer)this.tracker).getBukkitEntity().injectScaledMaxHealth(iterator, false);
}
if(!iterator.isEmpty()) {
entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateAttributes(this.tracker.getId(), iterator));
}
}
this.j = this.tracker.motX;
this.k = this.tracker.motY;
this.l = this.tracker.motZ;
if(this.u && !(var10 instanceof PacketPlayOutSpawnEntityLiving)) {
entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityVelocity(this.tracker.getId(), this.tracker.motX, this.tracker.motY, this.tracker.motZ));
}
if(this.tracker.vehicle != null) {
entityplayer.playerConnection.sendPacket(new PacketPlayOutAttachEntity(0, this.tracker, this.tracker.vehicle));
}
if(this.tracker.passenger != null) {
entityplayer.playerConnection.sendPacket(new PacketPlayOutAttachEntity(0, this.tracker.passenger, this.tracker));
}
if(this.tracker instanceof EntityInsentient && ((EntityInsentient)this.tracker).getLeashHolder() != null) {
entityplayer.playerConnection.sendPacket(new PacketPlayOutAttachEntity(1, this.tracker, ((EntityInsentient)this.tracker).getLeashHolder()));
}
if(this.tracker instanceof EntityLiving) {
for(int var11 = 0; var11 < 5; ++var11) {
ItemStack var13 = ((EntityLiving)this.tracker).getEquipment(var11);
if(var13 != null) {
entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityEquipment(this.tracker.getId(), var11, var13));
}
}
}
if(this.tracker instanceof EntityHuman) {
EntityHuman var12 = (EntityHuman)this.tracker;
if(var12.isSleeping()) {
entityplayer.playerConnection.sendPacket(new PacketPlayOutBed(var12, MathHelper.floor(this.tracker.locX), MathHelper.floor(this.tracker.locY), MathHelper.floor(this.tracker.locZ)));
}
}
this.i = MathHelper.d(this.tracker.getHeadRotation() * 256.0F / 360.0F);
this.broadcast(new PacketPlayOutEntityHeadRotation(this.tracker, (byte)this.i));
if(this.tracker instanceof EntityLiving) {
EntityLiving var14 = (EntityLiving)this.tracker;
Iterator var15 = var14.getEffects().iterator();
while(var15.hasNext()) {
MobEffect mobeffect = (MobEffect)var15.next();
entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityEffect(this.tracker.getId(), mobeffect));
}
}
}
} else if(this.trackedPlayers.contains(entityplayer)) {
this.trackedPlayers.remove(entityplayer);
entityplayer.d(this.tracker);
}
}
}
private boolean d(EntityPlayer entityplayer) {
return entityplayer.r().getPlayerChunkMap().a(entityplayer, this.tracker.ah, this.tracker.aj);
}
public void scanPlayers(List list) {
for(int i = 0; i < list.size(); ++i) {
this.updatePlayer((EntityPlayer)list.get(i));
}
}
private Packet c() {
if(this.tracker.dead) {
return null;
} else if(this.tracker instanceof EntityItem) {
return new PacketPlayOutSpawnEntity(this.tracker, 2, 1);
} else if(this.tracker instanceof EntityPlayer) {
return new PacketPlayOutNamedEntitySpawn((EntityHuman)this.tracker);
} else if(this.tracker instanceof EntityMinecartAbstract) {
EntityMinecartAbstract packetplayoutspawnentity3 = (EntityMinecartAbstract)this.tracker;
return new PacketPlayOutSpawnEntity(this.tracker, 10, packetplayoutspawnentity3.m());
} else if(this.tracker instanceof EntityBoat) {
return new PacketPlayOutSpawnEntity(this.tracker, 1);
} else if(!(this.tracker instanceof IAnimal) && !(this.tracker instanceof EntityEnderDragon)) {
if(this.tracker instanceof EntityFishingHook) {
EntityHuman packetplayoutspawnentity2 = ((EntityFishingHook)this.tracker).owner;
return new PacketPlayOutSpawnEntity(this.tracker, 90, packetplayoutspawnentity2 != null?packetplayoutspawnentity2.getId():this.tracker.getId());
} else if(this.tracker instanceof EntityArrow) {
Entity packetplayoutspawnentity1 = ((EntityArrow)this.tracker).shooter;
return new PacketPlayOutSpawnEntity(this.tracker, 60, packetplayoutspawnentity1 != null?packetplayoutspawnentity1.getId():this.tracker.getId());
} else if(this.tracker instanceof EntitySnowball) {
return new PacketPlayOutSpawnEntity(this.tracker, 61);
} else if(this.tracker instanceof EntityPotion) {
return new PacketPlayOutSpawnEntity(this.tracker, 73, ((EntityPotion)this.tracker).getPotionValue());
} else if(this.tracker instanceof EntityThrownExpBottle) {
return new PacketPlayOutSpawnEntity(this.tracker, 75);
} else if(this.tracker instanceof EntityEnderPearl) {
return new PacketPlayOutSpawnEntity(this.tracker, 65);
} else if(this.tracker instanceof EntityEnderSignal) {
return new PacketPlayOutSpawnEntity(this.tracker, 72);
} else if(this.tracker instanceof EntityFireworks) {
return new PacketPlayOutSpawnEntity(this.tracker, 76);
} else {
PacketPlayOutSpawnEntity packetplayoutspawnentity;
if(this.tracker instanceof EntityFireball) {
EntityFireball entityleash3 = (EntityFireball)this.tracker;
packetplayoutspawnentity = null;
byte b0 = 63;
if(this.tracker instanceof EntitySmallFireball) {
b0 = 64;
} else if(this.tracker instanceof EntityWitherSkull) {
b0 = 66;
}
if(entityleash3.shooter != null) {
packetplayoutspawnentity = new PacketPlayOutSpawnEntity(this.tracker, b0, ((EntityFireball)this.tracker).shooter.getId());
} else {
packetplayoutspawnentity = new PacketPlayOutSpawnEntity(this.tracker, b0, 0);
}
packetplayoutspawnentity.d((int)(entityleash3.dirX * 8000.0D));
packetplayoutspawnentity.e((int)(entityleash3.dirY * 8000.0D));
packetplayoutspawnentity.f((int)(entityleash3.dirZ * 8000.0D));
return packetplayoutspawnentity;
} else if(this.tracker instanceof EntityEgg) {
return new PacketPlayOutSpawnEntity(this.tracker, 62);
} else if(this.tracker instanceof EntityTNTPrimed) {
return new PacketPlayOutSpawnEntity(this.tracker, 50);
} else if(this.tracker instanceof EntityEnderCrystal) {
return new PacketPlayOutSpawnEntity(this.tracker, 51);
} else if(this.tracker instanceof EntityFallingBlock) {
EntityFallingBlock entityleash2 = (EntityFallingBlock)this.tracker;
return new PacketPlayOutSpawnEntity(this.tracker, 70, Block.getId(entityleash2.f()) | entityleash2.data << 16);
} else if(this.tracker instanceof EntityPainting) {
return new PacketPlayOutSpawnEntityPainting((EntityPainting)this.tracker);
} else if(this.tracker instanceof EntityItemFrame) {
EntityItemFrame entityleash1 = (EntityItemFrame)this.tracker;
packetplayoutspawnentity = new PacketPlayOutSpawnEntity(this.tracker, 71, entityleash1.direction);
packetplayoutspawnentity.a(MathHelper.d((float)(entityleash1.x * 32)));
packetplayoutspawnentity.b(MathHelper.d((float)(entityleash1.y * 32)));
packetplayoutspawnentity.c(MathHelper.d((float)(entityleash1.z * 32)));
return packetplayoutspawnentity;
} else if(this.tracker instanceof EntityLeash) {
EntityLeash entityleash = (EntityLeash)this.tracker;
packetplayoutspawnentity = new PacketPlayOutSpawnEntity(this.tracker, 77);
packetplayoutspawnentity.a(MathHelper.d((float)(entityleash.x * 32)));
packetplayoutspawnentity.b(MathHelper.d((float)(entityleash.y * 32)));
packetplayoutspawnentity.c(MathHelper.d((float)(entityleash.z * 32)));
return packetplayoutspawnentity;
} else if(this.tracker instanceof EntityExperienceOrb) {
return new PacketPlayOutSpawnEntityExperienceOrb((EntityExperienceOrb)this.tracker);
} else {
throw new IllegalArgumentException("Don\'t know how to add " + this.tracker.getClass() + "!");
}
}
} else {
this.i = MathHelper.d(this.tracker.getHeadRotation() * 256.0F / 360.0F);
return new PacketPlayOutSpawnEntityLiving((EntityLiving)this.tracker);
}
}
public void clear(EntityPlayer entityplayer) {
AsyncCatcher.catchOp("player tracker clear");
if(this.trackedPlayers.contains(entityplayer)) {
this.trackedPlayers.remove(entityplayer);
entityplayer.d(this.tracker);
}
}
}

View File

@ -11,6 +11,7 @@ import java.util.Iterator;
import org.bukkit.craftbukkit.v1_7_R4.scoreboard.CraftScoreboard;
import org.bukkit.craftbukkit.v1_7_R4.util.CraftChatMessage;
import org.bukkit.entity.Player;
import org.bukkit.scoreboard.Team;
import net.minecraft.util.com.mojang.authlib.GameProfile;
import net.minecraft.util.com.mojang.authlib.properties.Property;
@ -37,6 +38,18 @@ public class PacketPlayOutPlayerInfo extends Packet {
public PacketPlayOutPlayerInfo() {
}
public static PacketPlayOutPlayerInfo addPlayer(EntityPlayer sendTo, EntityPlayer player) {
PacketPlayOutPlayerInfo packet = new PacketPlayOutPlayerInfo();
packet.action = 0;
packet.username = player.listName;
packet.player = player.getProfile();
packet.ping = player.ping;
packet.gamemode = player.playerInteractManager.getGameMode().getId();
packet._tabName = getFormattedName(sendTo, player);
return packet;
}
public static PacketPlayOutPlayerInfo addPlayer(EntityPlayer player) {
PacketPlayOutPlayerInfo packet = new PacketPlayOutPlayerInfo();
packet.action = 0;
@ -67,8 +80,9 @@ public class PacketPlayOutPlayerInfo extends Packet {
return packet;
}
public static PacketPlayOutPlayerInfo updateDisplayName(EntityPlayer player) {
return updateDisplayName(player, getFormattedName(player));
public static PacketPlayOutPlayerInfo updateDisplayName(EntityPlayer sendPacketTo, EntityPlayer player)
{
return updateDisplayName(player, getFormattedName(sendPacketTo, player));
}
public static PacketPlayOutPlayerInfo updateDisplayName(EntityPlayer player, String displayName)
@ -177,7 +191,7 @@ public class PacketPlayOutPlayerInfo extends Packet {
}
public void handle(PacketListener packetlistener) {
this.a((PacketPlayOutListener)((PacketPlayOutListener)packetlistener));
this.a((PacketPlayOutListener) ((PacketPlayOutListener) packetlistener));
}
private static String getFormattedName(EntityPlayer player)
@ -197,6 +211,23 @@ public class PacketPlayOutPlayerInfo extends Packet {
return name;
}
private static String getFormattedName(EntityPlayer sendPacketTo, EntityPlayer player)
{
String name = player.getName();
if (isAprilFools()) name = "Notch";
CraftScoreboard scoreboard = sendPacketTo.getBukkitEntity().getScoreboard();
if (scoreboard != null)
{
Team team = scoreboard.getPlayerTeam(player.getBukkitEntity());
if (team != null)
name = team.getPrefix() + name + team.getSuffix();
}
return name;
}
public static boolean isAprilFools()
{
// Calendar c = Calendar.getInstance();

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,13 @@
package net.minecraft.util.com.mojang.authlib.yggdrasil;
import java.util.UUID;
import net.minecraft.util.com.mojang.authlib.GameProfile;
public interface ProfileCache
{
public GameProfile attemptToLoadProfile(String playerName);
public void cacheProfile(GameProfile response);
}

View File

@ -0,0 +1,145 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package net.minecraft.util.com.mojang.authlib.yggdrasil;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.UUID;
import net.minecraft.util.com.google.common.base.Strings;
import net.minecraft.util.com.google.common.collect.Iterables;
import net.minecraft.util.com.google.common.collect.Sets;
import net.minecraft.util.com.mojang.authlib.Agent;
import net.minecraft.util.com.mojang.authlib.GameProfile;
import net.minecraft.util.com.mojang.authlib.GameProfileRepository;
import net.minecraft.util.com.mojang.authlib.HttpAuthenticationService;
import net.minecraft.util.com.mojang.authlib.ProfileLookupCallback;
import net.minecraft.util.com.mojang.authlib.exceptions.AuthenticationException;
import net.minecraft.util.com.mojang.authlib.yggdrasil.ProfileNotFoundException;
import net.minecraft.util.com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
import net.minecraft.util.com.mojang.authlib.yggdrasil.response.ProfileSearchResultsResponse;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
public class YggdrasilGameProfileRepository implements GameProfileRepository {
private static final Logger LOGGER = LogManager.getLogger();
private static final String BASE_URL = "https://api.mojang.com/";
private static final String SEARCH_PAGE_URL = "https://api.mojang.com/profiles/";
private static final int ENTRIES_PER_PAGE = 2;
private static final int MAX_FAIL_COUNT = 3;
private static final int DELAY_BETWEEN_PAGES = 100;
private static final int DELAY_BETWEEN_FAILURES = 750;
private final YggdrasilAuthenticationService authenticationService;
private static ProfileCache _profileCache;
public YggdrasilGameProfileRepository(YggdrasilAuthenticationService authenticationService) {
this.authenticationService = authenticationService;
}
public static void setProfileCache(ProfileCache profileCache)
{
_profileCache = profileCache;
}
public void findProfilesByNames(String[] names, Agent agent, ProfileLookupCallback callback) {
HashSet criteria = Sets.newHashSet();
String[] page = names;
int i$ = names.length;
for(int request = 0; request < i$; ++request) {
String failCount = page[request];
if(!Strings.isNullOrEmpty(failCount)) {
criteria.add(failCount.toLowerCase());
}
}
if (_profileCache != null)
{
// Attempt to load profiles from cache
Iterator<String> iterator = criteria.iterator();
while (iterator.hasNext())
{
String name = iterator.next();
// System.out.println("Trying to load profile from cache (GameProfileRepository): " + name);
GameProfile profile = _profileCache.attemptToLoadProfile(name);
if (profile != null)
{
// System.out.println("Successfully loaded profile: " + name);
iterator.remove();
callback.onProfileLookupSucceeded(profile);
}
}
}
byte var19 = 0;
Iterator var20 = Iterables.partition(criteria, 2).iterator();
while(var20.hasNext()) {
List var21 = (List)var20.next();
int var22 = 0;
while(true) {
boolean failed = false;
try {
ProfileSearchResultsResponse var23 = (ProfileSearchResultsResponse)this.authenticationService.makeRequest(HttpAuthenticationService.constantURL("https://api.mojang.com/profiles/" + agent.getName().toLowerCase()), var21, ProfileSearchResultsResponse.class);
var22 = 0;
LOGGER.debug("Page {} returned {} results, parsing", new Object[]{Integer.valueOf(var19), Integer.valueOf(var23.getProfiles().length)});
HashSet var24 = Sets.newHashSet(var21);
GameProfile[] var25 = var23.getProfiles();
int name1 = var25.length;
for(int i$1 = 0; i$1 < name1; ++i$1) {
GameProfile profile = var25[i$1];
LOGGER.debug("Successfully looked up profile {}", new Object[]{profile});
var24.remove(profile.getName().toLowerCase());
callback.onProfileLookupSucceeded(profile);
}
Iterator var26 = var24.iterator();
while(var26.hasNext()) {
String var27 = (String)var26.next();
LOGGER.debug("Couldn\'t find profile {}", new Object[]{var27});
callback.onProfileLookupFailed(new GameProfile((UUID)null, var27), new ProfileNotFoundException("Server did not find the requested profile"));
}
try {
Thread.sleep(100L);
} catch (InterruptedException var17) {
;
}
} catch (AuthenticationException var18) {
AuthenticationException e = var18;
++var22;
if(var22 == 3) {
Iterator ignored = var21.iterator();
while(ignored.hasNext()) {
String name = (String)ignored.next();
LOGGER.debug("Couldn\'t find profile {} because of a server error", new Object[]{name});
callback.onProfileLookupFailed(new GameProfile((UUID)null, name), e);
}
} else {
try {
Thread.sleep(750L);
} catch (InterruptedException var16) {
;
}
failed = true;
}
}
if(!failed) {
break;
}
}
}
}
}

View File

@ -0,0 +1,178 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package net.minecraft.util.com.mojang.authlib.yggdrasil;
import java.net.URL;
import java.security.KeyFactory;
import java.security.PublicKey;
import java.security.spec.X509EncodedKeySpec;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import net.minecraft.util.com.google.common.collect.Iterables;
import net.minecraft.util.com.google.gson.Gson;
import net.minecraft.util.com.google.gson.GsonBuilder;
import net.minecraft.util.com.google.gson.JsonParseException;
import net.minecraft.util.com.mojang.authlib.GameProfile;
import net.minecraft.util.com.mojang.authlib.HttpAuthenticationService;
import net.minecraft.util.com.mojang.authlib.exceptions.AuthenticationException;
import net.minecraft.util.com.mojang.authlib.exceptions.AuthenticationUnavailableException;
import net.minecraft.util.com.mojang.authlib.minecraft.HttpMinecraftSessionService;
import net.minecraft.util.com.mojang.authlib.minecraft.InsecureTextureException;
import net.minecraft.util.com.mojang.authlib.minecraft.MinecraftProfileTexture;
import net.minecraft.util.com.mojang.authlib.minecraft.MinecraftProfileTexture.Type;
import net.minecraft.util.com.mojang.authlib.properties.Property;
import net.minecraft.util.com.mojang.authlib.yggdrasil.request.JoinMinecraftServerRequest;
import net.minecraft.util.com.mojang.authlib.yggdrasil.response.HasJoinedMinecraftServerResponse;
import net.minecraft.util.com.mojang.authlib.yggdrasil.response.MinecraftProfilePropertiesResponse;
import net.minecraft.util.com.mojang.authlib.yggdrasil.response.MinecraftTexturesPayload;
import net.minecraft.util.com.mojang.authlib.yggdrasil.response.Response;
import net.minecraft.util.com.mojang.util.UUIDTypeAdapter;
import net.minecraft.util.org.apache.commons.codec.Charsets;
import net.minecraft.util.org.apache.commons.codec.binary.Base64;
import net.minecraft.util.org.apache.commons.io.IOUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
public class YggdrasilMinecraftSessionService extends HttpMinecraftSessionService {
private static final Logger LOGGER = LogManager.getLogger();
private static final String BASE_URL = "https://sessionserver.mojang.com/session/minecraft/";
private static final URL JOIN_URL = HttpAuthenticationService.constantURL("https://sessionserver.mojang.com/session/minecraft/join");
private static final URL CHECK_URL = HttpAuthenticationService.constantURL("https://sessionserver.mojang.com/session/minecraft/hasJoined");
private final PublicKey publicKey;
private final Gson gson = (new GsonBuilder()).registerTypeAdapter(UUID.class, new UUIDTypeAdapter()).create();
private static ProfileCache _profileCache;
public static void setProfileCache(ProfileCache cacher)
{
_profileCache = cacher;
}
protected YggdrasilMinecraftSessionService(YggdrasilAuthenticationService authenticationService) {
super(authenticationService);
try {
X509EncodedKeySpec e = new X509EncodedKeySpec(IOUtils.toByteArray(YggdrasilMinecraftSessionService.class.getResourceAsStream("/yggdrasil_session_pubkey.der")));
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
this.publicKey = keyFactory.generatePublic(e);
} catch (Exception var4) {
throw new Error("Missing/invalid yggdrasil public key!");
}
}
public void joinServer(GameProfile profile, String authenticationToken, String serverId) throws AuthenticationException {
JoinMinecraftServerRequest request = new JoinMinecraftServerRequest();
request.accessToken = authenticationToken;
request.selectedProfile = profile.getId();
request.serverId = serverId;
this.getAuthenticationService().makeRequest(JOIN_URL, request, Response.class);
}
public GameProfile hasJoinedServer(GameProfile user, String serverId) throws AuthenticationUnavailableException {
HashMap arguments = new HashMap();
arguments.put("username", user.getName());
arguments.put("serverId", serverId);
URL url = HttpAuthenticationService.concatenateURL(CHECK_URL, HttpAuthenticationService.buildQuery(arguments));
try {
HasJoinedMinecraftServerResponse e = (HasJoinedMinecraftServerResponse)this.getAuthenticationService().makeRequest(url, (Object)null, HasJoinedMinecraftServerResponse.class);
if(e != null && e.getId() != null) {
GameProfile result = new GameProfile(e.getId(), user.getName());
if(e.getProperties() != null) {
result.getProperties().putAll(e.getProperties());
}
return result;
} else {
return null;
}
} catch (AuthenticationUnavailableException var7) {
throw var7;
} catch (AuthenticationException var8) {
return null;
}
}
public Map<Type, MinecraftProfileTexture> getTextures(GameProfile profile, boolean requireSecure) {
Property textureProperty = (Property)Iterables.getFirst(profile.getProperties().get("textures"), (Object)null);
if(textureProperty == null) {
return new HashMap();
} else {
if(requireSecure) {
if(!textureProperty.hasSignature()) {
LOGGER.error("Signature is missing from textures payload");
throw new InsecureTextureException("Signature is missing from textures payload");
}
if(!textureProperty.isSignatureValid(this.publicKey)) {
LOGGER.error("Textures payload has been tampered with (signature invalid)");
throw new InsecureTextureException("Textures payload has been tampered with (signature invalid)");
}
}
MinecraftTexturesPayload result;
try {
String e = new String(Base64.decodeBase64(textureProperty.getValue()), Charsets.UTF_8);
result = (MinecraftTexturesPayload)this.gson.fromJson(e, MinecraftTexturesPayload.class);
} catch (JsonParseException var6) {
LOGGER.error("Could not decode textures payload", var6);
return new HashMap();
}
return (Map)(result.getTextures() == null?new HashMap():result.getTextures());
}
}
public GameProfile fillProfileProperties(GameProfile profile, boolean requireSecure) {
if(profile.getId() == null) {
return profile;
} else {
try {
if (requireSecure && _profileCache != null)
{
GameProfile repoProfile = _profileCache.attemptToLoadProfile(profile.getName());
if (repoProfile != null)
{
profile.getProperties().putAll(repoProfile.getProperties());
return repoProfile;
}
}
URL e = HttpAuthenticationService.constantURL("https://sessionserver.mojang.com/session/minecraft/profile/" + UUIDTypeAdapter.fromUUID(profile.getId()));
e = HttpAuthenticationService.concatenateURL(e, "unsigned=" + !requireSecure);
MinecraftProfilePropertiesResponse response = (MinecraftProfilePropertiesResponse) this.getAuthenticationService().makeRequest(e, (Object) null, MinecraftProfilePropertiesResponse.class);
if (response == null)
{
LOGGER.debug("Couldn\'t fetch profile properties for " + profile + " as the profile does not exist");
return profile;
}
else
{
GameProfile result = new GameProfile(response.getId(), response.getName());
result.getProperties().putAll(response.getProperties());
profile.getProperties().putAll(response.getProperties());
if (requireSecure && _profileCache != null)
{
_profileCache.cacheProfile(result);
System.out.println("Added new profile to repository");
}
LOGGER.debug("Successfully fetched profile properties for " + profile);
return result;
}
} catch (AuthenticationException var6) {
LOGGER.warn("Couldn\'t look up profile properties for " + profile, var6);
return profile;
}
}
}
public YggdrasilAuthenticationService getAuthenticationService() {
return (YggdrasilAuthenticationService)super.getAuthenticationService();
}
}

Binary file not shown.

View File

@ -13,12 +13,12 @@
<orderEntry type="library" name="jedis" level="project" />
<orderEntry type="library" name="commons-pool2" level="project" />
<orderEntry type="module" module-name="Mineplex.Core.Common" />
<orderEntry type="module" module-name="Classpath.Dummy" />
<orderEntry type="module" module-name="Mineplex.ServerData" />
<orderEntry type="library" name="craftbukkit" level="project" />
<orderEntry type="module" module-name="Mineplex.Database" />
<orderEntry type="library" name="jooq" level="project" />
<orderEntry type="library" name="commons-dbcp2" level="project" />
<orderEntry type="module" module-name="Classpath.Dummy" />
<orderEntry type="library" name="NoCheatPlus" level="project" />
</component>
</module>

View File

@ -32,22 +32,34 @@ public class TablistFix extends MiniPlugin
if (!player.isOnline())
return;
PacketPlayOutPlayerInfo packet = PacketPlayOutPlayerInfo.updateDisplayName(((CraftPlayer) player).getHandle());
if (UtilPlayer.is1_8(player))
{
UtilPlayer.sendPacket(player, packet);
}
for (Player other : UtilServer.getPlayers())
{
if (other.equals(player) || !other.canSee(player))
continue;
PacketPlayOutPlayerInfo packet = PacketPlayOutPlayerInfo.updateDisplayName(((CraftPlayer) other).getHandle(), ((CraftPlayer) player).getHandle());
PacketPlayOutPlayerInfo toLoginPlayer = PacketPlayOutPlayerInfo.updateDisplayName(((CraftPlayer) player).getHandle(), ((CraftPlayer) other).getHandle());
if (UtilPlayer.is1_8(other))
if (other.canSee(player) && UtilPlayer.is1_8(other))
UtilPlayer.sendPacket(other, packet);
if (player.canSee(other) && UtilPlayer.is1_8(player))
UtilPlayer.sendPacket(player, toLoginPlayer);
}
}
}, 20L);
}
public static void refreshForPlayer(Player player)
{
if (!UtilPlayer.is1_8(player))
return;
for (Player other : UtilServer.getPlayers())
{
if (player.canSee(other))
{
PacketPlayOutPlayerInfo packet = PacketPlayOutPlayerInfo.updateDisplayName(((CraftPlayer) player).getHandle(), ((CraftPlayer) other).getHandle());
UtilPlayer.sendPacket(player, packet);
}
}
}
}

View File

@ -0,0 +1,71 @@
package mineplex.core.profileCache;
import java.util.UUID;
import org.bukkit.plugin.java.JavaPlugin;
import net.minecraft.util.com.google.gson.Gson;
import net.minecraft.util.com.google.gson.GsonBuilder;
import net.minecraft.util.com.mojang.authlib.GameProfile;
import net.minecraft.util.com.mojang.authlib.properties.PropertyMap;
import net.minecraft.util.com.mojang.authlib.yggdrasil.ProfileCache;
import net.minecraft.util.com.mojang.authlib.yggdrasil.YggdrasilGameProfileRepository;
import net.minecraft.util.com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService;
import net.minecraft.util.com.mojang.authlib.yggdrasil.response.ProfileSearchResultsResponse;
import net.minecraft.util.com.mojang.util.UUIDTypeAdapter;
import mineplex.core.MiniPlugin;
import mineplex.serverdata.Region;
import mineplex.serverdata.redis.RedisDataRepository;
import mineplex.serverdata.servers.ServerManager;
public class ProfileCacheManager extends MiniPlugin implements ProfileCache
{
private RedisDataRepository<ProfileData> _profileRepository;
private Gson _gson;
public ProfileCacheManager(JavaPlugin plugin)
{
super("Profile Cache", plugin);
_profileRepository = new RedisDataRepository<ProfileData>(ServerManager.getMasterConnection(), ServerManager.getSlaveConnection(),
Region.ALL, ProfileData.class, "profileCacheRepo");
GsonBuilder builder = new GsonBuilder();
builder.registerTypeAdapter(PropertyMap.class, new PropertyMap.Serializer());
builder.registerTypeAdapter(UUID.class, new UUIDTypeAdapter());
builder.registerTypeAdapter(ProfileSearchResultsResponse.class, new net.minecraft.util.com.mojang.authlib.yggdrasil.response.ProfileSearchResultsResponse.Serializer());
_gson = builder.create();
YggdrasilMinecraftSessionService.setProfileCache(this);
YggdrasilGameProfileRepository.setProfileCache(this);
}
@Override
public GameProfile attemptToLoadProfile(String playerName)
{
ProfileData profile = _profileRepository.getElement(playerName.toLowerCase());
if (profile != null)
{
PropertyMap propertyMap = _gson.fromJson(profile.getPropertyMap(), PropertyMap.class);
GameProfile gameProfile = new GameProfile(profile.getUuid(), profile.getPlayerName());
gameProfile.getProperties().putAll(propertyMap);
// System.out.println("Loaded profile " + playerName + " from repository!");
return gameProfile;
}
// System.out.println("Profile Null");
return null;
}
@Override
public void cacheProfile(GameProfile profile)
{
// System.out.println("Cached profile: " + profile.getName());
ProfileData data = new ProfileData(profile.getId(), profile.getName(), _gson.toJson(profile.getProperties()));
_profileRepository.addElement(data, 60 * 60 * 24); // 1 day
}
}

View File

@ -0,0 +1,40 @@
package mineplex.core.profileCache;
import java.util.UUID;
import mineplex.serverdata.data.Data;
public class ProfileData implements Data
{
private UUID _uuid;
private String _playerName;
private String _propertyMap;
public ProfileData(UUID uuid, String playerName, String propertyMap)
{
_uuid = uuid;
_playerName = playerName;
_propertyMap = propertyMap;
}
public String getPlayerName()
{
return _playerName;
}
public String getPropertyMap()
{
return _propertyMap;
}
public UUID getUuid()
{
return _uuid;
}
@Override
public String getDataId()
{
return _playerName.toLowerCase();
}
}

View File

@ -29,6 +29,7 @@ import mineplex.core.observer.ObserverManager;
import mineplex.core.packethandler.PacketHandler;
import mineplex.core.portal.Portal;
import mineplex.core.preferences.PreferencesManager;
import mineplex.core.profileCache.ProfileCacheManager;
import mineplex.core.punish.Punish;
import mineplex.core.recharge.Recharge;
import mineplex.core.serverConfig.ServerConfiguration;
@ -78,6 +79,7 @@ public class Clans extends JavaPlugin
ItemStackFactory.Initialize(this, false);
Recharge.Initialize(this);
VisibilityManager.Initialize(this);
new ProfileCacheManager(this);
_donationManager = new DonationManager(this, _clientManager, webServerAddress);

View File

@ -513,7 +513,7 @@ public class ClansManager extends MiniClientPlugin<ClientClan> implements IRelat
String message = event.getMessage();
message = _chat.getFilteredMessage(event.getPlayer(), message);
ClanRelation rel = _clanUtility.rel(clan, otherClan);
String formatted = rel.getColor(true) + clan.getName() + " " + rel.getColor(false) + event.getPlayer().getName() + " " + C.cWhite + message;
String formatted = rel.getColor(true) + clan.getName() + " " + C.cYellow + event.getPlayer().getName() + " " + C.cWhite + message;
other.sendMessage(formatted);
}
}

View File

@ -34,16 +34,23 @@ public class ClansPlayerScoreboard extends PlayerScoreboard
for (Player otherPlayer : Bukkit.getOnlinePlayers())
{
if (otherPlayer.equals(player))
continue;
{
ClanInfo clan = _clansManager.getClan(player);
ClanRelation rel = _clansManager.getClanUtility().rel(clan, clan);
// Add Self to Self
add(getScoreboard(), otherPlayer, clan, rel);
}
else
{
ClanInfo clan = _clansManager.getClan(player);
ClanInfo otherClan = _clansManager.getClan(otherPlayer);
ClanRelation rel = _clansManager.getClanUtility().rel(clan, otherClan);
ClanInfo clan = _clansManager.getClan(player);
ClanInfo otherClan = _clansManager.getClan(otherPlayer);
ClanRelation rel = _clansManager.getClanUtility().rel(clan, otherClan);
// Add Other to Self
add(getScoreboard(), otherPlayer, otherClan, rel);
// Add Self to Other
add(otherPlayer.getScoreboard(), player, clan, rel);
// Add Other to Self
add(getScoreboard(), otherPlayer, otherClan, rel);
// Add Self to Other
add(otherPlayer.getScoreboard(), player, clan, rel);
}
}
}

View File

@ -5,6 +5,7 @@ import org.bukkit.event.EventHandler;
import org.bukkit.plugin.java.JavaPlugin;
import mineplex.core.MiniPlugin;
import mineplex.core.TablistFix;
import mineplex.core.account.CoreClientManager;
import mineplex.core.donation.DonationManager;
import mineplex.core.scoreboard.PlayerScoreboard;
@ -72,6 +73,7 @@ public class ClansScoreboardManager extends ScoreboardManager
for (Player player : clanInfo.getOnlinePlayers())
{
refresh(player);
TablistFix.refreshForPlayer(player);
}
}

View File

@ -3,6 +3,8 @@ package mineplex.hub;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import net.minecraft.util.com.mojang.authlib.yggdrasil.ProfileCache;
import mineplex.core.CustomTagFix;
import mineplex.core.TablistFix;
import mineplex.core.account.CoreClientManager;
@ -34,6 +36,7 @@ import mineplex.core.pet.PetManager;
import mineplex.core.poll.PollManager;
import mineplex.core.portal.Portal;
import mineplex.core.preferences.PreferencesManager;
import mineplex.core.profileCache.ProfileCacheManager;
import mineplex.core.projectile.ProjectileManager;
import mineplex.core.punish.Punish;
import mineplex.core.recharge.Recharge;
@ -86,6 +89,7 @@ public class Hub extends JavaPlugin implements IRelation
CoreClientManager clientManager = new CoreClientManager(this, webServerAddress);
CommandCenter.Instance.setClientManager(clientManager);
new ProfileCacheManager(this);
ItemStackFactory.Initialize(this, false);
Recharge.Initialize(this);
VisibilityManager.Initialize(this); Give.Initialize(this);

View File

@ -14,15 +14,12 @@ import mineplex.core.donation.DonationManager;
import mineplex.core.itemstack.ItemStackFactory;
import mineplex.core.shop.page.ShopPageBase;
import mineplex.hub.server.ServerManager;
import mineplex.hub.server.ui.button.SelectBETAButton;
import mineplex.hub.server.ui.button.SelectBHButton;
import mineplex.hub.server.ui.button.SelectBLDButton;
import mineplex.hub.server.ui.button.SelectBRButton;
import mineplex.hub.server.ui.button.SelectCSButton;
import mineplex.hub.server.ui.button.SelectDMTButton;
import mineplex.hub.server.ui.button.SelectDOMButton;
import mineplex.hub.server.ui.button.SelectMINButton;
import mineplex.hub.server.ui.button.SelectMSButton;
import mineplex.hub.server.ui.button.SelectPLAYERButton;
import mineplex.hub.server.ui.button.SelectSGButton;
import mineplex.hub.server.ui.button.SelectSKYButton;
@ -196,9 +193,9 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
getButtonMap().put(8, new SelectWIZButton(this));
getButtonMap().put(18, new SelectCSButton(this));
getButtonMap().put(20, new SelectBHButton(this));
// getButtonMap().put(20, new SelectBHButton(this));
getButtonMap().put(22, new SelectSSMButton(this));
getButtonMap().put(24, new SelectMSButton(this));
// getButtonMap().put(24, new SelectMSButton(this));
getButtonMap().put(26, new SelectDMTButton(this));
getButtonMap().put(36, new SelectDOMButton(this));
getButtonMap().put(38, new SelectTDMButton(this));