Filled Simple XP account with commands

Discussion in 'Archived: Plugin Requests' started by Plumeex, Jun 21, 2013.

  1. Indeed!
    How can I do this??
     
  2. Offline

    timtower Administrator Administrator Moderator

    Hit the report button?
     
  3. Offline

    Plumeex

    Maybe I'm just dumb but I did not find any "report" button, but at least I found the link.
    http://dev.bukkit.org/bukkit-plugins/xp-accounts/report

    I will not personally report because it would be hard for me to explain the problem in english, but I can tell the staff that I agree with you if they ask.
     
  4. Offline

    daboross

    Just in case you still need this I have fixed a few things and cleaned up the code. Here is a download for my new source, you can do whatever you want to with it. https://github.com/daboross/request-XPAccount/archive/master.zip
     
  5. Thanks!
    But how do you mean: "Just in case you still need this" ?
     
  6. Offline

    wizzinangel

  7. Offline

    Plumeex

    It looks great wizzinangel! Could you post a download link so I can test it before it's approved? :D
     
  8. Offline

    wizzinangel

  9. Just uploaded my plugin, download here.
    I renamed it to XPBank
    Commands:
    - Use '/xpb add [amount]' to add levels to your XP Bank
    - Use '/xpb take [amount]' to take levels from your XP Bank
    - Use '/xpb show' to show your XP Bank
    - Use '/xpb showother [player]' to show another player XP Bank
    - Use '/xpb help' to get help for the XPBank plugin

    Permissions:
    - xpb.use (Show, add and take from the account.)
    - xpb.others (Show other player's account.)

    Now you can test them both ;)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 2, 2016
  10. Offline

    wizzinangel

  11. Sorry, didn't see I will rename it again ;)

    Ok I will look to that, with me it worked

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 2, 2016
  12. Offline

    wizzinangel

    rob1998@ Just a few little things Rob:

    /xpb showother Jack (Note: that players is not in the config file)
    - States I don't have permission to use that command.

    /xpb add 10
    - Doesn't add to the config file at all
    - /xpb show states i have 0 levels

    /xpb take 10
    - adds 10 levels to your player. But no limit and nothing in the config file.

    Let me know if you need any help fixing/finding these issues.
     
  13. Offline

    Plumeex

    Yup rob1998@
    [​IMG]

    And the config file updates after a reload, can you fix that?
    At the moment I prefer yours because of the 'interface'.

    wizzinangel, your plugin works great, I didn't find any issue. :D

    Also, could one of you add a locale file to translate it?
     
  14. Updated: download I've fixed the problems, and I'm working on a translate file...
    I renamed it to XPStorage
    Commands:
    - Use '/xps add [amount]' to add levels to your XP Storage
    - Use '/xps take [amount]' to take levels from your XP Storage
    - Use '/xps show' to show your XP Storage
    - Use '/xps showother [player]' to show another player XP Storage
    - Use '/xps help' to get help for the XPStorage plugin

    Permissions:
    - xps.use (Show, add and take from the account.)
    - xps.others (Show other player's account.)
     
  15. Offline

    Plumeex

    Great rob1998@! Commands and permissions work perfectly.

    Just a tiny detail: if I don't have xps.others and that I type /xps showother <name>, it tells me that I don't have the perm. That's good.
    But if I type /xps showother (without name) it will tell me that I miss the username. It'd be better with the "no perm" message, right?

    I'm really glad you took the time to make this plugin. Thanks again! :D
     
  16. Offline

    wizzinangel

  17. How did you add the multiple languages?
     
  18. Offline

    wizzinangel

    Use multiple config files. Loaded depending on what the config file has. Just need the messages in the fr.yml to be translated to French.

    So all my messages come from a config file. Not static in the java itself
     
  19. Offline

    Plumeex

    wizzinangel I'm having trouble with the translation.
    I need to use these characters: à ; é ; ê so I converted fr.yml to UTF-8, but after this every /xpa command creates internal errors:
    Code:
    2013-06-26 15:01:50 [INFO] Plumeex issued server command: /xpa
    2013-06-26 15:01:50 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'xpa' in plugin XPATM v1.0
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:189)
        at org.bukkit.craftbukkit.v1_5_R3.CraftServer.dispatchCommand(CraftServer.java:546)
        at net.minecraft.server.v1_5_R3.PlayerConnection.handleCommand(PlayerConnection.java:985)
        at net.minecraft.server.v1_5_R3.PlayerConnection.chat(PlayerConnection.java:901)
        at net.minecraft.server.v1_5_R3.PlayerConnection.a(PlayerConnection.java:846)
        at net.minecraft.server.v1_5_R3.Packet3Chat.handle(Packet3Chat.java:44)
        at org.spigotmc.netty.NettyNetworkManager.b(NettyNetworkManager.java:218)
        at net.minecraft.server.v1_5_R3.PlayerConnection.d(PlayerConnection.java:115)
        at net.minecraft.server.v1_5_R3.ServerConnection.b(SourceFile:35)
        at org.spigotmc.MultiplexingServerConnection.b(MultiplexingServerConnection.java:72)
        at net.minecraft.server.v1_5_R3.MinecraftServer.r(MinecraftServer.java:583)
        at net.minecraft.server.v1_5_R3.DedicatedServer.r(DedicatedServer.java:227)
        at net.minecraft.server.v1_5_R3.MinecraftServer.q(MinecraftServer.java:472)
        at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:404)
        at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573)
    Caused by: java.lang.NullPointerException
        at com.me.bartdaniels.XPATM.onCommand(XPATM.java:149)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
        ... 15 more
    After converting it back to ANSI, it worked, but I cannot use my specials characters.

    Also, when you type /xpa <random things> you have this: [​IMG] in the chat instead of an error message.
     
  20. Offline

    wizzinangel

    Plumeex can u paste ur fr.yml for me. I'm Australian I have no idea about writing French lol!
     
  21. Offline

    Plumeex

  22. can you give me an example please?

    Can you translate mine too?
    Show Spoiler

    Code:
    //You can change the messages here, but don't delete one!
     
    ADD_FORMAT : " Added &F%s levels &2to your XP bank!";
    TAKE_FORMAT : " Took &F%s levels &2from your XP bank!";
    SHOW_FORMAT : " You have &F%s levels &2in your XP bank!";
    SHOW_OTHER_FORMAT : " %s has &F%s levels &2in his/her XP bank!";
    NO_ARGUMENT : " No argument! Please use &F/%s help &4to view valid arguments!";
    INVALID_ARGUMENT : " Invalid argument '%s'! Please use &F/%s help &4to view valid arguments!";
    NOT_NUMBER : " is not an integer! Please use a valid number!";
    USE_POSITIVE_NUMBER : " Please use a positive non-0 integer!";
    NOT_ENOUGH_LEVELS : " You don't have enough levels to store!";
    NOT_ENOUGH_LEVELS_IN_BANK : " You don't have enough levels in the bank to take!";
    NO_PERMISSION : " You do not have permission to execute";
    PLAYER_ONLY : " You must be a player to execute this command!";
    TOO_MANY_ARGUMENTS : " Too many arguments!";
    NOT_ENOUGH_ARGUMENTS_SHOWOTHER : " Not enough arguments! Please specify a player!: /xps showother [full player name]";
    NOT_ENOUGH_ARGUMENTS_ADD : " Not enough arguments! Please specify an amount!: /xps add [amount]";
    NOT_ENOUGH_ARGUMENTS_TAKE : " Not enough arguments! Please specify an amount!: /xps take [amount]";
    HELP1 : " Use '/xps add [amount]' to add levels to your XP Storage";
    HELP2 : " Use '/xps take [amount]' to take levels from your XP Storage";
    HELP3 : " Use '/xps show' to show your XP Storage";
    HELP4 : " Use '/xps showother [player]' to show another player XP Storage";
    UNKNOWN_COMMAND : " Command %s unknown to XPStorage!";


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 2, 2016
  23. Offline

    wizzinangel

    I don't seem to get the errors when I pasted the french version into my fr.yml, either of the version you put up. I logged onto the game and tested and no errors.

    I will look at another way of handling those characters
     
  24. Offline

    Plumeex

    rob1998@ Sure! :D

    Without accents (open)
    Code:
    //You can change the messages here, but don't delete one!
     
    ADD_FORMAT : " &F%s levels &2ajoutes a votre compte !";
    TAKE_FORMAT : " &F%s levels &2retires de votre compte !";
    SHOW_FORMAT : " Vous avez &F%s levels &2sur votre compte !";
    SHOW_OTHER_FORMAT : " %s a &F%s levels &2sur son compte !";
    NO_ARGUMENT : " Aucun aurgument ! Tapez &F/%s help &4pour les arguments valides !";
    INVALID_ARGUMENT : " Argument '%s' invalide ! Tapez &F/%s help &4pour les arguments valides !";
    NOT_NUMBER : " n'est pas un nombre ! Merci d'entrer un nombre valide !";
    USE_POSITIVE_NUMBER : " Merci d'utiliser un nombre positif superieur a 0 !";
    NOT_ENOUGH_LEVELS : " Vous n'avez pas assez de levels a stocker !";
    NOT_ENOUGH_LEVELS_IN_BANK : " Vous n'avez pas assez de levels sur votre compte !";
    NO_PERMISSION : " Vous n'avez pas la permission pour executer";
    PLAYER_ONLY : " Vous devez etre un joueur pour executer cette commande !";
    TOO_MANY_ARGUMENTS : " Trop d'arguments !";
    NOT_ENOUGH_ARGUMENTS_SHOWOTHER : " Pas assez d'arguments ! Specifiez un joueur ! /xps showother [pseudo entier]";
    NOT_ENOUGH_ARGUMENTS_ADD : " Pas assez d'arguments ! Specifiez un montant ! /xps add [montant]";
    NOT_ENOUGH_ARGUMENTS_TAKE : " Pas assez d'arguments ! Specifiez un montant ! /xps take [montant]";
    HELP1 : " Tapez '/xps add [montant]' pour ajouter des levels a votre compte";
    HELP2 : " Tapez '/xps take [montant]' pour retirer des levels de votre compte";
    HELP3 : " Tapez '/xps show' pour voir votre compte";
    HELP4 : " Tapez '/xps showother [pseudo]' pour voir le compte d'un joueur";
    UNKNOWN_COMMAND : " XPStorage ne connait pas la commande %s !";

    With accents (open)
    Code:
    //You can change the messages here, but don't delete one!
     
    ADD_FORMAT : " &F%s levels &2ajoutés à votre compte !";
    TAKE_FORMAT : " &F%s levels &2retirés de votre compte !";
    SHOW_FORMAT : " Vous avez &F%s levels &2sur votre compte !";
    SHOW_OTHER_FORMAT : " %s a &F%s levels &2sur son compte !";
    NO_ARGUMENT : " Aucun aurgument ! Tapez &F/%s help &4pour les arguments valides !";
    INVALID_ARGUMENT : " Argument '%s' invalide ! Tapez &F/%s help &4pour les arguments valides !";
    NOT_NUMBER : " n'est pas un nombre ! Merci d'entrer un nombre valide !";
    USE_POSITIVE_NUMBER : " Merci d'utiliser un nombre positif supérieur à 0 !";
    NOT_ENOUGH_LEVELS : " Vous n'avez pas assez de levels à stocker !";
    NOT_ENOUGH_LEVELS_IN_BANK : " Vous n'avez pas assez de levels sur votre compte !";
    NO_PERMISSION : " Vous n'avez pas la permission pour éxécuter";
    PLAYER_ONLY : " Vous devez être un joueur pour éxécuter cette commande !";
    TOO_MANY_ARGUMENTS : " Trop d'arguments !";
    NOT_ENOUGH_ARGUMENTS_SHOWOTHER : " Pas assez d'arguments ! Spécifiez un joueur ! /xps showother [pseudo entier]";
    NOT_ENOUGH_ARGUMENTS_ADD : " Pas assez d'arguments ! Spécifiez un montant ! /xps add [montant]";
    NOT_ENOUGH_ARGUMENTS_TAKE : " Pas assez d'arguments ! Spécifiez un montant ! /xps take [montant]";
    HELP1 : " Tapez '/xps add [montant]' pour ajouter des levels à votre compte";
    HELP2 : " Tapez '/xps take [montant]' pour retirer des levels de votre compte";
    HELP3 : " Tapez '/xps show' pour voir votre compte";
    HELP4 : " Tapez '/xps showother [pseudo]' pour voir le compte d'un joueur";
    UNKNOWN_COMMAND : " XPStorage ne connaît pas la commande %s !";

    I translated "XP Bank' into "compte", wich means "account".
    In French we add a space between the end of the sentence and "!" "?" ";" ":".
     
    rob1998@ likes this.
  25. Thanks
     
  26. Offline

    wizzinangel

  27. Offline

    Plumeex

    It works now wizzinangel, thanks! :D
    Oh also: I customized the PluginName but I cannot remove this colon... could you? It's not really pretty.
    [​IMG]


    And rob1998@ I'm waiting to test yours too. :)
     
  28. Offline

    wizzinangel

  29. Offline

    Plumeex

    Sweet. Thank you very much for all you did wizzinangel! :D
     
  30. Offline

    wizzinangel

    Plumeex Let me know if you need any other plugins created.
     

Share This Page