Solved Power Stones

Discussion in 'Plugin Help/Development/Requests' started by PhillyCheezsteak, Mar 15, 2015.

Thread Status:
Not open for further replies.
  1. Plugin category: Mechanics

    Suggested name: Power Stones

    What I want:
    Nether Stars = Powerstones
    All power stones will be auto placed in slot 8 (last slot in the hotbar)
    Players have an individual max power stone count.
    Players can increase their individual max power stone count with /powerstone max (new maximum number)
    If a player uses /powerstone max 20 and then tries to use /powerstone max 10, it will not work (no message)

    Ideas for commands:
    /powerstone max (amount) increases the maximum amount of power stones you can hold/carry

    /powerstone restore (amount) gives player power stones based on the amount. IF a player can only carry 5 power stones and uses the command /powerstone restore 30, they will only be given 5 power stones

    /powerstone remove (amount) remove power stones based on the amount.

    /powerstone reset (removes all power stones and removes the maximum amount of power stones for the player)

    Ideas for permissions: powerstone.commands (permission to use the commands)

    When I'd like it by: As soon as you can please :)

    NOTE: If a player tries to use the command /powerstone restore (amount) and does not have a powerstone maximum, it will not give them any power stones.
    Last edited: Mar 15, 2015
  2. Just so you know it's 9 slots not 8 sir :)
  3. Offline


    @Sil3nt_Aassassin Not if you're zero indexed, which Bukkit and Java are.
    @PhillyCheezsteak Just out of curiosity, why? What's the use for a currency that anyone can give themselves any amount of and change how much they can hold?
  4. @pie_flavor Because nobody is going to have the permission except for admins. I am basically going to bind the commands to items and signs.
  5. Offline


    @PhillyCheezsteak I could do this.
    Is there a default value for the maximum? Like if someone sets the amount without setting the power, how much should they be able to get?
    Last edited: Mar 16, 2015
  6. @pie_flavor I was not sure about the default value, I guess that can be in the config and the default value is 1
  7. Offline


    Wait so quick question, I'm confused. If OPs are the only ones who are allowed to use the commands, then how will a normal player use the powerstone plugin? Do you want it to be like /powerstone max amount playername? etc? Like, to set the level of another player?
  8. Offline


    @bin0 Probably server signs using the *.
    @PhillyCheezsteak Not sure what i was thinking. You clearly said that if you tried to set the count and the player had no max, nothing happens. That being said, I may or may not have it done. Haven't tested, nobody to test with. :(
    Also, first time ever using the database!
    Last edited: Mar 16, 2015
  9. @pie_flavor The plugin has an error loading

    Also to answer anyone's questions about how people would use this plugin. I am using Craft Book Command Items, Server Signs, and Chest Commands Gui and binding the commands there. The reason why I want a permission to use the commands is because I do not want players using it, unless it is an admin.
  10. Offline


  11. @pie_flavor I redownloaded it and I have the same exact error
  12. Offline


    @PhillyCheezsteak That's because it's the exact same jar. Derp, forgot to change the name back to ChargeSigns. Redownload again.Should be fixed.
  13. Offline


  14. I just recently had to transfer to Spigot due to another plugin conflict I had after updating it. I am requesting for this thread to be transferred to the Bukkit Alternatives section please.

    @pie_flavor I am not sure if you are still able to fill this request due to my transfer, but I have a new error now with Spigot.

    I am sorry for the inconvenience

    Thank you for transferring the thread :)
    Last edited: Mar 17, 2015
  15. Offline


    @PhillyCheezsteak Misnamed it AGAIN. I'm stupid.
    Redownload for a file that is hopefully different this time.
  16. @pie_flavor Thank you so much! It works perfectly! I do have one question though. If you use /powerstone max (number) when you do not have a power stone max already, it will put the Nether Star in your inventory and have a red zero for the number. If you right click it, it will disappear from your inventory. I was wondering if this was a bug or if it was intended? Either way it works perfectly, I am just curious on this.

    Edit: I found 1 bug that is a problem. Power Stones, are not considered Nether_Star. I have a plugin that uses Nether_Star as a cost to use a command. I was wondering if you can please fix this. Sorry for the trouble.
    Last edited: Mar 17, 2015
  17. Offline


    @PhillyCheezsteak Your two bug reports are actually the same bug, which is actually a feature. The nether star is merely a reflection of the actual count which is stored in memory (make sure that the max doesn't go over 64). It will take extra work to make it bidirectional.
  18. @pie_flavor Is there a way to make it so Power Stones are considered Nether_Star? Because I wanted to have commands that cost Nether_Star. So say if I had a sever sign that had the command /warp Town1 and to use that command you need 5 Nether Stars. I would want it to remove 5 "Power Stones" from the player's inventory. So basically I would just need Power Stones, to be regular Nether_Star with no special traits, names, etc.
  19. Offline


    @PhillyCheezsteak I'm not sure what you're asking.
    Power Stones are nether stars, just renamed. However they are a reflection of the value in memory. Any change made to the amount of Power Stones is immediately undone following an InventoryClickEvent. It would be a mite difficult to make it so that any changes to the item reflect the amount of stones existent and vice versa.
  20. @pie_flavor The problem is Power Stones are not Nether_Star. What I mean by this is if I have a Server Sign, Command, etc that requires Nether_Star to use as a cost, it will not work with Power Stones. Even though Power Stones look like Nether_Star, it does not register as it. If you can fix this, that would be awesome.
  21. @pie_flavor Hey I was wondering if there were any news with the plugin? There is no rush, but I am just curious :)
  22. Offline


    @PhillyCheezsteak I was thinking about how to fix this. If I added a separate command, this could work more easily. And it would be a single command, so you wouldn't have to worry about item prices.
  23. @pie_flavor The commands work fine, the problem is the Power Stone ID and the Nether Star ID do not match. What I mean by this is if I have use /clear PhillyCheezsteak Nether_Star, it will not remove any Power Stones. Another example I have is I am using CraftBook's Command Items. If a player right click's an apple and has 3 Nether Stars, it will warp them to a location. If a player right clicks an apple with power stones, it says they have no Nether_Star in their inventory. Sorry if I am confusing you.
  24. Offline


    @PhillyCheezsteak You are not confusing me. I think I was confusing you.
    There is a value in memory for each player. I am storing the amount of Power Stones they have there. Every time anything happens to the inventory of the player, their ninth slot is reset to the amount of power stones they have. The item is meaningless. /clear will clear, and prices will take, but it will immediately get reset to the amount of stones they have in memory. I will add a /price command to fix this.
  25. @pie_flavor Will this solve the issue of the CraftBook Command Item issue I am having?
  26. Offline


    @PhillyCheezsteak Yes. Redownload the plugin for the new command. Syntax: /powerstones price <price> <command>
    Unlike usual, the <command> must begin with a slash.
    This will charge the user that many power stones, and only do the other command if the user has enough.
    However you would remove a certain number of power stones, change it to use the /powerstones price command.
    Also fixed a potential bug where a user would crash if they had more than 64 power stones (for obvious reasons).
  27. Offline


Thread Status:
Not open for further replies.

Share This Page