mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2024-12-22 16:05:02 +00:00
Update for TFM staff refactor
This commit is contained in:
parent
9866ee5d80
commit
ccbceac360
5 changed files with 23 additions and 22 deletions
|
@ -21,7 +21,7 @@
|
|||
<dependency>
|
||||
<groupId>com.plotsquared</groupId>
|
||||
<artifactId>PlotSquared-Core</artifactId>
|
||||
<version>5.13.1</version>
|
||||
<version>5.13.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -152,6 +152,12 @@
|
|||
<version>1.16.1-R0.1-SNAPSHOT</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>me.totalfreedom</groupId>
|
||||
<artifactId>TotalFreedomMod</artifactId>
|
||||
<version>2020.9</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.kyori</groupId>
|
||||
<artifactId>text-adapter-bukkit</artifactId>
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
repositories {
|
||||
maven { url = "https://jitpack.io" }
|
||||
maven { url = "https://mvn.intellectualsites.com/content/repositories/snapshots" }
|
||||
maven {
|
||||
name = "spigot"
|
||||
url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
|
||||
}
|
||||
maven { url 'https://rayzr.dev/repo/' }
|
||||
maven { url "https://repo.dmulloy2.net/nexus/repository/public/" }
|
||||
maven { url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" }
|
||||
maven { url = "https://rayzr.dev/repo/" }
|
||||
maven { url = "https://repo.dmulloy2.net/nexus/repository/public/" }
|
||||
maven { url = "https://telesphoreo.me/repo/maven" }
|
||||
}
|
||||
def textVersion = "3.0.2"
|
||||
|
||||
|
@ -25,7 +23,7 @@ dependencies {
|
|||
implementation("org.jetbrains:annotations:19.0.0")
|
||||
implementation("org.khelekore:prtree:1.7.0-SNAPSHOT")
|
||||
implementation("org.spigotmc:spigot-api:1.16.1-R0.1-SNAPSHOT")
|
||||
implementation("com.github.TFPatches:TotalFreedomMod:server-SNAPSHOT")
|
||||
implementation("me.totalfreedom:TotalFreedomMod:2020.9")
|
||||
}
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
|
|
|
@ -30,7 +30,6 @@ import com.plotsquared.core.player.PlotPlayer;
|
|||
import com.plotsquared.core.plot.message.PlotMessage;
|
||||
import com.plotsquared.core.util.MainUtil;
|
||||
import com.plotsquared.core.util.MathMan;
|
||||
import com.plotsquared.core.util.Permissions;
|
||||
import com.plotsquared.core.util.StringComparison;
|
||||
import com.plotsquared.core.util.StringMan;
|
||||
import com.plotsquared.core.util.task.RunnableVal2;
|
||||
|
@ -162,7 +161,7 @@ public abstract class Command {
|
|||
|
||||
public boolean hasConfirmation(CommandCaller player) {
|
||||
// Confirmation message bypass
|
||||
return this.confirmation && !plotSquaredHandler.isAdmin(player);
|
||||
return this.confirmation && !plotSquaredHandler.isStaff(player);
|
||||
}
|
||||
|
||||
public List<String> getAliases() {
|
||||
|
|
|
@ -17,21 +17,21 @@ public class PlotSquaredHandler
|
|||
public static final Logger LOGGER = Bukkit.getPluginManager().getPlugin("PlotSquared").getLogger();
|
||||
private static Function<Player, Boolean> adminProvider;
|
||||
|
||||
public boolean isAdmin(CommandCaller commandCaller)
|
||||
public boolean isStaff(CommandCaller commandCaller)
|
||||
{
|
||||
final Player player = getPlayer(commandCaller.toString());
|
||||
if (player == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return isAdmin(player);
|
||||
return isStaff(player);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public boolean isAdmin(Player player)
|
||||
public boolean isStaff(Player player)
|
||||
{
|
||||
TotalFreedomMod tfm = getTFM();
|
||||
return tfm.al.isAdmin(player);
|
||||
return tfm.sl.isStaff(player);
|
||||
}
|
||||
|
||||
public static Player getPlayer(CommandCaller commandCaller)
|
||||
|
@ -59,7 +59,7 @@ public class PlotSquaredHandler
|
|||
"plots.worldedit.bypass", "plots.area", "plots.grant.add", "plots.debugallowunsafe", "plots.debugroadgen", "plots.debugpaste",
|
||||
"plots.createroadschematic", "plots.merge", "plots.unlink", "plots.area", "plots.setup", "plots.set.flag.other", "plots.reload",
|
||||
"plots.backup", "plots.debug");
|
||||
if (!isAdmin(player))
|
||||
if (!isStaff(player))
|
||||
{
|
||||
return !permission.startsWith("plots.admin") && !adminOnlyPermissions.contains(permission);
|
||||
}
|
||||
|
|
12
build.gradle
12
build.gradle
|
@ -5,12 +5,10 @@ buildscript {
|
|||
mavenCentral()
|
||||
maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
|
||||
jcenter()
|
||||
maven {
|
||||
name = "spigot"
|
||||
url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
|
||||
}
|
||||
maven { url 'https://rayzr.dev/repo/' }
|
||||
maven { url "https://repo.dmulloy2.net/nexus/repository/public/" }
|
||||
maven { url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" }
|
||||
maven { url = "https://rayzr.dev/repo/" }
|
||||
maven { url = "https://repo.dmulloy2.net/nexus/repository/public/" }
|
||||
maven { url = "https://telesphoreo.me/repo/maven" }
|
||||
}
|
||||
dependencies {
|
||||
classpath("com.github.jengelman.gradle.plugins:shadow:5.0.0")
|
||||
|
@ -107,7 +105,7 @@ subprojects {
|
|||
testAnnotationProcessor("org.projectlombok:lombok:1.18.8")
|
||||
testImplementation("junit:junit:4.13")
|
||||
implementation("org.spigotmc:spigot-api:1.16.1-R0.1-SNAPSHOT")
|
||||
implementation("com.github.TFPatches:TotalFreedomMod:server-SNAPSHOT")
|
||||
implementation("me.totalfreedom:TotalFreedomMod:2020.9")
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
|
|
Loading…
Reference in a new issue