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