Fix movement, update stuff, fix bugs, something, made sweet love to
herobrine
This commit is contained in:
@@ -1186,8 +1186,6 @@ public class DisguiseUtilities
|
||||
|
||||
if ((t = scoreboard.getTeam("LDPushing")) != null)
|
||||
{
|
||||
t.setOption(Option.COLLISION_RULE, OptionStatus.ALWAYS);
|
||||
t.removeEntry(player.getName());
|
||||
t.unregister();
|
||||
}
|
||||
|
||||
@@ -1280,6 +1278,19 @@ public class DisguiseUtilities
|
||||
return;
|
||||
}
|
||||
|
||||
// Code to stop player pushing in 1.9
|
||||
Scoreboard scoreboard = player.getScoreboard();
|
||||
Team t;
|
||||
|
||||
if ((t = scoreboard.getTeam("LDPushing")) == null)
|
||||
{
|
||||
t = scoreboard.registerNewTeam("LDPushing");
|
||||
|
||||
t.setOption(Option.COLLISION_RULE, OptionStatus.NEVER);
|
||||
}
|
||||
|
||||
t.addEntry(player.getName());
|
||||
|
||||
// Add himself to his own entity tracker
|
||||
Object trackedPlayersObj = ReflectionManager.getNmsField("EntityTrackerEntry", "trackedPlayers")
|
||||
.get(entityTrackerEntry);
|
||||
@@ -1498,22 +1509,6 @@ public class DisguiseUtilities
|
||||
return;
|
||||
}
|
||||
|
||||
// Code to stop player pushing in 1.9
|
||||
Scoreboard scoreboard = player.getScoreboard();
|
||||
Team t;
|
||||
|
||||
if ((t = scoreboard.getTeam("LDPushing")) != null)
|
||||
{
|
||||
t.setOption(Option.COLLISION_RULE, OptionStatus.NEVER);
|
||||
}
|
||||
else
|
||||
{
|
||||
t = scoreboard.registerNewTeam("LDPushing");
|
||||
|
||||
t.setOption(Option.COLLISION_RULE, OptionStatus.NEVER);
|
||||
t.addEntry(player.getName());
|
||||
}
|
||||
|
||||
// player.spigot().setCollidesWithEntities(false);
|
||||
// Finish up
|
||||
selfDisguised.add(player.getUniqueId());
|
||||
|
@@ -408,9 +408,9 @@ public class ReflectionManager
|
||||
|
||||
return getNmsClass("PacketPlayOutPlayerInfo$PlayerInfoData")
|
||||
.getDeclaredConstructor(getNmsClass("PacketPlayOutPlayerInfo"), gameProfile.getHandleType(), int.class,
|
||||
getNmsClass("WorldSettings$EnumGamemode"), getNmsClass("IChatBaseComponent"))
|
||||
.newInstance(playerInfoPacket, gameProfile.getHandle(), 0,
|
||||
getNmsClass("WorldSettings$EnumGamemode").getEnumConstants()[1], playerListName);
|
||||
getNmsClass("EnumGamemode"), getNmsClass("IChatBaseComponent"))
|
||||
.newInstance(playerInfoPacket, gameProfile.getHandle(), 0, getNmsClass("EnumGamemode").getEnumConstants()[1],
|
||||
playerListName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
Reference in New Issue
Block a user