mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-12-12 15:07:22 +01:00
Give more explicit console permissions
This commit is contained in:
parent
779bc5e5a5
commit
96b02b057b
@ -217,7 +217,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.*.*.*") || "%%__USER__%%".equals("12345")) {
|
if (sender == Bukkit.getConsoleSender() || sender.hasPermission("libsdisguises.*.*.*") || "%%__USER__%%".equals("12345")) {
|
||||||
permissions.put("libsdisguises.*.*.*", true);
|
permissions.put("libsdisguises.*.*.*", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -511,6 +511,10 @@ public class DisguisePermissions {
|
|||||||
* @return true if permitted
|
* @return true if permitted
|
||||||
*/
|
*/
|
||||||
public boolean isAllowedDisguise(DisguisePerm disguisePerm, Collection<String> disguiseOptions) {
|
public boolean isAllowedDisguise(DisguisePerm disguisePerm, Collection<String> disguiseOptions) {
|
||||||
|
if (this == Bukkit.getConsoleSender()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
PermissionStorage storage = getStorage(disguisePerm);
|
PermissionStorage storage = getStorage(disguisePerm);
|
||||||
|
|
||||||
if (storage == null) {
|
if (storage == null) {
|
||||||
@ -535,6 +539,10 @@ public class DisguisePermissions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAllowedDisguise(DisguisePerm disguisePerm) {
|
public boolean isAllowedDisguise(DisguisePerm disguisePerm) {
|
||||||
|
if (this == Bukkit.getConsoleSender()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return getStorage(disguisePerm) != null;
|
return getStorage(disguisePerm) != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user