Skip to content

Commit

Permalink
Give PermissionsEX a burial at sea
Browse files Browse the repository at this point in the history
The plugin is discontinued (has been for a while.)
There are no known builds for 1.13.2 or 1.14.1. While the plugin may work on those versions, administrators are encouraged to phase it out in favor of either [LuckPerms](https://github.com/Lucko/LuckPerms) or [GroupManager](https://github.com/GroupManager/GroupManager)
  • Loading branch information
flagcourier committed May 26, 2019
1 parent 4f7e8b3 commit 125fe34
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 314 deletions.
1 change: 0 additions & 1 deletion .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="../lib/Essentials.jar"/>
<classpathentry kind="lib" path="../lib/EssentialsGroupManager.jar"/>
<classpathentry kind="lib" path="../lib/PermissionsEx.jar"/>
<classpathentry kind="lib" path="../lib/bukkit.jar" sourcepath="/lib/bukkit.jar">
<attributes>
<attribute name="javadoc_location" value="https://hub.spigotmc.org/javadocs/bukkit"/>
Expand Down
2 changes: 0 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<get src="http://palmergames.com/file-repo/libs/bukkit.jar" dest="${env.LIB}/bukkit.jar" skipexisting="true" />
<get src="http://palmergames.com/file-repo/libs/Essentials.jar" dest="${env.LIB}/Essentials.jar" skipexisting="true" />
<get src="http://palmergames.com/file-repo/libs/EssentialsGroupManager.jar" dest="${env.LIB}/EssentialsGroupManager.jar" skipexisting="true" />
<get src="http://palmergames.com/file-repo/libs/PermissionsEx.jar" dest="${env.LIB}/PermissionsEx.jar" skipexisting="true" />
<get src="http://palmergames.com/file-repo/libs/Reserve.jar" dest="${env.LIB}/Reserve.jar" skipexisting="true" />
<get src="http://palmergames.com/file-repo/libs/TheNewChat.jar" dest="${env.LIB}/TheNewChat.jar" skipexisting="true" />
<get src="http://palmergames.com/file-repo/libs/Vault.jar" dest="${env.LIB}/Vault.jar" skipexisting="true" />
Expand All @@ -33,7 +32,6 @@
<pathelement location="${env.LIB}/bukkit.jar" />
<pathelement location="${env.LIB}/Essentials.jar" />
<pathelement location="${env.LIB}/EssentialsGroupManager.jar" />
<pathelement location="${env.LIB}/PermissionsEx.jar" />
<pathelement location="${env.LIB}/PermissionsBukkit.jar" />
<pathelement location="${env.LIB}/Reserve.jar" />
<pathelement location="${env.LIB}/TheNewChat.jar" />
Expand Down
37 changes: 14 additions & 23 deletions src/com/palmergames/bukkit/towny/Towny.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import com.palmergames.bukkit.towny.permissions.BukkitPermSource;
import com.palmergames.bukkit.towny.permissions.GroupManagerSource;
import com.palmergames.bukkit.towny.permissions.NullPermSource;
import com.palmergames.bukkit.towny.permissions.PEXSource;
import com.palmergames.bukkit.towny.permissions.TownyPerms;
import com.palmergames.bukkit.towny.permissions.VaultPermSource;
import com.palmergames.bukkit.towny.regen.TownyRegenAPI;
Expand Down Expand Up @@ -302,31 +301,23 @@ private void checkPlugins() {
this.getTownyUniverse().setPermissionSource(new GroupManagerSource(this, test));
using.add(String.format("%s v%s", "GroupManager", test.getDescription().getVersion()));
} else {
test = getServer().getPluginManager().getPlugin("PermissionsEx");
// Try Vault
test = getServer().getPluginManager().getPlugin("Vault");
if (test != null) {
// permissions = (PermissionsEX)test;
getTownyUniverse().setPermissionSource(new PEXSource(this, test));
using.add(String.format("%s v%s", "PermissionsEX", test.getDescription().getVersion()));
} else {
// Try Vault NOTE: Permissions 3 Was Removed and moved to Legacy!
test = getServer().getPluginManager().getPlugin("Vault");
if (test != null) {
net.milkbowl.vault.chat.Chat chat = getServer().getServicesManager().load(net.milkbowl.vault.chat.Chat.class);
if (chat == null) {
// No Chat implementation
test = null;
// Fall back to BukkitPermissions below
} else {
getTownyUniverse().setPermissionSource(new VaultPermSource(this, chat));
using.add(String.format("%s v%s", "Vault", test.getDescription().getVersion()));
}
}

if (test == null) {
getTownyUniverse().setPermissionSource(new BukkitPermSource(this));
using.add("BukkitPermissions");
net.milkbowl.vault.chat.Chat chat = getServer().getServicesManager().load(net.milkbowl.vault.chat.Chat.class);
if (chat == null) {
// No Chat implementation
test = null;
// Fall back to BukkitPermissions below
} else {
getTownyUniverse().setPermissionSource(new VaultPermSource(this, chat));
using.add(String.format("%s v%s", "Vault", test.getDescription().getVersion()));
}
}

if (test == null) {
getTownyUniverse().setPermissionSource(new BukkitPermSource(this));
using.add("BukkitPermissions");
}
}
} else {
Expand Down
262 changes: 0 additions & 262 deletions src/com/palmergames/bukkit/towny/permissions/PEXSource.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,4 @@ public enum GMSystem_Action {
DEFAULT_GROUP_CHANGED,
//VALIDATE_TOGGLE,
}

// PermissionsEX Event Enums
public enum PEXEntity_Action {
PERMISSIONS_CHANGED,
OPTIONS_CHANGED,
INHERITANCE_CHANGED,
INFO_CHANGED,
TIMEDPERMISSION_EXPIRED,
RANK_CHANGED,
DEFAULTGROUP_CHANGED,
//WEIGHT_CHANGED,
//SAVED,
REMOVED,
}

public enum PEXSystem_Action {
//BACKEND_CHANGED,
RELOADED,
WORLDINHERITANCE_CHANGED,
DEFAULTGROUP_CHANGED,
//DEBUGMODE_TOGGLE,
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import org.bukkit.entity.Player;
import org.bukkit.permissions.PermissionAttachmentInfo;

import ru.tehkode.permissions.bukkit.PermissionsEx;

import com.palmergames.bukkit.towny.Towny;
import com.palmergames.bukkit.towny.TownyMessaging;
import com.palmergames.bukkit.towny.TownySettings;
Expand All @@ -28,7 +26,6 @@ public abstract class TownyPermissionSource {
protected Towny plugin;

protected GroupManager groupManager = null;
protected PermissionsEx pex = null;

abstract public String getPrefixSuffix(Resident resident, String node);

Expand Down

0 comments on commit 125fe34

Please sign in to comment.