[Role-Play] CharacterCards

Discussion in 'Archived: Plugin Requests' started by kieranmclean, Oct 28, 2012.

  1. Offline


    Plugin category: [RPG]

    Suggested name: CharacterCards

    What I want:
    This is what I want.

    A plugin that allows players to customize their selfs.

    Shift Right Click this will pop up.. And when people do it to you when you set your character card it will apear When you log in it will be created! but you have to fill in the details with this info below
    I took this pic from a server could anyone make this?
    Ideas for commands:


    Ideas for permissions: No permissions.. Not needed.

    When I'd like it by: soon as you can
  2. Offline


    Where'd ya get the screenshot from? Just wondering!
  3. Offline


    kieranmclean likes this.
  4. Offline


    Yes. I have seen Role play Essentials plugin I have got the screenshot from Lord of the craft. A roleplaying server,

    The reason I have not used roleplay essentials is because i dont not like it's features. Features in the plugin are somewhat useless. Please can anyone make this.

  5. Offline



    I won't be making this for you, I'm sorry; too much on my plate at the moment.

    ... but what do you mean by
    ... and wouldn't it make more sense to use a year of birth instead of an age?
  6. Offline


    crouch + right mouse click on the player you want to get the information from.
    kieranmclean likes this.
  7. Offline


    I'm also very busy... Not sure, maybe Woobie could do it for you?
  8. Offline


    xYn Yes that is what i mean
    No, I don't want time of year I just want it /setage (Number)
    Okay, I'll wait patiently :)
  9. Offline


    I tried :'(
    1. @EventHandler
    2. public void onPlayerLogin(PlayerLoginEvent e){
    3. Player p = e.getPlayer();
    4. if(!p.hasPlayedBefore()){
    5. File data = new File(this.getDataFolder()+ File.separator + p.getName() + ".yml");
    6. FileConfiguration character = YamlConfiguration.loadConfiguration(data);
    7. character.set("Name: " + p.getName(), character);
    8. character.set("Gender: Undefined", character);
    9. character.set("Age: 1337", character);
    10. character.set("Race: Human", character);
    11. character.set("Description: The default description", character);
    13. try
    14. {
    15. character.set("Name: " + p.getName(), character);
    16. character.set("Gender: Undefined", character);
    17. character.set("Age: 1337", character);
    18. character.set("Race: Human", character);
    19. character.set("Description: The default description", character);
    20. character.save(data);
    21. }
    22. catch (IOException event)
    23. {
    24. event.printStackTrace();
    25. }
    27. } else {
    28. p.sendMessage(ChatColor.GREEN+ "Welcome back, " + p.getName()); //ignore this, I was testing
    29. }
    30. }
    32. public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
    33. Player s = (Player) sender;
    34. if(cmd.getName().equalsIgnoreCase("setname")){
    35. if(args.length == 0){
    36. s.sendMessage(ChatColor.GREEN+ "/setname <name>");
    38. } else if(args.length == 1){
    39. FileConfiguration character = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "data"));
    40. character.set("Name: " + args[0], character);
    42. }
    43. }
    44. }
    45. }
  10. Offline


    It didn't work? D; Woobie /Cry

    Can anyone do this? I want this before 1.4 Recomended build comes out, I know it's a long way but i would like to fix some stuff with the written code aswell.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 29, 2016
  11. Offline


    I can do it later, im at school right now.
    kieranmclean likes this.
  12. Offline


    Hehe same ;) Thanks! Much appreciated.
  13. Offline


    Things going to do: (I'll update this post as I get things done)
    -Commands in place
    • CharacterCards.view/make/remove
    -Config with a few settings
    -Language file (so someone can translate it if needed)
    -BukkitDev Page

    Edit: Red means I wont be doing those for the first build, but will most likely be updated if needed in the future.

    Edit 2: Green means it is being worked on (testing, coding, etc)

    Edt 3: Not going to finish today, but it will be done soon!
    kieranmclean likes this.
  14. Offline


    I want CharacterCards to have it's own file.
    And yes. Shift-Right click the player shows their character card

    And okay, Can't wait to see when its done! ;)
    And after your done with creating the plugin could you send me the code maybe?
  15. Offline


  16. Offline



    Do you just want {Name, Gender, Age, Race, Description} - or do you want them changed up?

    In far future, since it will take more time that I don't have atm I will make it so the config can add/remove any section. (So make your own fields) - but for now I need to hardcode them.

    Check above at the post I said I would update!
    kieranmclean likes this.
  17. Offline


    Yea, I just want [Name, Gender, Age, Race, Description] ;)
  18. Offline


    Or go advanced with Maps as charachter cards.

    Levels could be nice like Level 18 ( 0,3 more damage, o,5 more armor, more fire damage 0,7 ) random talents

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 29, 2016
  19. Offline


    Or you could use McMMO??
  20. Offline


    Indeed, I'm going to use Skillz but I'll be re customizing it.
    I dislike McMMO

    ALSO, Sorry for the lates.. /resetchar
    I want ops to have this too so they can reset their players

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 29, 2016
  21. Offline


    Yea going to have a remove command (which I would assume is the same as reset)
    kieranmclean likes this.
  22. Offline


    Correct ;)
  23. Offline


    Sorry been taking me so long to do this, bogged up on school work. I will definitely get it done before Sunday. Hopefully before statuary if I don't do much Friday night.

    -Sorry for how long this has been taking!
    kieranmclean likes this.
  24. Offline


    Its okay! Take your time man ;)
  25. Offline

    Howard Stark

    So, is anyone making this, or can I give this a go. If it's too late, than oh well...
  26. Offline


    Uh, did you read the thread?
    NikostratosX and kieranmclean like this.
  27. Offline


    I think I am done, try it out, there is some important info below to help you get started. Right now nothing in the config, but I will make this plugin a bit more complex as I go along.

    Edit: I'll be making a bukkit dev page sometime later for this.



    /charactercards = /cc
    /cc help : shows help with basic commands and desc (p.help)
    /cc fields : displays currently available fields that can be used in the below commands (p.make)
    /cc : Displays your CharacterCard (p.view)
    /cc view [player] : Displays another player's CharacterCard (p.view)
    /cc [Field] [Input] : Sets your CC's field with input (p.make)
    Ex. /cc name RingOfStorms
    //cc remove [player] : removes a players CharacterCard (p.remove)

    Shift + Right-click players to view their CC (p.view)
    chakyl, kieranmclean and Tireus like this.
  28. Offline


    2 problems ill post (http://i1158.photobucket.com/albums/p601/Trielkin/2012-11-03_093728.png) That is use of /cc shows more than one charactercard like it shows what it looks like when shift rightclick and player command..

    Also console error()

    Unexpected exception while parsing console command "cc" (<----------)
    org.bukkit.command.CommandException: Unhandled exception executing command 'cc' in plugin CharacterCards v1.3
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:185)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:504)
    at org.bukkit.craftbukkit.CraftServer.dispatchServerCommand(CraftServer.java:496)
    at net.minecraft.server.DedicatedServer.al(DedicatedServer.java:251)
    at net.minecraft.server.DedicatedServer.r(DedicatedServer.java:216)
    at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:486)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:419)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:818)
    Caused by: java.lang.ClassCastException: org.bukkit.craftbukkit.command.ColouredConsoleSender cannot be cast to org.bukkit.entity.Player
    at com.RingOfStorms.cc.plCmdExe.onCommand(plCmdExe.java:17)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
    ... 8 more

    I'm think you will need for the console command that one trick.. where it says when you try the command in console it says only for online players.. I have seen it somewhere

    EDIT1: Forgot to mention this but can you add where you can only set your race (Dwarf, Elf, Human, Orc.. ) I can add more in source,
    Also only set age to (HIGHEST) 120

    EDIT2: Other than that looks fine! (Mind giving me the source, I want to take a look at this.)
  29. Offline


    Any other races? Since I am hard coding them atm, I need all the ones you want.

    Sorry but I won't give you the source right now, I'm not a fan of giving it out. You could always decompile it if your desperate, but I do frown upon that quite a bit.

    And as for your first error with the picture. I could not re-create that, are you sure you didn't just lag or something and put the command in twice?

    Changes for next download:
    - Age limit to 1-120 (will be configurable later)
    - Race limit to Dwarf, Elf, Human, Orc
    - Name limit to a max character size of 30
    - Description limit is 40 in size
    - Gender is limited to male, female, or other

    So yea any other races so I can add those in?

    Changes for future:
    - Few config settings to turn the limits on/off.

    After BukkitDev Page is made:
    - Many more complex things like custom card fields and such
    kieranmclean likes this.
  30. Offline


    My final races: Dwarf, Elf, Human, Orc, Rakashi ( I think thats about it.)

    Rakashi is cat people xD

    for the second error ill check it out next download :3

Share This Page