Plugin Request Stock Exchange Plugin

Discussion in 'Plugin Help/Development/Requests' started by Insomnia-GTA, Feb 4, 2015.

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

    Insomnia-GTA

    @pie_flavor Wiw! It's really coming along! But! Here are a couple things to fix!

    1- Prefix: At first it starts of well... When when it gets to "stocks]" at the end, it is in italics! Please fix that!
    2- Colo(u)rs: Ok here are the colo(u)rs for the different parts of the plugin (sorry for not telling you this before):
    Stock Name: All stock names should be "&b"
    Price: Stock price should be "&a"
    All other text: "&6"
    3- /stockcheck: After I buy a stock... And I do /stockcheck... It says null... Not the number I bought... Even 0
    4- Messages: Can you change then following message? First line = existing message - second line = new message!

    You have bought %number% %stock name% stock
    You have bought %number% %stock name% stock(s)!

    You now have %number% stock
    You now have %number% %stock% stock(s)!

    @pie_flavor Are the permissions working? Or have you not added them yet?

    @pie_flavor Wiw! It's really coming along! But! Here are a couple things to fix!

    1- Prefix: At first it starts of well... When when it gets to "stocks]" at the end, it is in italics! Please fix that!
    2- Colo(u)rs: Ok here are the colo(u)rs for the different parts of the plugin (sorry for not telling you this before):
    Stock Name: All stock names should be "&b"
    Price: Stock price should be "&a"
    All other text: "&6"
    Error: "&c"
    3- /stockcheck: After I buy a stock... And I do /stockcheck... It says null... Not the number I bought... Even 0
    4- Money: Can you add a $ before any price?
    5-Messages: Cab you change the following messages? Top = current message- Bottom = new message
    @pie_flavor Wiw! It's really coming along! But! Here are a couple things to fix!

    1- Prefix: At first it starts of well... When when it gets to "stocks]" at the end, it is in italics! Please fix that!
    2- Colo(u)rs: Ok here are the colo(u)rs for the different parts of the plugin (sorry for not telling you this before):
    Stock Name: All stock names should be "&b"
    Price: Stock price should be "&a"
    All other text: "&6"
    Error: "&c"
    3- /stockcheck: After I buy a stock... And I do /stockcheck... It says null... Not the number I bought... Even 0
    4- Money: Can you add a $ before any price?
    5-Messages: Cab you change the following messages? Top = current message- Bottom = new message

    You have bought %amount% %stock name% stock.
    You have bought %amount% %stock name% stock(s) at $%stock cost% each! You now have a total of %amount% %stock you just bought% and $%money left% remaining!
    You have bought %amount% %stock name% stock.
    You have bought %amount% %stock name% stock(s) at $%stock cost% each! You now have a total of %amount% %stock you just bought% and $%money left% remaining!

    You do not have %amount% %stock name% stock.
    You do not have %amount% %stock name%!


    That's it.. When do you think this update will be done?

    @pie_flavor What's your Minecraft username? I want to add you as a dev and a donor
     
    Last edited by a moderator: Feb 12, 2015
  2. Offline

    pie_flavor

    @Insomnia-GTA
    1. Intended. There's a 'prefix' value in config.yml
    2. Sounds good. Will fix.
    3. Weird. /stockcheck won't do anything, but it should show you a list of stocks - do /stockcheck <stock name>
      On a side note, what exactly does it show?
    4. Sure, can do.
    5. All righty. You said the same thing twice, is that intended?

    My Minecraft name is creeperkills1000. What is your server IP?
    Don't double post! Use the edit button.

    @Insomnia-GTA Update: JavaDocs are completely down. Love to know why, but I can't finish this.

    EDIT by Timtower: merged posts, the irony
     
    Last edited by a moderator: Feb 16, 2015
  3. Offline

    Tecno_Wizard

    @Avygeil, idk, the inly thing that i am awate of that chanhed is that arrays of primatives are autonatically initialized and you can have nested classes
     
  4. Offline

    Insomnia-GTA

    @pie_flavor Sorry. I didn't notice there were 2 pages to the thread... so I thought the post disappeared... so I reposted... How do I delete a post?

    @pie_flavor My server is not fully up... I will send you a pm.
     
    Last edited by a moderator: Feb 12, 2015
  5. Offline

    pie_flavor

    @Insomnia-GTA The plugin is now complete according to your specifications. Also added: TabCompleters for every command, so you can just hit tab to show a list of stocks, and a /stock command to show all commands.
     
  6. Offline

    Insomnia-GTA

    Awesome! Where is the download? BTW You are whitelisted on the server

    Thanks @pie_flavor

    Here is a new list of things to change

    1- The prefix and the text is in italics
    2- Messages
    New Colo(u)r Codes:
    Any time you refer to a number (not money) (EX: You bought 5 %stock name% '&9')
    Message Changes:
    You have bought %number% %stock name% stock at $%cost% each plus a $%tax% tax. You now have %number% %stock name% stock and $%money left% remaining!
    REPLACE WITH (things to change in bold)
    You have bought %number% %stock name% stock(s) at $%cost% each plus a $%tax% tax. You now have %number% %stock name% stock(s) and $%money left% remaining!

    You do not have %number% %stock name% stock.
    REPLACE WITH (changes in bold)
    You do not have %number% %stock name% stock(s)!

    3- Mistakes
    /stockcheck crim
    In /stockcheck crim, I found a mistake.. It says that the price is 500 and I own $0... The $ sign souls be next to the $500 and there shouldn't be one next to the 0.

    /stockcheck crooks
    In /stockcheck crooks, I found a mistake.. It says that the price is 75 and I own $0... The $ sign souls be next to the $75 and there shouldn't be one next to the 0.
     
    Last edited by a moderator: Feb 12, 2015
  7. Offline

    pie_flavor

    @Insomnia-GTA Thanks. Got it.
    Also, for number 1, I already said - the prefix value is in config.yml. If you don't like it, change it.
    For number 2, I did even better - it'll have an 's' only if there's more than one.
    Fixed number 3.
    Redownload for fix. I'll put the download link down here so you don't have to keep scrolling up.
    StockExchange.jar
     
    Last edited: Feb 12, 2015
  8. Offline

    Insomnia-GTA

    In /stocksbuy [every stock] there is another null.
    Code:
    13.02 07:08:48 [Server] INFO ... 13 more
    13.02 07:08:48 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    13.02 07:08:48 [Server] INFO at plugin.StockExchange$$Lambda$2/1430151880.onCommand(Unknown Source) ~[?:?]
    13.02 07:08:48 [Server] INFO at plugin.StockExchange.buyStock(StockExchange.java:135) ~[?:?]
    13.02 07:08:48 [Server] INFO Caused by: java.lang.NullPointerException
    13.02 07:08:48 [Server] INFO at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    13.02 07:08:48 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:469) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    13.02 07:08:48 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:558) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    13.02 07:08:48 [Server] INFO at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:260) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    13.02 07:08:48 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:667) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    13.02 07:08:48 [Server] INFO at net.minecraft.server.v1_7_R3.ServerConnection.c(SourceFile:134) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    13.02 07:08:48 [Server] INFO at net.minecraft.server.v1_7_R3.NetworkManager.a(NetworkManager.java:157) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    13.02 07:08:48 [Server] INFO at net.minecraft.server.v1_7_R3.PacketPlayInChat.handle(PacketPlayInChat.java:47) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    13.02 07:08:48 [Server] INFO at net.minecraft.server.v1_7_R3.PacketPlayInChat.a(PacketPlayInChat.java:28) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    13.02 07:08:48 [Server] INFO at net.minecraft.server.v1_7_R3.PlayerConnection.a(PlayerConnection.java:817) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    13.02 07:08:48 [Server] INFO at net.minecraft.server.v1_7_R3.PlayerConnection.handleCommand(PlayerConnection.java:956) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    13.02 07:08:48 [Server] INFO at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchCommand(CraftServer.java:701) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    13.02 07:08:48 [Server] INFO at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    13.02 07:08:48 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    13.02 07:08:48 [Server] INFO org.bukkit.command.CommandException: Unhandled exception executing command 'stockbuy' in plugin StockExchange v1.0
    13.02 07:08:48 [Server] ERROR null
    
    I fixed the prefix! Don't worry!

    <Edited by bwfcwalshy: Merged posts, please use the edit button rather than double posting.>
     
    Last edited by a moderator: Feb 13, 2015
  9. Offline

    pie_flavor

    @Insomnia-GTA Found the problem. I was checking for how many crim stocks you owned in the cops stock command. Redownload for fix.
    Also, in doing so, I found a whole bunch of color code and miscellaneous errors. Fixed all of them.
     
  10. Offline

    Insomnia-GTA

    Ok! It's AWESOME! But when I buy a stock and then try to sell it... it says that I don't own any... even if I bought one!
    Please fix ASAP!
     
  11. Offline

    pie_flavor

    Anything in the log? Also, is the 5-minute randomization working?
     
  12. Offline

    Insomnia-GTA

    @pie_flavor There is this:
    [21:31:57] [Server thread/INFO]: Maxie_Z issued server command: /stockbuy cops 5
    [21:32:17] [Server thread/INFO]: Maxie_Z issued server command: /stocksell cops 5

    And the stocks are always at the same price!
     
  13. Offline

    pie_flavor

    I mean any errors. That's very interesting about the same-price thing.
     
  14. Offline

    Insomnia-GTA

    Nope! Nothing!
     
  15. Offline

    pie_flavor

    Never... anywhere in the server log?
    What's the state of the config?
     
  16. Offline

    Insomnia-GTA

    What is state? (Nothing in log)
     
  17. Offline

    pie_flavor

    I just mean like what's the config say. When the server stops, it should save everyone's stocks, the stock prices, and the everything else to the config.
     
  18. Offline

    Insomnia-GTA

    Looked everywhere... Found nothing... Did you find anything? @pie_flavor
     
  19. Offline

    pie_flavor

    @Insomnia-GTA Does the config even exist? If it does, tell you what - try deleting the entire data folder.

    EDIT: Never mind. I found the source of EVERY SINGLE ISSUE - every time I did anything, the first thing I did was get the values from the config after reloading it. Therefore, nothing ever got changed. Lel. Redownload for fix.
     
    Last edited: Feb 16, 2015
  20. Offline

    Insomnia-GTA

    Little request: /stockreload... Reloads config. DONT ADD THIS TO THE LIST OF COMMANDS... Ops only

    I got the new download... Same problem

    EDIT by Timtower: merged posts
     
    Last edited by a moderator: Feb 16, 2015
  21. Offline

    pie_flavor

  22. Online

    timtower Moderator Moderator

    Love it.
    @Insomnia-GTA Please use the edit button instead of double posting.
     
  23. Offline

    Insomnia-GTA

  24. Offline

    Insomnia-GTA

    Here are a couple of things to fix:


    Update Time: EVERY 5 minutes (You will see a difference in the price of the stock every 5 minutes) (EX- 12:00 PM (irl time) Stock worth - $80 THEN 12:04 still $80 ... 12:05 - can go up or down) Will also broadcast a server-wide message: %prefix% &5Stocks &bhave been updated! (the stocks still aren't updating)

    Commands:
    /stocks - view stocks to trade
    /stocksstats {stock name} - view stock stats (how much has it gone up/down in the last 12 hours/day/week (irl time)

    Can you add a permission: stocks.vip - you only pay $10 per trade (not $20) ... A great donor perk

    Money fix: Can you make the cost of the stock appear with two decimals... Also with price (Ex. Stock price: $210.54) Not just $210
    Signs: A
    Add signs
    1- [Stocks]
    2- Nothing
    3- Nothing
    4- {Stock Name}

    THEN IT BECOMES...
    1- &7[&5Stocks&7]
    2- Nothing
    3- &a${what ever it went up} / &c${what ever it went down}
    4- &6{Stock Name}
     
  25. Offline

    pie_flavor

    @Insomnia-GTA I don't understand line 3. Do you want it to just mimic the config values? I don't get it.
     
  26. Offline

    bwfcwalshy Retired Staff

    @pie_flavor
    That one? If so I think he means the percentage or cost it went up or down by.
     
  27. Offline

    Insomnia-GTA

    No. So you create the sign... and it will update the sign (every time the cost changes) to whatever it when up or down by... get it? If it went up since the last update.. the text is &a if it went down... it's &c

    @pie_flavor Working on it?
     
    Last edited by a moderator: Feb 20, 2015
  28. Offline

    Insomnia-GTA

    Bump... What's happening?
     
    MoejoeAw44 likes this.
  29. Offline

    MoejoeAw44

    I tried to decompile the plugin, but it looked like there were 0 class files. I tried re downloading it, and still.
    There were no classes in any of the packages :/
     
  30. Offline

    Insomnia-GTA

Thread Status:
Not open for further replies.

Share This Page