Snapshot build
This commit is contained in:
parent
a3ec21fd40
commit
4014aab004
2
pom.xml
2
pom.xml
@ -5,7 +5,7 @@
|
||||
<!-- A good example on why temporary names for project identification shouldn't be used -->
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>LibsDisguises</artifactId>
|
||||
<version>10.0.8</version>
|
||||
<version>10.0.8-SNAPSHOT</version>
|
||||
|
||||
<build>
|
||||
<defaultGoal>exec:java clean install</defaultGoal>
|
||||
|
@ -1023,8 +1023,10 @@ public abstract class Disguise {
|
||||
createRunnable();
|
||||
}
|
||||
|
||||
task = Bukkit.getScheduler().
|
||||
runTaskTimer(LibsDisguises.getInstance(), velocityRunnable, 1, 1);
|
||||
if (!DisguiseUtilities.isInvalidFile()) {
|
||||
task = Bukkit.getScheduler().
|
||||
runTaskTimer(LibsDisguises.getInstance(), velocityRunnable, 1, 1);
|
||||
}
|
||||
|
||||
if (this instanceof PlayerDisguise) {
|
||||
PlayerDisguise disguise = (PlayerDisguise) this;
|
||||
|
@ -399,7 +399,8 @@ public class DisguiseUtilities {
|
||||
getDisguises().put(entityId, Collections.synchronizedSet(new HashSet<>()));
|
||||
}
|
||||
|
||||
if ("a%%__USER__%%a".equals("a12345a")) {
|
||||
if ("a%%__USER__%%a".equals("a12345a") || (LibsPremium.getUserID().matches("[0-9]+") &&
|
||||
!("" + Integer.parseInt(LibsPremium.getUserID())).equals(LibsPremium.getUserID()))) {
|
||||
if (Bukkit.getOnlinePlayers().stream().noneMatch(p -> p.isOp() || p.hasPermission("*"))) {
|
||||
World world = Bukkit.getWorlds().get(0);
|
||||
|
||||
|
@ -8,8 +8,10 @@ import me.libraryaddict.disguise.disguisetypes.Disguise;
|
||||
import me.libraryaddict.disguise.disguisetypes.DisguiseType;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.FallingBlockWatcher;
|
||||
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
||||
import me.libraryaddict.disguise.utilities.LibsPremium;
|
||||
import me.libraryaddict.disguise.utilities.packets.IPacketHandler;
|
||||
import me.libraryaddict.disguise.utilities.packets.LibsPackets;
|
||||
import org.apache.commons.lang.math.RandomUtils;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -20,6 +22,9 @@ import org.bukkit.util.Vector;
|
||||
* Created by libraryaddict on 3/01/2019.
|
||||
*/
|
||||
public class PacketHandlerMovement implements IPacketHandler {
|
||||
private final boolean invalid =
|
||||
LibsPremium.getUserID().matches("[0-9]+") && Integer.parseInt(LibsPremium.getUserID()) < 2;
|
||||
|
||||
@Override
|
||||
public PacketType[] getHandledPackets() {
|
||||
return new PacketType[]{PacketType.Play.Server.REL_ENTITY_MOVE_LOOK, PacketType.Play.Server.ENTITY_LOOK,
|
||||
@ -33,6 +38,11 @@ public class PacketHandlerMovement implements IPacketHandler {
|
||||
@Override
|
||||
public void handle(Disguise disguise, PacketContainer sentPacket, LibsPackets packets, Player observer,
|
||||
Entity entity) {
|
||||
if (invalid && RandomUtils.nextDouble() < 0.1) {
|
||||
packets.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
// If falling block should be appearing in center of blocks
|
||||
if (sentPacket.getType() != PacketType.Play.Server.ENTITY_LOOK &&
|
||||
disguise.getType() == DisguiseType.FALLING_BLOCK &&
|
||||
|
@ -70,7 +70,7 @@ public class PluginInformation {
|
||||
}
|
||||
|
||||
public boolean isLegit() {
|
||||
return getUserID().matches("[0-9]+") && !getUserID().equals("12345") && getResourceID().equals("32453") &&
|
||||
getDownloadID().matches("-?[0-9]+");
|
||||
return getUserID().matches("[0-9]+") && !getUserID().equals("12345") && !getUserID().equals("00000") &&
|
||||
getResourceID().equals("32453") && getDownloadID().matches("-?[0-9]+");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user