Post Office

Discussion in 'Archived: Plugin Requests' started by And7rey, Jun 17, 2014.

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

    yellowfuzz

    I'm SOOOO close to done... but there's a lot i want to add after....
     
  2. Offline

    And7rey

    To the 'plus' version?
     
  3. Offline

    yellowfuzz

    ya
     
  4. Offline

    And7rey

    Upload it asap :rolleyes:
     
  5. Offline

    yellowfuzz

    i spent 2 hours on a bug that could be fixed just by altering one letter!!! :mad:

    ok! i'll rush the very last part! it's the easiest part to do! :)

    I'm so very sorry, but, if I can't finish today, i'll finish tomorrow. All I need to do is add the pickup button, but right now my brain can't think! [skeleton]

    well, heres an alpha if the mods approve...
    http://dev.bukkit.org/bukkit-plugins/post-office-yellowfuzz/


    [edit by JaguarJo: merged posts. Please don't quadruple post. Use the edit option instead.]
     
  6. Offline

    And7rey

    No problem :D if you haven't done the pickup button , then I would like to make a little change: I said previously that there should be only 1 pickup button , but now I need more , because I'll probably have 2 post offices. And specialbuttons + chests could be also infinite. :D

    If you finished please send a direct link too because it takes ages for the project to get approved. [bookshelf]


    [edit by JaguarJo: merged posts.]
     
  7. Offline

    yellowfuzz

    Ok. I'm super close to done, but there's a problem so i'll need to fix it. There is a NullPointerException (I hate them because usually all you need to do is fix one line of code that's hard to find), and, I need to create a config that saves the items players put in the chest when the server stops.
     
  8. Offline

    And7rey

    Once tried to write a very basic plugin into a complicated one , thought that everything will work, but then... IllegalPluginAccessException... I never finished the project :mad:
     
    ZodiacTheories likes this.
  9. Offline

    yellowfuzz

    and that null pointer exception killed my time... the solution :
    adding this
    Code:java
    1. HashMap<Player, ArrayList<ItemStack>> playerdata = new HashMap<>();
    2. HashMap<Player, ArrayList<ItemStack>> sentplayerdata = new HashMap<>();
    3. HashMap<Location, Location> postOffices = new HashMap<>();
    4. HashMap<Location, Location> pickup = new HashMap<>();
    5. HashMap<Player, Player> toFrom = new HashMap<>();


    ok...
    I'm done... but it is beta, so there may be bugs.
    There right now is no customizable config.
    Creating a Deposit Box:

    Step 1: Place a block with a button on its side and a chest on top
    http://dev.bukkit.org/media/images/74/988/2014-06-18_17.41.15.png

    Step 2: Get a wand with /postoffice wand

    Step 3: Right click the button with your wand
    http://dev.bukkit.org/media/images/74/989/2014-06-18_17.41.49.png
    Creating a Pickup Button:

    Step 1: Place a button on any non transparent, touchable, no-gravity, block.

    http://dev.bukkit.org/media/images/74/999/2014-06-19_09.06.17.png

    Step 2: Use the wand and click on the button.

    http://dev.bukkit.org/media/images/75/0/2014-06-19_09.06.38.png

    Commands:
    /postoffice wand: gives a wand used to convert a button
    /postoffice send [player]: sends items to a player
    http://dev.bukkit.org/media/files/795/991/Post_Office.jar

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

    And7rey

    Cool I can test it if there's any bug and report it

    @yellowfuzz I just tested it with my friend and pickup doesn't work... And I could only make 1 'special' button , when I tried to make more than 1 it just switched to the new one and the old one didn't work anymore


    [edit by JaguarJo: merged posts.]
     
  11. Offline

    yellowfuzz

    don't try it! i caught a bug!

    oh nvm, you caught it too...

    now... we've got the worst type of bug... a bug without an exception...


    [edit by JaguarJo: merged posts.]
     
  12. Offline

    And7rey

  13. Offline

    yellowfuzz

  14. Offline

    And7rey

    yellowfuzz bugs list: :D
    1. When someone sent a player something and the player pushes the pickup button , the message pops up , but he/she doesn't get the items
    2. After pushing the pickup button , a wrong message pops up: You received <something> from <name of the PLAYER THAT RECEIVED the items... didn't actually receive them>
    3. You can only make 1 specialbutton + chest , when you try to make more than 1 , it switches to the second one and the first one isn't usable anymore
     
  15. Offline

    yellowfuzz

    thanks for the list. i should've known about the 3rd one. i'll get it fixed!

    @And7rey I don't quite understand your first response. When i tried it, it worked. Did you put an item in a chest and clicked the special button and use /postoffice send [name]? If you did, i probably posted the wrong file

    it is lag... i'll cleanup the file (and make it more organized)


    [edit by JaguarJo: merged posts.]
     
  16. Offline

    And7rey

    Yes I did it so.


    tidy the file xd


    [edit by JaguarJo: merged posts.]
     
  17. Offline

    yellowfuzz

  18. Offline

    And7rey

    yellowfuzz new bugs list:
    1. If a player sends f.e.: 64 wood to another player , the other player pushes the pickup button and gets the items , but after that if he pushes it again he gets 64 wood again , and so he can make infinite wood
    2. No message appearing when pushing the pickup button ( not really a bug.. )

    And this error:

    [18:03:47] [Server thread/ERROR]: Could not pass event PlayerInteractEvent to Post_Office v0.4.7
    org.bukkit.event.EventException
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:294) ~[craftbukkit.jar:git-Spigot-1415]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit.jar:git-Spigot-1415]
    at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:30) ~[craftbukkit.jar:git-Spigot-1415]
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [craftbukkit.jar:git-Spigot-1415]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [craftbukkit.jar:git-Spigot-1415]
    at org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:212) [craftbukkit.jar:git-Spigot-1415]
    at net.minecraft.server.v1_7_R3.PlayerInteractManager.interact(PlayerInteractManager.java:375) [craftbukkit.jar:git-Spigot-1415]
    at net.minecraft.server.v1_7_R3.PlayerConnection.a(PlayerConnection.java:642) [craftbukkit.jar:git-Spigot-1415]
    at net.minecraft.server.v1_7_R3.PacketPlayInBlockPlace.a(SourceFile:60) [craftbukkit.jar:git-Spigot-1415]
    at net.minecraft.server.v1_7_R3.PacketPlayInBlockPlace.handle(SourceFile:9) [craftbukkit.jar:git-Spigot-1415]
    at net.minecraft.server.v1_7_R3.NetworkManager.a(NetworkManager.java:167) [craftbukkit.jar:git-Spigot-1415]
    at net.minecraft.server.v1_7_R3.ServerConnection.c(ServerConnection.java:77) [craftbukkit.jar:git-Spigot-1415]
    at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:713) [craftbukkit.jar:git-Spigot-1415]
    at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:283) [craftbukkit.jar:git-Spigot-1415]
    at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:576) [craftbukkit.jar:git-Spigot-1415]
    at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:482) [craftbukkit.jar:git-Spigot-1415]
    at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [craftbukkit.jar:git-Spigot-1415]
    Caused by: java.lang.NullPointerException
    at com.yahoo.williamzhang890.ButtonAccess.specialButtonPressed(ButtonAccess.java:97) ~[?:?]
    at com.yahoo.williamzhang890.EventListener.onPlayerInteract(EventListener.java:90) ~[?:?]
    at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_55]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_55]
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:292) ~[craftbukkit.jar:git-Spigot-1415]
    ... 16 more


    [edit by JaguarJo: merged posts.]
     
  19. Offline

    yellowfuzz

    And7rey Bug no. 2 is just a side effect of your post #68
    the pickup button thing was easy to solve.
    I'll get you the (hopefully) unbugged version later.

    i need to add a "safe build" and the ability for players to make "multiple" transactions.


    [edit by JaguarJo: merged posts.]
     
  20. Offline

    And7rey

    upload it asap :p
     
  21. Offline

    JaguarJo Retired Staff

    I'm sorry, but you are not using our software and we do not support unofficial builds. This thread is locked.
     
Thread Status:
Not open for further replies.

Share This Page