Merge branch 'master' of ssh://dev1.mineplex.com:7999/min/mineplex
This commit is contained in:
commit
f73d4d3e23
Binary file not shown.
Binary file not shown.
@ -360,26 +360,20 @@ public class ItemStackFactory extends MiniPlugin
|
||||
if (formatted)
|
||||
out = _nameFormat;
|
||||
|
||||
System.out.println("Searching A: " + id + ":" + data);
|
||||
|
||||
if (!_names.containsKey(id))
|
||||
return out + "Unknown";
|
||||
|
||||
System.out.println("Searching B");
|
||||
|
||||
if (!_names.get(id).containsKey(data))
|
||||
{
|
||||
if (_names.get(id).containsKey(0))
|
||||
return out + _names.get(id).get(0).getKey();
|
||||
System.out.println("Searching C");
|
||||
|
||||
for (Entry<String, Boolean> cur : _names.get(id).values())
|
||||
return cur.getKey();
|
||||
System.out.println("Searching D");
|
||||
|
||||
return out + "Unknown";
|
||||
}
|
||||
|
||||
System.out.println("Searching E");
|
||||
|
||||
return out + _names.get(id).get(data).getKey();
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,7 @@ import mineplex.core.punish.Command.*;
|
||||
import mineplex.core.punish.Tokens.PunishClientToken;
|
||||
import mineplex.core.punish.Tokens.PunishmentToken;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.libs.com.google.gson.Gson;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -196,15 +197,21 @@ public class Punish extends MiniPlugin
|
||||
}
|
||||
else if (banResult == PunishmentResponse.Punished)
|
||||
{
|
||||
String durationString = F.time(UtilTime.convertString(finalDuration < 0 ? -1 : (long)(finalDuration * 3600000), 1, TimeUnit.FIT));
|
||||
final String durationString = F.time(UtilTime.convertString(finalDuration < 0 ? -1 : (long)(finalDuration * 3600000), 1, TimeUnit.FIT));
|
||||
|
||||
if (sentence == PunishmentSentence.Ban)
|
||||
{
|
||||
if (caller == null)
|
||||
System.out.println(F.main(GetName(), F.elem(caller == null ? "Mineplex Anti-Cheat" : caller.getName()) + " banned " + F.elem(playerName) + " because of " + F.elem(reason) + " for " + durationString + "."));
|
||||
|
||||
UtilPlayer.kick(UtilPlayer.searchOnline(null, playerName, false), GetName(), caller == null ? "Mineplex Anti-Cheat" : caller.getName() + " banned you because of " + F.elem(reason) + " for " +
|
||||
durationString + ".");
|
||||
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(GetPlugin(), new Runnable()
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
UtilPlayer.kick(UtilPlayer.searchOnline(null, playerName, false), GetName(), caller == null ? "Mineplex Anti-Cheat" : caller.getName() + " banned you because of " + F.elem(reason) + " for " +
|
||||
durationString + ".");
|
||||
}
|
||||
});
|
||||
|
||||
UtilServer.broadcast(F.main(GetName(), F.elem(caller == null ? "Mineplex Anti-Cheat" : caller.getName()) + " banned " + F.elem(playerName) + " because of " + F.elem(reason) + " for " + durationString + "."));
|
||||
}
|
||||
|
@ -88,22 +88,22 @@ public class ClientClass
|
||||
ISkill classPassiveBSkill = _skillFactory.GetSkill(buildToken.ClassPassiveBSkill);
|
||||
ISkill globalPassive = _skillFactory.GetSkill(buildToken.GlobalPassiveSkill);
|
||||
|
||||
if (!ValidSkill(buildToken.SwordSkill, swordSkill, SkillType.Sword))
|
||||
if (!buildToken.SwordSkill.isEmpty() && !ValidSkill(buildToken.SwordSkill, swordSkill, SkillType.Sword))
|
||||
continue;
|
||||
|
||||
if (!ValidSkill(buildToken.AxeSkill, axeSkill, SkillType.Axe))
|
||||
if (!buildToken.AxeSkill.isEmpty() && !ValidSkill(buildToken.AxeSkill, axeSkill, SkillType.Axe))
|
||||
continue;
|
||||
|
||||
if (!ValidSkill(buildToken.BowSkill, bowSkill, SkillType.Bow))
|
||||
if (!buildToken.BowSkill.isEmpty() && !ValidSkill(buildToken.BowSkill, bowSkill, SkillType.Bow))
|
||||
continue;
|
||||
|
||||
if (!ValidSkill(buildToken.ClassPassiveASkill, classPassiveASkill, SkillType.PassiveA))
|
||||
if (!buildToken.ClassPassiveASkill.isEmpty() && !ValidSkill(buildToken.ClassPassiveASkill, classPassiveASkill, SkillType.PassiveA))
|
||||
continue;
|
||||
|
||||
if (!ValidSkill(buildToken.ClassPassiveBSkill, classPassiveBSkill, SkillType.PassiveB))
|
||||
if (!buildToken.ClassPassiveBSkill.isEmpty() && !ValidSkill(buildToken.ClassPassiveBSkill, classPassiveBSkill, SkillType.PassiveB))
|
||||
continue;
|
||||
|
||||
if (!ValidSkill(buildToken.GlobalPassiveSkill, globalPassive, SkillType.GlobalPassive))
|
||||
if (!buildToken.GlobalPassiveSkill.isEmpty() && !ValidSkill(buildToken.GlobalPassiveSkill, globalPassive, SkillType.GlobalPassive))
|
||||
continue;
|
||||
|
||||
_customBuilds.get(pvpClass).put(buildToken.CustomBuildNumber, buildToken);
|
||||
@ -453,6 +453,8 @@ public class ClientClass
|
||||
_savingCustomBuild.removeSkill(skill.GetSkillType());
|
||||
|
||||
skill.RemoveUser(_client.GetPlayer());
|
||||
|
||||
calculateTokens();
|
||||
}
|
||||
|
||||
public ItemStack[] GetDefaultArmor()
|
||||
|
@ -1,100 +1,110 @@
|
||||
package net.minecraft.server.v1_7_R2;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import org.spigotmc.authlib.properties.Property;
|
||||
import net.minecraft.util.com.mojang.authlib.GameProfile;
|
||||
|
||||
public class PacketPlayOutNamedEntitySpawn extends Packet
|
||||
{
|
||||
public int a;
|
||||
public GameProfile b;
|
||||
public int c;
|
||||
public int d;
|
||||
public int e;
|
||||
public byte f;
|
||||
public byte g;
|
||||
public int h;
|
||||
public DataWatcher i;
|
||||
public List j;
|
||||
import java.io.IOException; // CraftBukkit
|
||||
|
||||
public PacketPlayOutNamedEntitySpawn()
|
||||
{
|
||||
}
|
||||
public class PacketPlayOutNamedEntitySpawn extends Packet {
|
||||
|
||||
public PacketPlayOutNamedEntitySpawn(EntityHuman entityhuman)
|
||||
{
|
||||
this.a = entityhuman.getId();
|
||||
this.b = entityhuman.getProfile();
|
||||
this.c = MathHelper.floor(entityhuman.locX * 32.0D);
|
||||
this.d = MathHelper.floor(entityhuman.locY * 32.0D);
|
||||
this.e = MathHelper.floor(entityhuman.locZ * 32.0D);
|
||||
this.f = ((byte) (int) (entityhuman.yaw * 256.0F / 360.0F));
|
||||
this.g = ((byte) (int) (entityhuman.pitch * 256.0F / 360.0F));
|
||||
ItemStack itemstack = entityhuman.inventory.getItemInHand();
|
||||
public int a;
|
||||
public GameProfile b;
|
||||
public int c;
|
||||
public int d;
|
||||
public int e;
|
||||
public byte f;
|
||||
public byte g;
|
||||
public int h;
|
||||
public DataWatcher i;
|
||||
public List j;
|
||||
|
||||
this.h = (itemstack == null ? 0 : Item.b(itemstack.getItem()));
|
||||
this.i = entityhuman.getDataWatcher();
|
||||
}
|
||||
public PacketPlayOutNamedEntitySpawn() {}
|
||||
|
||||
public void a(PacketDataSerializer packetdataserializer) throws IOException
|
||||
{
|
||||
this.a = packetdataserializer.a();
|
||||
this.b = new GameProfile(packetdataserializer.c(36), packetdataserializer.c(16));
|
||||
this.c = packetdataserializer.readInt();
|
||||
this.d = packetdataserializer.readInt();
|
||||
this.e = packetdataserializer.readInt();
|
||||
this.f = packetdataserializer.readByte();
|
||||
this.g = packetdataserializer.readByte();
|
||||
this.h = packetdataserializer.readShort();
|
||||
this.j = DataWatcher.b(packetdataserializer);
|
||||
}
|
||||
public PacketPlayOutNamedEntitySpawn(EntityHuman entityhuman) {
|
||||
this.a = entityhuman.getId();
|
||||
this.b = entityhuman.getProfile();
|
||||
this.c = MathHelper.floor(entityhuman.locX * 32.0D);
|
||||
this.d = MathHelper.floor(entityhuman.locY * 32.0D);
|
||||
this.e = MathHelper.floor(entityhuman.locZ * 32.0D);
|
||||
this.f = (byte) ((int) (entityhuman.yaw * 256.0F / 360.0F));
|
||||
this.g = (byte) ((int) (entityhuman.pitch * 256.0F / 360.0F));
|
||||
ItemStack itemstack = entityhuman.inventory.getItemInHand();
|
||||
|
||||
public void b(PacketDataSerializer packetdataserializer) throws IOException
|
||||
{
|
||||
packetdataserializer.b(this.a);
|
||||
packetdataserializer.a(this.b.getId());
|
||||
packetdataserializer.a(this.b.getName().length() > 16 ? this.b.getName().substring(0, 16) : this.b.getName());
|
||||
packetdataserializer.writeInt(this.c);
|
||||
packetdataserializer.writeInt(this.d);
|
||||
packetdataserializer.writeInt(this.e);
|
||||
packetdataserializer.writeByte(this.f);
|
||||
packetdataserializer.writeByte(this.g);
|
||||
packetdataserializer.writeShort(this.h);
|
||||
this.i.a(packetdataserializer);
|
||||
}
|
||||
this.h = itemstack == null ? 0 : Item.b(itemstack.getItem());
|
||||
this.i = entityhuman.getDataWatcher();
|
||||
}
|
||||
|
||||
// Spigot start
|
||||
@Override
|
||||
public void writeSnapshot(PacketDataSerializer packetdataserializer) throws IOException
|
||||
{ // CraftBukkit - added throws
|
||||
packetdataserializer.b(this.a);
|
||||
packetdataserializer.a(EntityHuman.a(this.b).toString());
|
||||
packetdataserializer.a(this.b.getName().length() > 16 ? this.b.getName().substring(0, 16) : this.b.getName()); // CraftBukkit
|
||||
packetdataserializer.b(0); // TODO
|
||||
packetdataserializer.writeInt(this.c);
|
||||
packetdataserializer.writeInt(this.d);
|
||||
packetdataserializer.writeInt(this.e);
|
||||
packetdataserializer.writeByte(this.f);
|
||||
packetdataserializer.writeByte(this.g);
|
||||
packetdataserializer.writeShort(this.h);
|
||||
this.i.a(packetdataserializer);
|
||||
}
|
||||
public void a(PacketDataSerializer packetdataserializer) throws IOException { // CraftBukkit - added throws
|
||||
this.a = packetdataserializer.a();
|
||||
this.b = new GameProfile(packetdataserializer.c(36), packetdataserializer.c(16));
|
||||
this.c = packetdataserializer.readInt();
|
||||
this.d = packetdataserializer.readInt();
|
||||
this.e = packetdataserializer.readInt();
|
||||
this.f = packetdataserializer.readByte();
|
||||
this.g = packetdataserializer.readByte();
|
||||
this.h = packetdataserializer.readShort();
|
||||
this.j = DataWatcher.b(packetdataserializer);
|
||||
}
|
||||
|
||||
public void a(PacketPlayOutListener packetplayoutlistener)
|
||||
{
|
||||
packetplayoutlistener.a(this);
|
||||
}
|
||||
public void b(PacketDataSerializer packetdataserializer) throws IOException { // CraftBukkit - added throws
|
||||
packetdataserializer.b(this.a);
|
||||
packetdataserializer.a(this.b.getId());
|
||||
packetdataserializer.a(this.b.getName().length() > 16 ? this.b.getName().substring(0, 16) : this.b.getName()); // CraftBukkit - Limit name length to 16 characters
|
||||
packetdataserializer.writeInt(this.c);
|
||||
packetdataserializer.writeInt(this.d);
|
||||
packetdataserializer.writeInt(this.e);
|
||||
packetdataserializer.writeByte(this.f);
|
||||
packetdataserializer.writeByte(this.g);
|
||||
packetdataserializer.writeShort(this.h);
|
||||
this.i.a(packetdataserializer);
|
||||
}
|
||||
|
||||
public String b()
|
||||
{
|
||||
return String.format(
|
||||
"id=%d, gameProfile='%s', x=%.2f, y=%.2f, z=%.2f, carried=%d",
|
||||
new Object[] { Integer.valueOf(this.a), this.b, Float.valueOf(this.c / 32.0F),
|
||||
Float.valueOf(this.d / 32.0F), Float.valueOf(this.e / 32.0F), Integer.valueOf(this.h) });
|
||||
}
|
||||
// Spigot start
|
||||
@Override
|
||||
public void writeSnapshot(PacketDataSerializer packetdataserializer) throws IOException
|
||||
{ // CraftBukkit - added throws
|
||||
packetdataserializer.b( this.a );
|
||||
packetdataserializer.a( EntityHuman.a( this.b ).toString() );
|
||||
packetdataserializer.a( this.b.getName().length() > 16 ? this.b.getName().substring( 0, 16 ) : this.b.getName() ); // CraftBukkit - Limit name length to 16 characters
|
||||
|
||||
public void handle(PacketListener packetlistener)
|
||||
{
|
||||
a((PacketPlayOutListener) packetlistener);
|
||||
}
|
||||
}
|
||||
if ( this.b instanceof ThreadPlayerLookupUUID.NewGameProfileWrapper )
|
||||
{
|
||||
org.spigotmc.authlib.GameProfile newProfile = ((ThreadPlayerLookupUUID.NewGameProfileWrapper) b).newProfile;
|
||||
packetdataserializer.b( newProfile.getProperties().size() );
|
||||
for ( String key : newProfile.getProperties().keys() )
|
||||
{
|
||||
for ( Property prop : newProfile.getProperties().get( key ) )
|
||||
{
|
||||
packetdataserializer.a( prop.getName() );
|
||||
packetdataserializer.a( prop.getValue() );
|
||||
packetdataserializer.a( prop.getSignature() );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
packetdataserializer.b( 0 );
|
||||
}
|
||||
packetdataserializer.writeInt( this.c );
|
||||
packetdataserializer.writeInt( this.d );
|
||||
packetdataserializer.writeInt( this.e );
|
||||
packetdataserializer.writeByte( this.f );
|
||||
packetdataserializer.writeByte( this.g );
|
||||
packetdataserializer.writeShort( this.h );
|
||||
this.i.a( packetdataserializer );
|
||||
}
|
||||
|
||||
// Spigot end
|
||||
|
||||
public void a(PacketPlayOutListener packetplayoutlistener) {
|
||||
packetplayoutlistener.a(this);
|
||||
}
|
||||
|
||||
public String b() {
|
||||
return String.format("id=%d, gameProfile=\'%s\', x=%.2f, y=%.2f, z=%.2f, carried=%d", new Object[] { Integer.valueOf(this.a), this.b, Float.valueOf((float) this.c / 32.0F), Float.valueOf((float) this.d / 32.0F), Float.valueOf((float) this.e / 32.0F), Integer.valueOf(this.h)});
|
||||
}
|
||||
|
||||
public void handle(PacketListener packetlistener) {
|
||||
this.a((PacketPlayOutListener) packetlistener);
|
||||
}
|
||||
}
|
@ -1936,16 +1936,16 @@ public class PlayerConnection implements PacketPlayInListener
|
||||
case SWAP_WITH_CURSOR:
|
||||
this.player.playerConnection.sendPacket(new PacketPlayOutSetSlot(-1, -1, this.player.inventory
|
||||
.getCarried()));
|
||||
this.player.playerConnection.sendPacket(new PacketPlayOutSetSlot(
|
||||
this.player.activeContainer.windowId, packetplayinwindowclick.d(),
|
||||
this.player.activeContainer.getSlot(packetplayinwindowclick.d()).getItem()));
|
||||
|
||||
if (this.player.activeContainer.c.size() > packetplayinwindowclick.d())
|
||||
this.player.playerConnection.sendPacket(new PacketPlayOutSetSlot(
|
||||
this.player.activeContainer.windowId, packetplayinwindowclick.d(),
|
||||
this.player.activeContainer.getSlot(packetplayinwindowclick.d()).getItem()));
|
||||
break;
|
||||
// Modified clicked only
|
||||
case DROP_ALL_SLOT:
|
||||
case DROP_ONE_SLOT:
|
||||
this.player.playerConnection.sendPacket(new PacketPlayOutSetSlot(
|
||||
this.player.activeContainer.windowId, packetplayinwindowclick.d(),
|
||||
this.player.activeContainer.getSlot(packetplayinwindowclick.d()).getItem()));
|
||||
this.player.playerConnection.sendPacket(new PacketPlayOutSetSlot(this.player.activeContainer.windowId, packetplayinwindowclick.d(), this.player.activeContainer.getSlot(packetplayinwindowclick.d()).getItem()));
|
||||
break;
|
||||
// Modified cursor only
|
||||
case DROP_ALL_CURSOR:
|
||||
|
@ -48,7 +48,7 @@ public class Arcade extends JavaPlugin implements INautilusPlugin
|
||||
private String WEB_CONFIG = "webServer";
|
||||
|
||||
//Modules
|
||||
private CoreClientManager _clientManager;
|
||||
private CoreClientManager _clientManager;
|
||||
private DonationManager _donationManager;
|
||||
private DamageManager _damageManager;
|
||||
|
||||
|
@ -155,9 +155,9 @@ public class Bridge extends TeamGame implements OreObsfucation
|
||||
GemMultiplier = 2.5;
|
||||
|
||||
//Tournament
|
||||
QuitOut = false;
|
||||
AutoStart = false;
|
||||
AutoBalance = false;
|
||||
QuitOut = true;
|
||||
AutoStart = true;
|
||||
AutoBalance = true;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -456,7 +456,6 @@ public class HideSeek extends TeamGame
|
||||
@EventHandler
|
||||
public void FallingBlockDamage(EntityDamageEvent event)
|
||||
{
|
||||
System.out.println("Damage event.");
|
||||
if (!(event instanceof EntityDamageByEntityEvent))
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user