Update for TFM staff refactor

This commit is contained in:
Telesphoreo 2020-08-15 20:06:27 -05:00
parent 0f203a5971
commit de2dff0376
6 changed files with 19 additions and 15 deletions

17
pom.xml
View file

@ -44,6 +44,11 @@
<id>jitpack.io</id> <id>jitpack.io</id>
<url>https://jitpack.io</url> <url>https://jitpack.io</url>
</repository> </repository>
<repository>
<id>telesphoreo-repo</id>
<url>https://telesphoreo.me/repo/maven</url>
</repository>
</repositories> </repositories>
<dependencies> <dependencies>
@ -82,15 +87,15 @@
<!-- PlotSquared v5 --> <!-- PlotSquared v5 -->
<dependency> <dependency>
<groupId>com.plotsquared</groupId> <groupId>com.plotsquared</groupId>
<artifactId>PlotSquared</artifactId> <artifactId>PlotSquared-Core</artifactId>
<version>5.1</version> <version>5.13.1</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.github.TFPatches</groupId> <groupId>me.totalfreedom</groupId>
<artifactId>TotalFreedomMod</artifactId> <artifactId>TotalFreedomMod</artifactId>
<version>4328a13eaf</version> <version>2020.9</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
</dependencies> </dependencies>
@ -161,8 +166,8 @@
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version> <version>3.8.1</version>
<configuration> <configuration>
<source>1.7</source> <source>1.8</source>
<target>1.7</target> <target>1.8</target>
<showWarnings>true</showWarnings> <showWarnings>true</showWarnings>
<showDeprecation>false</showDeprecation> <!-- TODO: Change back to true when setItemInHand fixed --> <showDeprecation>false</showDeprecation> <!-- TODO: Change back to true when setItemInHand fixed -->
</configuration> </configuration>

View file

@ -5,8 +5,8 @@ import org.bukkit.Bukkit;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
public class TFM { public class TFM
{
private TotalFreedomMod totalFreedomMod = null; private TotalFreedomMod totalFreedomMod = null;
public TotalFreedomMod getTFM() public TotalFreedomMod getTFM()
@ -26,9 +26,8 @@ public class TFM {
return null; return null;
} }
public boolean isAdmin(Player player) public boolean isStaff(Player player)
{ {
return getTFM().al.isAdmin(player); return getTFM().sl.isStaff(player);
} }
} }

View file

@ -16,7 +16,7 @@ public class CommandChatSpy extends Command {
@Override @Override
public void execute() { public void execute() {
if (!marriage.getTFM().isAdmin(player)) if (!marriage.getTFM().isStaff(player))
{ {
sender.sendMessage(ChatColor.RED + "You are not permitted to use this command."); sender.sendMessage(ChatColor.RED + "You are not permitted to use this command.");
return; return;

View file

@ -27,7 +27,7 @@ public class CommandPriest extends Command {
@Override @Override
public void execute() { public void execute() {
if (!marriage.getTFM().isAdmin(player)) if (!marriage.getTFM().isStaff(player))
{ {
sender.sendMessage(ChatColor.RED + "You are not permitted to use this command."); sender.sendMessage(ChatColor.RED + "You are not permitted to use this command.");
return; return;

View file

@ -22,7 +22,7 @@ public class CommandReload extends Command {
@Override @Override
public void execute() { public void execute() {
if (!marriage.getTFM().isAdmin(player)) if (!marriage.getTFM().isStaff(player))
{ {
sender.sendMessage(ChatColor.RED + "You are not permitted to use this command."); sender.sendMessage(ChatColor.RED + "You are not permitted to use this command.");
return; return;

View file

@ -18,7 +18,7 @@ public class CommandUpdate extends Command {
@Override @Override
public void execute() { public void execute() {
if (!marriage.getTFM().isAdmin(player)) if (!marriage.getTFM().isStaff(player))
{ {
sender.sendMessage(ChatColor.RED + "You are not permitted to use this command."); sender.sendMessage(ChatColor.RED + "You are not permitted to use this command.");
return; return;