mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-25 18:48:24 +01:00
Make Commandgive behavior more similar to Commanditem, fix shutdown spam
This commit is contained in:
parent
e43ae47a78
commit
1a9954428b
@ -50,12 +50,8 @@ public class Commandgive extends EssentialsCommand {
|
||||
throw new NotEnoughArgumentsException();
|
||||
}
|
||||
|
||||
MetaItemStack metaStack = new MetaItemStack(stack);
|
||||
if (!metaStack.canSpawn(ess)) {
|
||||
throw new Exception(tl("unableToSpawnItem", itemname));
|
||||
}
|
||||
|
||||
if (args.length > 3) {
|
||||
MetaItemStack metaStack = new MetaItemStack(stack);
|
||||
boolean allowUnsafe = ess.getSettings().allowUnsafeEnchantments();
|
||||
if (allowUnsafe && sender.isPlayer() && !ess.getUser(sender.getPlayer()).isAuthorized("essentials.enchantments.allowunsafe")) {
|
||||
allowUnsafe = false;
|
||||
|
@ -96,7 +96,7 @@ public class PermissionsHandler implements IPermissionsHandler {
|
||||
public void checkPermissions() {
|
||||
final PluginManager pluginManager = ess.getServer().getPluginManager();
|
||||
final Plugin vaultAPI = pluginManager.getPlugin("Vault");
|
||||
if (vaultAPI != null && vaultAPI.isEnabled()) {
|
||||
if (vaultAPI != null && vaultAPI.isEnabled() && !(handler instanceof AbstractVaultHandler)) {
|
||||
AbstractVaultHandler vaultHandler;
|
||||
String enabledPermsPlugin = "";
|
||||
List<String> specialCasePlugins = Arrays.asList("PermissionsEx", "GroupManager",
|
||||
|
Loading…
Reference in New Issue
Block a user