Solved Not permitted to use... Please help

Discussion in 'Plugin Development' started by ab9876, Apr 7, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    ab9876

    You guys have probably seen my other posts for recent problems. This is probably my 8th problem. Lolz. Anyways, I got the plugin to work :D. One problem - I have something in the code that prevents players from using the default class. Wonderful. It says my default permission-message message that I set. I am planning on using factions for making warzones and letting players build, and I might have to resort to coding my own permissions plugin. When a non-op player tries to hit or right click with anything, it says, "You are not permitted to use DIAMOND_SWORD" or something like that, and MUSHROOM_SOUP for mushroom soup and stuff. In case this helps, here is the console :
    Code:
    >Andrews-MacBook-Pro:test aman560900$ java -Xms1024M -Xmx1024M -jar craftbukkit.ar
    229 recipes
    27 achievements
    11:22:20 [INFO] Starting minecraft server version 1.5.1
    11:22:20 [INFO] Loading properties
    11:22:20 [INFO] Default game type: SURVIVAL
    11:22:20 [INFO] Generating keypair
    11:22:21 [INFO] Starting Minecraft server on *:25566
    11:22:21 [INFO] This server is running CraftBukkit version git-Bukkit-1.5.1-R0.1-7-ge80e64d-b2743jnks (MC: 1.5.1) (Implementing API version 1.5.1-R0.2-SNAPSHOT)
    11:22:21 [INFO] [WorldEdit] Loading WorldEdit v5.5.5
    11:22:21 [INFO] [WorldGuard] Loading WorldGuard v5.7.3
    11:22:21 [INFO] [KitPvP] Loading KitPvP v1.5.1
    11:22:21 [INFO] [Essentials] Loading Essentials v2.10.1
    11:22:21 [INFO] [EssentialsChat] Loading EssentialsChat v2.10.1
    11:22:21 [INFO] [EssentialsProtect] Loading EssentialsProtect v2.10.1
    11:22:21 [INFO] MLog clients using java 1.4+ standard logging.
    11:22:21 [INFO] [EssentialsSpawn] Loading EssentialsSpawn v2.10.1
    11:22:21 [INFO] [EssentialsAntiBuild] Loading EssentialsAntiBuild v2.10.1
    11:22:21 [INFO] Preparing level "world"
    11:22:21 [INFO] Preparing start region for level 0 (Seed: -452035062202556798)
    11:22:21 [INFO] ----- Bukkit Auto Updater -----
    11:22:21 [INFO] It appears that you're running a Development Build, when you've specified in bukkit.yml that you prefer to run Recommended Builds.
    11:22:21 [INFO] If you would like to be kept informed about new Development Build releases, it is recommended that you change 'preferred-channel' in your bukkit.yml to 'dev'.
    11:22:21 [INFO] With that set, you will be told whenever a new version is available for download, so that you can always keep up to date and secure with the latest fixes.
    11:22:21 [INFO] If you would like to disable this warning, simply set 'suggest-channels' to false in bukkit.yml.
    11:22:21 [INFO] ----- ------------------- -----
    11:22:22 [INFO] Preparing start region for level 1 (Seed: -4040314593788830807)
    11:22:22 [INFO] Preparing spawn area: 49%
    11:22:22 [INFO] Preparing start region for level 2 (Seed: -4040314593788830807)
    11:22:23 [INFO] [WorldEdit] Enabling WorldEdit v5.5.5
    11:22:23 [INFO] WEPIF: Using the Bukkit Permissions API.
    11:22:23 [INFO] [WorldGuard] Enabling WorldGuard v5.7.3
    11:22:23 [INFO] [WorldGuard] (world) TNT ignition is PERMITTED.
    11:22:23 [INFO] [WorldGuard] (world) Lighters are PERMITTED.
    11:22:23 [INFO] [WorldGuard] (world) Lava fire is blocked.
    11:22:23 [INFO] [WorldGuard] (world) Fire spread is UNRESTRICTED.
    11:22:23 [INFO] [WorldGuard] Loaded configuration for world 'world'
    11:22:23 [INFO] [WorldGuard] (world_nether) TNT ignition is PERMITTED.
    11:22:23 [INFO] [WorldGuard] (world_nether) Lighters are PERMITTED.
    11:22:23 [INFO] [WorldGuard] (world_nether) Lava fire is blocked.
    11:22:23 [INFO] [WorldGuard] (world_nether) Fire spread is UNRESTRICTED.
    11:22:23 [INFO] [WorldGuard] Loaded configuration for world 'world_nether'
    11:22:23 [INFO] [WorldGuard] (world_the_end) TNT ignition is PERMITTED.
    11:22:23 [INFO] [WorldGuard] (world_the_end) Lighters are PERMITTED.
    11:22:23 [INFO] [WorldGuard] (world_the_end) Lava fire is blocked.
    11:22:23 [INFO] [WorldGuard] (world_the_end) Fire spread is UNRESTRICTED.
    11:22:23 [INFO] [WorldGuard] Loaded configuration for world 'world_the_end'
    11:22:23 [INFO] [WorldGuard] 0 regions loaded for 'world'
    11:22:23 [INFO] [WorldGuard] 0 regions loaded for 'world_nether'
    11:22:23 [INFO] [WorldGuard] 0 regions loaded for 'world_the_end'
    11:22:23 [INFO] [KitPvP] Enabling KitPvP v1.5.1
    11:22:23 [INFO] KitPvP by ab9876 is working!
    11:22:23 [INFO] [Essentials] Enabling Essentials v2.10.1
    11:22:23 [INFO] Creating config from template: /Users/aman560900/Desktop/test/plugins/Essentials/config.yml
    11:22:23 [INFO] Creating empty config: /Users/aman560900/Desktop/test/plugins/Essentials/upgrades-done.yml
    11:22:23 [INFO] Creating config from template: /Users/aman560900/Desktop/test/plugins/Essentials/worth.yml
    11:22:24 [INFO] [Essentials] This plugin collects minimal statistic data and sends it to http://metrics.essentials3.net.
    11:22:24 [INFO] [Essentials] You can opt out by running /essentials opt-out
    11:22:24 [INFO] [Essentials] This will start 5 minutes after the first admin/op joins.
    11:22:24 [INFO] Essentials: Using config file enhanced permissions.
    11:22:24 [INFO] Permissions listed in as player-commands will be given to all users.
    11:22:24 [INFO] [EssentialsChat] Enabling EssentialsChat v2.10.1
    11:22:24 [INFO] [EssentialsProtect] Enabling EssentialsProtect v2.10.1
    11:22:24 [INFO] Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10]
    11:22:24 [INFO] [EssentialsSpawn] Enabling EssentialsSpawn v2.10.1
    11:22:24 [INFO] [EssentialsAntiBuild] Enabling EssentialsAntiBuild v2.10.1
    11:22:24 [INFO] Server permissions file permissions.yml is empty, ignoring it
    11:22:24 [INFO] Done (3.251s)! For help, type "help" or "?"
    11:22:35 [INFO] nelo12[/192.168.1.128:55004] logged in with entity id 81 at ([world] -313.07777706402715, 53.0, 290.283459987761)
    11:22:35 [INFO] Creating empty config: /Users/aman560900/Desktop/test/plugins/Essentials/userdata/nelo12.yml
    11:22:35 [WARNING] File motd.txt does not exist. Creating one for you.
    11:22:44 [INFO] nelo12 issued server command: /start
    >reload all
    11:24:48 [INFO] [EssentialsAntiBuild] Disabling EssentialsAntiBuild v2.10.1
    11:24:48 [INFO] [EssentialsSpawn] Disabling EssentialsSpawn v2.10.1
    11:24:48 [INFO] [EssentialsProtect] Disabling EssentialsProtect v2.10.1
    11:24:49 [INFO] [EssentialsChat] Disabling EssentialsChat v2.10.1
    11:24:49 [INFO] [Essentials] Disabling Essentials v2.10.1
    11:24:49 [INFO] [KitPvP] Disabling KitPvP v1.5.1
    11:24:49 [INFO] [WorldGuard] Disabling WorldGuard v5.7.3
    11:24:49 [INFO] [WorldEdit] Disabling WorldEdit v5.5.5
    11:24:49 [INFO] 229 recipes
    11:24:50 [INFO] [GroupManager] Loading GroupManager v2.0 (2.9.6) (Phoenix)
    11:24:50 [INFO] [WorldEdit] Loading WorldEdit v5.5.5
    11:24:50 [INFO] [WorldGuard] Loading WorldGuard v5.7.3
    11:24:50 [INFO] [Permissions] Loading Permissions v3.1.6
    11:24:50 [INFO] [KitPvP] Loading KitPvP v1.5.1
    11:24:50 [INFO] [Essentials] Loading Essentials v2.10.1
    11:24:50 [INFO] [EssentialsChat] Loading EssentialsChat v2.10.1
    11:24:50 [INFO] [EssentialsProtect] Loading EssentialsProtect v2.10.1
    11:24:50 [INFO] MLog clients using java 1.4+ standard logging.
    11:24:50 [INFO] [EssentialsSpawn] Loading EssentialsSpawn v2.10.1
    11:24:50 [INFO] [EssentialsAntiBuild] Loading EssentialsAntiBuild v2.10.1
    11:24:50 [INFO] [GroupManager] Enabling GroupManager v2.0 (2.9.6) (Phoenix)
    11:24:50 [INFO] GroupManager version 2.0 (2.9.6) (Phoenix) is enabled!
    11:24:50 [INFO] [WorldEdit] Enabling WorldEdit v5.5.5
    11:24:50 [INFO] WEPIF: GroupManager detected! Using GroupManager for permissions.
    11:24:50 [INFO] [WorldGuard] Enabling WorldGuard v5.7.3
    11:24:50 [INFO] [WorldGuard] (world) TNT ignition is PERMITTED.
    11:24:50 [INFO] [WorldGuard] (world) Lighters are PERMITTED.
    11:24:50 [INFO] [WorldGuard] (world) Lava fire is blocked.
    11:24:50 [INFO] [WorldGuard] (world) Fire spread is UNRESTRICTED.
    11:24:50 [INFO] [WorldGuard] Loaded configuration for world 'world'
    11:24:50 [INFO] [WorldGuard] (world_nether) TNT ignition is PERMITTED.
    11:24:50 [INFO] [WorldGuard] (world_nether) Lighters are PERMITTED.
    11:24:50 [INFO] [WorldGuard] (world_nether) Lava fire is blocked.
    11:24:50 [INFO] [WorldGuard] (world_nether) Fire spread is UNRESTRICTED.
    11:24:50 [INFO] [WorldGuard] Loaded configuration for world 'world_nether'
    11:24:50 [INFO] [WorldGuard] (world_the_end) TNT ignition is PERMITTED.
    11:24:50 [INFO] [WorldGuard] (world_the_end) Lighters are PERMITTED.
    11:24:50 [INFO] [WorldGuard] (world_the_end) Lava fire is blocked.
    11:24:50 [INFO] [WorldGuard] (world_the_end) Fire spread is UNRESTRICTED.
    11:24:50 [INFO] [WorldGuard] Loaded configuration for world 'world_the_end'
    11:24:50 [INFO] [WorldGuard] 0 regions loaded for 'world'
    11:24:50 [INFO] [WorldGuard] 0 regions loaded for 'world_nether'
    11:24:50 [INFO] [WorldGuard] 0 regions loaded for 'world_the_end'
    11:24:50 [INFO] [Permissions] Enabling Permissions v3.1.6
    11:24:50 [INFO] Fake Permissions version 3.1.6 is enabled!
    11:24:50 [INFO] WEPIF: GroupManager detected! Using GroupManager for permissions.
    11:24:50 [INFO] [KitPvP] Enabling KitPvP v1.5.1
    11:24:50 [INFO] KitPvP by ab9876 is working!
    11:24:50 [INFO] [Essentials] Enabling Essentials v2.10.1
    11:24:50 [INFO] Essentials: Using GroupManager based permissions.
    11:24:50 [INFO] [EssentialsChat] Enabling EssentialsChat v2.10.1
    11:24:50 [INFO] [EssentialsProtect] Enabling EssentialsProtect v2.10.1
    11:24:50 [INFO] Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10]
    11:24:51 [INFO] [EssentialsSpawn] Enabling EssentialsSpawn v2.10.1
    11:24:51 [INFO] [EssentialsAntiBuild] Enabling EssentialsAntiBuild v2.10.1
    11:24:51 [INFO] Server permissions file permissions.yml is empty, ignoring it
    11:24:51 [INFO] CONSOLE: Reload complete.
    11:24:51 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
    11:24:53 [INFO] nelo12 issued server command: /start
    >reload all
    11:25:39 [INFO] [EssentialsAntiBuild] Disabling EssentialsAntiBuild v2.10.1
    11:25:39 [INFO] [EssentialsSpawn] Disabling EssentialsSpawn v2.10.1
    11:25:39 [INFO] [EssentialsProtect] Disabling EssentialsProtect v2.10.1
    >gm
    11:25:40 [INFO] [EssentialsChat] Disabling EssentialsChat v2.10.1
    11:25:40 [INFO] [Essentials] Disabling Essentials v2.10.1
    11:25:40 [INFO] [KitPvP] Disabling KitPvP v1.5.1
    11:25:40 [INFO] [Permissions] Disabling Permissions v3.1.6
    11:25:40 [INFO] WEPIF: GroupManager detected! Using GroupManager for permissions.
    11:25:40 [INFO] Fake Permissions version 3.1.6 is disabled!
    11:25:40 [INFO] [WorldGuard] Disabling WorldGuard v5.7.3
    11:25:40 [INFO] [WorldEdit] Disabling WorldEdit v5.5.5
    11:25:40 [INFO] [GroupManager] Disabling GroupManager v2.0 (2.9.6) (Phoenix)
    11:25:40 [INFO] GroupManager version 2.0 (2.9.6) (Phoenix) is disabled!
    11:25:40 [INFO] 229 recipes
    11:25:40 [INFO] [GroupManager] Loading GroupManager v2.0 (2.9.6) (Phoenix)
    11:25:40 [INFO] [WorldEdit] Loading WorldEdit v5.5.5
    11:25:40 [INFO] [WorldGuard] Loading WorldGuard v5.7.3
    11:25:40 [INFO] [Permissions] Loading Permissions v3.1.6
    11:25:40 [INFO] [KitPvP] Loading KitPvP v1.5.1
    11:25:40 [INFO] [Essentials] Loading Essentials v2.10.1
    11:25:40 [INFO] [EssentialsChat] Loading EssentialsChat v2.10.1
    11:25:40 [INFO] [EssentialsProtect] Loading EssentialsProtect v2.10.1
    11:25:40 [INFO] MLog clients using java 1.4+ standard logging.
    11:25:40 [INFO] [EssentialsSpawn] Loading EssentialsSpawn v2.10.1
    11:25:40 [INFO] [EssentialsAntiBuild] Loading EssentialsAntiBuild v2.10.1
    11:25:40 [INFO] [GroupManager] Enabling GroupManager v2.0 (2.9.6) (Phoenix)
    11:25:40 [INFO] GroupManager version 2.0 (2.9.6) (Phoenix) is enabled!
    11:25:40 [INFO] [WorldEdit] Enabling WorldEdit v5.5.5
    11:25:40 [INFO] WEPIF: GroupManager detected! Using GroupManager for permissions.
    11:25:40 [INFO] [WorldGuard] Enabling WorldGuard v5.7.3
    11:25:40 [INFO] [WorldGuard] (world) TNT ignition is PERMITTED.
    11:25:40 [INFO] [WorldGuard] (world) Lighters are PERMITTED.
    11:25:40 [INFO] [WorldGuard] (world) Lava fire is blocked.
    11:25:40 [INFO] [WorldGuard] (world) Fire spread is UNRESTRICTED.
    11:25:40 [INFO] [WorldGuard] Loaded configuration for world 'world'
    11:25:40 [INFO] [WorldGuard] (world_nether) TNT ignition is PERMITTED.
    11:25:40 [INFO] [WorldGuard] (world_nether) Lighters are PERMITTED.
    11:25:40 [INFO] [WorldGuard] (world_nether) Lava fire is blocked.
    11:25:40 [INFO] [WorldGuard] (world_nether) Fire spread is UNRESTRICTED.
    11:25:40 [INFO] [WorldGuard] Loaded configuration for world 'world_nether'
    11:25:40 [INFO] [WorldGuard] (world_the_end) TNT ignition is PERMITTED.
    11:25:40 [INFO] [WorldGuard] (world_the_end) Lighters are PERMITTED.
    11:25:40 [INFO] [WorldGuard] (world_the_end) Lava fire is blocked.
    11:25:40 [INFO] [WorldGuard] (world_the_end) Fire spread is UNRESTRICTED.
    11:25:40 [INFO] [WorldGuard] Loaded configuration for world 'world_the_end'
    11:25:40 [INFO] [WorldGuard] 0 regions loaded for 'world'
    11:25:40 [INFO] [WorldGuard] 0 regions loaded for 'world_nether'
    11:25:40 [INFO] [WorldGuard] 0 regions loaded for 'world_the_end'
    11:25:40 [INFO] [Permissions] Enabling Permissions v3.1.6
    11:25:40 [INFO] Fake Permissions version 3.1.6 is enabled!
    11:25:40 [INFO] WEPIF: GroupManager detected! Using GroupManager for permissions.
    11:25:40 [INFO] [KitPvP] Enabling KitPvP v1.5.1
    11:25:40 [INFO] KitPvP by ab9876 is working!
    11:25:40 [INFO] [Essentials] Enabling Essentials v2.10.1
    11:25:40 [INFO] Essentials: Using GroupManager based permissions.
    11:25:40 [INFO] [EssentialsChat] Enabling EssentialsChat v2.10.1
    11:25:40 [INFO] [EssentialsProtect] Enabling EssentialsProtect v2.10.1
    11:25:40 [INFO] Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10]
    11:25:40 [INFO] [EssentialsSpawn] Enabling EssentialsSpawn v2.10.1
    11:25:40 [INFO] [EssentialsAntiBuild] Enabling EssentialsAntiBuild v2.10.1
    11:25:40 [INFO] Server permissions file permissions.yml is empty, ignoring it
    11:25:40 [INFO] CONSOLE: Reload complete.
    11:25:40 [INFO] Change player gamemode.
    11:25:40 [INFO] /gm <survival|creative|adventure> [player]
    >gm
    11:25:42 [INFO] Change player gamemode.
    11:25:42 [INFO] /gm <survival|creative|adventure> [player]
    11:26:04 [INFO] /127.0.0.1:55447 lost connection
    11:26:07 [INFO] ab9876[/127.0.0.1:55455] logged in with entity id 98 at ([world] -251.73655140743946, 53.0, 207.6798225197153)
    11:26:07 [INFO] Creating empty config: /Users/aman560900/Desktop/test/plugins/Essentials/userdata/ab9876.yml
    11:26:09 [INFO] ab9876 issued server command: /start
    11:26:11 [INFO] <ab9876> ho
    11:26:13 [INFO] <ab9876> hi
    11:26:19 [INFO] ab9876 issued server command: /deop ab9876
    11:26:19 [INFO] ab9876: De-opped ab9876
    11:26:21 [INFO] <ab9876> hi
    11:26:25 [INFO] <ab9876> yo sup
    11:26:27 [INFO] ab9876 issued server command: /start
    >op nelo12
    11:31:36 [INFO] CONSOLE: Opped nelo12
    11:33:20 [INFO] nelo12 issued server command: /gm 1
    11:33:58 [INFO] [WorldEdit] Using inbuilt NmsBlock for this version.
    11:34:32 [INFO] nelo12 issued server command: //set dirt
    >
    
    Here is my config.yml for GroupManager:
    Code:
    # Group inheritance
    #
    # Any inherited groups prefixed with a g: are global groups
    # and are inherited from the GlobalGroups.yml.
    #
    # Groups without the g: prefix are groups local to this world
    # and are defined in the this groups.yml file.
    #
    # Local group inheritances define your promotion tree when using 'manpromote/mandemote'
     
    groups:
      Default:
        default: true
        permissions:
        - kitpvp.df
        inheritance:
        - g:groupmanager_default
        - g:bukkit_default
        - g:essentials_default
        - g:towny_default
        info:
          prefix: '&e'
          build: true
          suffix: ''
      Builder:
        default: false
        permissions: []
        inheritance:
        - default
        - g:essentials_builder
        - g:towny_builder
        info:
          prefix: '&2'
          build: true
          suffix: ''
      Moderator:
        default: false
        permissions: []
        inheritance:
        - builder
        - g:groupmanager_moderator
        - g:bukkit_moderator
        - g:essentials_moderator
        - g:towny_moderator
        - g:vanish_moderator
        info:
          prefix: '&5'
          build: true
          suffix: ''
      Admin:
        default: false
        permissions: []
        inheritance:
        - moderator
        - g:groupmanager_admin
        - g:bukkit_admin
        - g:essentials_admin
        - g:towny_admin
        - g:vanish_admin
        info:
          prefix: '&c'
          build: true
          suffix: ''
      Owner:
        default: false
        permissions:
        - '*'
        - -vanish.*
        inheritance:
        - admin
        info:
          prefix: '&4'
          build: true
          suffix: ''
    
    NOTE: I got the permission working to do /start :D but you can't hit or do anything still. Still says, "You are not permitted to use DIAMOND_SWORD" and if I try to drop anything, it says, "You are not permitted to drop MUSHROOM_SOUP" and things like that. I am probably going to use factions for the war zone and safe zone and giving permission to break. It is most likely a permission that I need to put in the groups.yml. I just can't figure out what to add. Here is the plugin.yml:
    Code:
    name: KitPvP
    main: com.vpvp.ab9876.kitpvp.kitpvp
    author: ab9876
    version: 1.5.1
    description: This plugin gives the player the command to get the kit for pvp.
    commands:
    start:
      description: Gives default class.
      usage: /start
      permission: kitpvp.df
      permission-message: Sorry, but you do not own this kit. If you believe this is an error, contact the owner of the server, or some administrative figure. Thank you.
    permissions:
    kitpvp.*:
      description: Gives access to all of the kitpvp commands.
      children:
      kitpvp.df: true
    kitpvp.df:
      description: Gives a diamond sword, iron armor, soup, and a Strength potion.
      default: true
    and here is the code itself:
    Code:
    package com.vpvp.ab9876.kitpvp;
     
    import org.bukkit.Material;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.inventory.ItemStack;
    import org.bukkit.plugin.java.JavaPlugin;
    import org.bukkit.potion.PotionEffect;
    import org.bukkit.potion.PotionEffectType;
     
    public class kitpvp extends JavaPlugin{
     
    @Override
    public void onEnable() {
    System.out.print("KitPvP by ab9876 is working!");
    }
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
    if(cmd.getName().equalsIgnoreCase("Start")) {
    Player player = (Player) sender;
    if(player.hasPermission("kitpvp.df")) {
    player.getInventory().clear();
    player.getInventory().addItem(new ItemStack(Material.DIAMOND_SWORD));
    player.getInventory().setHelmet(new ItemStack(Material.DIAMOND_HELMET));
    player.getInventory().setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));
    player.getInventory().setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS));
    player.getInventory().setBoots(new ItemStack(Material.DIAMOND_BOOTS));
    player.getInventory().addItem(new ItemStack(Material.MUSHROOM_SOUP));
    player.getInventory().addItem(new ItemStack(Material.MUSHROOM_SOUP));
    player.getInventory().addItem(new ItemStack(Material.MUSHROOM_SOUP));
    player.getInventory().addItem(new ItemStack(Material.MUSHROOM_SOUP));
    player.getInventory().addItem(new ItemStack(Material.MUSHROOM_SOUP));
    player.getInventory().addItem(new ItemStack(Material.MUSHROOM_SOUP));
    player.getInventory().addItem(new ItemStack(Material.MUSHROOM_SOUP));
    player.getInventory().addItem(new ItemStack(Material.MUSHROOM_SOUP));
    player.getInventory().addItem(new ItemStack(Material.MUSHROOM_SOUP));
    player.getInventory().addItem(new ItemStack(Material.MUSHROOM_SOUP));
    player.getInventory().addItem(new ItemStack(Material.MUSHROOM_SOUP));
    player.getInventory().addItem(new ItemStack(Material.MUSHROOM_SOUP));
    player.getInventory().addItem(new ItemStack(Material.MUSHROOM_SOUP));
    player.getInventory().addItem(new ItemStack(Material.MUSHROOM_SOUP));
    player.getInventory().addItem(new ItemStack(Material.MUSHROOM_SOUP));
    player.getInventory().addItem(new ItemStack(Material.MUSHROOM_SOUP));
    player.getInventory().addItem(new ItemStack(Material.MUSHROOM_SOUP));
    player.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 18000, 1));
    returntrue;
    }
    }
    else if(!(sender instanceof Player)) {
    sender.sendMessage("Sorry, but only players in the game can use this command.");
    returntrue;
    } else {
    Player player = (Player) sender;
    player.sendMessage("Sorry, but you do not have access to this command.");
    returntrue;
    }
    returnfalse;
     
     
     
    }
     
    }
    Thanks. Any help would be super greatly appreciated. Also, any recommendations for a plugin that keeps hunger at the maximum amount for no regen, and a plugin that lets the soup give 3 1/2 hearts? I have InstaSoup already. Anything that I gotta make? Thanks guys.
     
  2. Offline

    AeroUK

    I think it may have something to do with the groups you're making the permissions inherit from. Try looking into the globalgroups.yml file and change/remove some permissions which may affect this.

    As for your hunger problem, you would have to add code like this: (spoonfeeding ftw)
    Code:java
    1. @EventHandler
    2. public void onHungerChange(FoodLevelChangeEvent event) {
    3.  
    4. Player player = (Player) event.getEntity();
    5. player.setFoodLevel(20);
    6.  
    7. }

    For the soup plugin, it seems you're all sorted. If you want an alternative made by yours truly, here's my EasySoup plugin! - http://dev.bukkit.org/server-mods/easysoup/
     
Thread Status:
Not open for further replies.

Share This Page