Merge branch 'master' of ssh://184.154.0.242:7999/min/Mineplex

This commit is contained in:
Cheese 2015-11-11 07:43:01 +11:00
commit b3125e40ff
5 changed files with 75 additions and 10 deletions

View File

@ -0,0 +1,64 @@
From ea74383b4c0f5160f0d890d9377bd0d72e31db0c Mon Sep 17 00:00:00 2001
From: libraryaddict <libraryaddict115@yahoo.co.nz>
Date: Wed, 11 Nov 2015 00:21:54 +1300
Subject: [PATCH] Fix casting bug
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 60e8584..746961e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -76,32 +76,44 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public boolean shouldBreakLeash()
{
- return ((EntityInsentient) getHandle()).shouldBreakLeash();
+ if (getHandle() instanceof EntityInsentient)
+ return ((EntityInsentient) getHandle()).shouldBreakLeash();
+
+ return false;
}
public void setShouldBreakLeash(boolean shouldBreakLeash)
{
- ((EntityInsentient) getHandle()).setShouldBreakLeash(shouldBreakLeash);
+ if (getHandle() instanceof EntityInsentient)
+ ((EntityInsentient) getHandle()).setShouldBreakLeash(shouldBreakLeash);
}
public boolean shouldPullWhileLeashed()
{
- return ((EntityInsentient) getHandle()).shouldPullWhileLeashed();
+ if (getHandle() instanceof EntityInsentient)
+ return ((EntityInsentient) getHandle()).shouldPullWhileLeashed();
+
+ return false;
}
public void setPullWhileLeashed(boolean pullWhileLeashed)
{
- ((EntityInsentient) getHandle()).setPullWhileLeashed(pullWhileLeashed);
+ if (getHandle() instanceof EntityInsentient)
+ ((EntityInsentient) getHandle()).setPullWhileLeashed(pullWhileLeashed);
}
public boolean isVegetated()
{
- return ((EntityInsentient) getHandle()).isVegetated();
+ if (getHandle() instanceof EntityInsentient)
+ return ((EntityInsentient) getHandle()).isVegetated();
+
+ return false;
}
public void setVegetated(boolean vegetated)
{
- ((EntityInsentient) getHandle()).setVegetated(vegetated);
+ if (getHandle() instanceof EntityInsentient)
+ ((EntityInsentient) getHandle()).setVegetated(vegetated);
}
public boolean isGhost()
--
1.9.5.msysgit.0

Binary file not shown.

View File

@ -166,7 +166,7 @@ public class Illusion extends SkillActive
UtilAction.velocity(skel, 0.6, 0.4, 1, false);
}
UtilEnt.CreatureMoveFast(skel, cur.getTargetBlock((HashSet<Byte>)null, 0).getLocation().add(0, 2, 0), 1.8f);
UtilEnt.CreatureMoveFast(skel, cur.getTargetBlock((HashSet<Byte>)null, 30).getLocation().add(0, 2, 0), 1.8f);
}
}
}

View File

@ -23,13 +23,14 @@ import mineplex.core.updater.FileUpdater;
import mineplex.core.updater.Updater;
import mineplex.staffServer.customerSupport.CustomerSupport;
import mineplex.staffServer.salespackage.SalesPackageManager;
import net.minecraft.server.v1_7_R4.MinecraftServer;
import net.minecraft.util.com.mojang.authlib.GameProfile;
import net.minecraft.server.v1_8_R3.MinecraftServer;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_7_R4.CraftServer;
import org.bukkit.craftbukkit.v1_8_R3.CraftServer;
import org.bukkit.plugin.java.JavaPlugin;
import com.mojang.authlib.GameProfile;
public class StaffServer extends JavaPlugin
{
private String WEB_CONFIG = "webServer";

View File

@ -113,11 +113,6 @@ public class SpectatorPage extends
private void buildMultipleTeams(List<GameTeam> teamList, int playerCount)
{
_buttons = new IButton[0];
_items = new ItemStack[0];
int currentRow = 0;
Collections.sort(teamList, new Comparator<GameTeam>()
{
@ -138,6 +133,11 @@ public class SpectatorPage extends
});
_buttons = new IButton[0];
_items = new ItemStack[0];
int currentRow = 0;
for (GameTeam team : teamList)
{
ArrayList<Player> teamPlayers = team.GetPlayers(true);
@ -155,7 +155,7 @@ public class SpectatorPage extends
_buttons = Arrays.copyOf(_buttons, _buttons.length
+ (rowsNeeded * 9));
_items = Arrays.copyOf(_items, _items.length + (rowsNeeded * 9));
_items = Arrays.copyOf(_items, _items.length + (rowsNeeded * 9) + rowsNeeded);
for (int row = 0; row < rowsNeeded; row++)
{