Merge branch 'master' of ssh://184.154.0.242:7999/min/Mineplex
This commit is contained in:
commit
8aec9e345e
@ -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>
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -50,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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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