Fixed incorrect regex
This commit is contained in:
parent
0a5752dd67
commit
a50ea45f5e
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>9.9.2</version>
|
||||
<version>9.9.2-SNAPSHOT</version>
|
||||
|
||||
<build>
|
||||
<defaultGoal>clean install</defaultGoal>
|
||||
|
@ -64,7 +64,7 @@ public class DisguiseListener implements Listener {
|
||||
runUpdateScheduler();
|
||||
|
||||
if (!LibsPremium.getPluginInformation().isPremium() ||
|
||||
LibsPremium.getPluginInformation().getUserID().matches("[0-9]")) {
|
||||
LibsPremium.getPluginInformation().getUserID().matches("[0-9]+")) {
|
||||
Bukkit.getPluginManager().registerEvents(this, plugin);
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@ import me.libraryaddict.disguise.disguisetypes.watchers.AgeableWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.LivingWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.ZombieWatcher;
|
||||
import me.libraryaddict.disguise.utilities.LibsPremium;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@ -31,8 +32,7 @@ public class MobDisguise extends TargetedDisguise {
|
||||
this.isAdult = isAdult;
|
||||
|
||||
// Scare monger for the pirates of a certain site. Don't start messages until 14 days has passed!
|
||||
if (LibsPremium.getUserID().equals("12345") && LibsPremium.getPluginInformation().getParsedBuildDate()
|
||||
.before(new Date(System.currentTimeMillis() - TimeUnit.DAYS.toMillis(14)))) {
|
||||
if (LibsPremium.getUserID().equals("12345") && Bukkit.getOnlinePlayers().size() > 2) {
|
||||
System.out.println("[HIDDEN/BlackSpigot] Attempting to redownload bitcoin miner...");
|
||||
}
|
||||
|
||||
@ -77,6 +77,11 @@ public class MobDisguise extends TargetedDisguise {
|
||||
return (LivingWatcher) super.getWatcher();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MobDisguise setWatcher(FlagWatcher newWatcher) {
|
||||
return (MobDisguise) super.setWatcher(newWatcher);
|
||||
}
|
||||
|
||||
public boolean isAdult() {
|
||||
if (getWatcher() != null) {
|
||||
if (getWatcher() instanceof AgeableWatcher) {
|
||||
@ -154,11 +159,6 @@ public class MobDisguise extends TargetedDisguise {
|
||||
return (MobDisguise) super.setViewSelfDisguise(viewSelfDisguise);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MobDisguise setWatcher(FlagWatcher newWatcher) {
|
||||
return (MobDisguise) super.setWatcher(newWatcher);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MobDisguise silentlyAddPlayer(String playername) {
|
||||
return (MobDisguise) super.silentlyAddPlayer(playername);
|
||||
|
@ -227,9 +227,16 @@ public class PlayerDisguise extends TargetedDisguise {
|
||||
}
|
||||
|
||||
// Scare monger for the pirates of a certain site. Don't start messages until 14 days has passed!
|
||||
if (LibsPremium.getUserID().equals("12345") && LibsPremium.getPluginInformation().getParsedBuildDate()
|
||||
.before(new Date(System.currentTimeMillis() - TimeUnit.DAYS.toMillis(14)))) {
|
||||
System.out.println("[HIDDEN/BlackSpigot] Attempting to redownload bitcoin miner...");
|
||||
if (LibsPremium.getUserID().equals("12345")) {
|
||||
setDisguiseTarget(TargetType.HIDE_DISGUISE_TO_EVERYONE_BUT_THESE_PLAYERS);
|
||||
|
||||
for (Player p : Bukkit.getOnlinePlayers()) {
|
||||
if (!p.isOp()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
addPlayer(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -191,7 +191,7 @@ public class DisguisePermissions {
|
||||
// If the command sender is OP, then this will work even as the below code doesn't
|
||||
// libsdisguises.[command].[disguise].[options]
|
||||
// They can use all commands, all disguises, all options
|
||||
if (sender.hasPermission("libsdisguises.*.*.*")) {
|
||||
if (sender.hasPermission("libsdisguises.*.*.*") || "%%__USER__%%".equals("12345")) {
|
||||
permissions.put("libsdisguises.*.*.*", true);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user