SOLVED!Simple programming mistake of not actually making sure the metadata got set to the player. I am new to meta data but have come by a very strange problem in which to me makes completely no sense. I have a meta data assigned as "cash" and "mobkills" as you can see. Code:java //Player Statisticspublic void registerPlayerStats(Player player){player.setMetadata("cash", new FixedMetadataValue(plugin, 200));player.setMetadata("mobkills", new FixedMetadataValue(plugin, 0));}public void unRegisterPlayerStats(Player player){ }public Object getPlayerKills(Player player){return getMetadata(player, "mobkills");}public Object getPlayerCash(Player player){return getMetadata(player, "cash");} Here is the method being used to get meta data for the kills and cash getters: Code:java //Metadatapublic Object getMetadata(Player player, String key){List<MetadataValue> values = player.getMetadata(key);for(MetadataValue val : values){if(val.getOwningPlugin().getDescription().getName().equals(plugin.getDescription().getName())){return val.value();}}return player.getMetadata(key);} There are two commands, one is /killstats in which displays the personal players mob kills from the meta data. The other is /cash in which displays their cash from the meta data. The /cash outputs as desired and correctly, but the /killstats outputs as [WWZ] Kills : [] while /cash outputs as [WWZ] $Cash$ : $250 Code:java public boolean onCommand(CommandSender sender, Command cmd, String alias, String[] args) {//CASHif(cmd.getName().equalsIgnoreCase("cash")){if(sender instanceof Player){ Player player = (Player)sender;player.sendMessage(chatPrefix + ChatColor.GREEN+" $Cash$ : "+ChatColor.RED+inGameVariables.getPlayerCash(player)); }else{sender.sendMessage(chatPrefix + ChatColor.RED+"You must be a player to use this command.");}return true;} //KILL_STATS (personal)if(cmd.getName().equalsIgnoreCase("killstats")){if(sender instanceof Player){ Player player = (Player)sender;player.sendMessage(chatPrefix + ChatColor.GREEN+" Kills : "+ChatColor.RED+inGameVariables.getPlayerKills(player)); }else{sender.sendMessage(chatPrefix + ChatColor.RED+"You must be a player to use this command.");}return true;}return false;} Any idea why? Thanks for the help!
spy85 Did you try killing a mob or a player? I'm sure it wont say anything unless you've actually killed something first.
Currently the way it is setup, is it is only a integer value of 0 that should display when /killstats is sent. It is in no way linked with the actual kills yet.