Make Commandgive behavior more similar to Commanditem, fix shutdown spam

This commit is contained in:
vemacs 2015-06-02 17:57:20 -06:00
parent e43ae47a78
commit 1a9954428b
2 changed files with 2 additions and 6 deletions

View File

@ -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;

View File

@ -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",