Inactive [RPG] PhatLoots v0.9.1 - Chests with randomly generated money/items [953]

Discussion in 'Inactive/Unsupported Plugins' started by Codisimus, Mar 19, 2011.

  1. Offline

    Codisimus

    This page will no longer be updated. Please follow this project at the Bukkit Dev Page

    PhatLoots - Chests with randomly generated money/items:
    Version: 0.9.1 (7/16/2011)
    Supports iConomy, BOSEconomy, Essentials, Permissions, LWC
    Download Page

    This plugin is a must for dungeons! Players open a linked chest and are rewarded with money (within a designated range) and randomly generated items that are predefined.

    Make a PhatLoot
    /loot make test
    Add some loot values
    /loot add test money 1 25 (looter will get 1-25 coins)
    /loot add test 322 1 10 (looter has 10% chance of getting a golden apple)
    Set a reset time
    /loot time test 1'6'45'30 (looter can loot the chest again after waiting
    1 day, 6 hours, 45 minutes, and 30 seconds.)
    Link a chest
    /loot link test (you must be targeting the chest you wish to link)

    Collective Loots allows you to setup a chest to give a certain amount (1 by default) of 'rare' items. So a chest may give the user a chance to loot a Gold Block (50%), Diamond Sword (30%), or Diamond ChestPlate (20%) yet the user will only get one of these items.

    Features:
    • Chests can give items, money, or both
    • Support for wools/dyes
    • Set different reward values for different chests.
    • Link multiple chests to one PhatLoot (this way you don't have to reenter all the items for every chest)
    • Player must wait a certain amount of time in order to loot the chest again (configurable)
    • Different reset times for each PhatLoot
    • AutoLoot option
    • Easily configure setting, loot values, reset times, and more
    • Make chests global (when looted by one person, everyone must wait to loot it again)
    • or user (each individual must wait the specified time between looting chests)
    • Uses iConomy, BOSEconomy or Essentials to give users money.
    • Uses LWC to auto protect PhatLoot chests (false by default)
    • Permissions to limit players from being rewarded and using commands
    • Included in CraftBukkitUpToDate for easy updating (make sure you come check the changelog if somthing is not working right)
    Save Files and Properties:
    Show Spoiler

    config.properties
    Code:
    #Tue Mar 29 14:04:05 EDT 2011
    // user - when a player loots a chest they must wait the specified time to loot again
    // global - when looted by one person, everyone must wait to loot it again (first person there gets the loot)
    DefaultResetType=user
    
    // if true, when you link a chest it will automatically make it public with LWC (so noone else can claim it)
    AutoLockPhatLootChestsWithLWC=false
    
    // default number of items you get from CollectiveLoots (only applies if CollectiveLoots is not blank)
    DefaultNumberOfCollectiveLootItemsRecieved=1
    
    // amount of time before the chest will reset "Days'Hours'Minutes'Seconds"
    // change to "never" in order for it to never reset
    DefaultResetTime=0'0'5'0
    
    phatloots.save
    Code:
    test1   // a list of all your Phat Loots by name
    test2
    
    test.properties
    Code:
    #Tue Mar 29 16:20:45 EDT 2011
    //the number of items you get from CollectiveLoots (only applies if CollectiveLoots is not blank)
    NumberOfCollectiveLootItemsRecieved=1
    
    // user - when a player loots a chest they must wait the specified time to loot again
    // global - when looted by one person, everyone must wait to loot it
    ResetType=user
    
    // list of linked chests (you should never have to edit this) "x,y,z,NameOfLooter,TimeLooted,_"
    Chests(RestrictedUsers)=-155,65,-93,Codisimus,88'16'13'16,_
    
    // "itemID,NumberOfItems,PercentOfLooting,_" Should add up to 100%
    CollectiveLoots=13,1,75,_14,1,10,_15,1,15,_
    
     // amount of time before the chest will reset "Days'Hours'Minutes'Seconds"
     // change to "never" in order for it to never reset
    ResetTime=0'0'0'20
    
    // "itemID,NumberOfItems,PercentOfLooting,_"
    IndividualLoots=money,0,2,_13,1,100,_14,1,23,_15,1,30,_
    


    Commands:
    • /loot make [Name] - Creates PhatLoot
    • /loot link [Name] - Links target chest with PhatLoot
    • /loot add coll[1-5] [Item] [Amount] [Percent] - Adds collective loot to target chest's PhatLoot
    • /loot add [Item] [Amount] [Percent] - Adds individual loot to target chest's PhatLoot
    • /loot add money [Low] [High] - Adds range of money that can be looted
    • /loot remove coll[1-5] [Item] [Amount] [Percent] - Removes collective loot from PhatLoot
    • /loot remove [Item] [Amount] [Percent] - Removes individual loot from PhatLoot
    • /loot unlink [Name] - Unlinks target chest with PhatLoot
    • /loot info [Name] - Lists info of PhatLoot
    • /loot name - Gives PhatLoot name of target chest
    • /loot reset [Name or all] - Resets PhatLoot restricted list
    • /loot delete [Name] - Deletes PhatLoot and unlinks chests
    • /loot list - Lists all PhatLoots
    Permission Nodes:
    • phatloots.use - Needed for group/player to receive loots
    • phatloots.info
    • phatloots.name
    • phatloots.make
    • phatloots.list
    • phatloots.admin.reset

    Changelog:
    Old Versions, ChangeLog, + Source can be found at Download Page
    Show Spoiler

    Version 0.9.1 (7/16/2011)
    • Added color support for all customizable messages
    • Fixed Collective loots
    Version 0.9 (6/26/2011)
    • Improved OP options
    • Updated Economy support
    • Added AutoLoot option
    • Improved add command
    • Added targeting chests for adding loot
    • Added item name support (rather than item ID)
    • Added saftey check so you can't add invalid loots
    Version 0.8.1 (6/13/2011)
    • Fixed OP permissions
    Version 0.8 (6/12/2011)
    • Cleaned up code/fixed errors
    • Added map support
    Version 0.7.4 (6/4/2011)
    • Cleaned up errors and added error messages
    Version 0.7.3 (6/3/2011)
    • Various fixes and code cleanup
    Version 0.7.2 (6/3/2011)
    • Added Essentials econ support
    Version 0.7.1 (5/4/2011)
    • Updated to iConomy 5
    • Few various fixes
    Version 0.7 (4/29/2011)
    • Fixed save/loss of data errors
    • Added support for wools/dyes
    • Fixed Double Chest errors
    • Added in game command for setting timer restriction
    • Added in game command for setting collective loots
    • Added option of multiple collective loots
    • Added option for setting resetType to Interval
    • Added prevention from looting out of ID-range items
    • Fixed delete command
    Version 0.6 (3/31/2011)
    • Fixed issue with users with "_" in name
    • Improved multiworld support
    • Fixed various bugs
    Version 0.5.1 (3/31/2011)
    • Fixed CollectiveLoots
    • Works with build #612
    Version 0.5 (3/30/2011)
    • Updated to craftbukkit build #602
    Version 0.4 (3/29/2011)
    • Redid save format
    • Added config file
    • Added double chest support
    • Added Collective loots
    • Added Auto protection using LWC (false by default)
    • Added a reset time ("Days'Hours'Minutes'Seconds" or "never") (0'0'5'0 by default)
    • Added global/user restriction (user by default)
    • Added antigrief feature, if chest is full PhatLoots will make room for new loot
    Version 0.3 (3/26/2011)
    • Added block protection for PhatLoot chests
    Version 0.2 (3/19/2011)
    • Fixed unknown command spamming chat
    • Fixed no Economy message spamming
    • added /loot info and /loot name (phatloots.info phateloots.name)
    Version 0.1 (3/18/2011)
    • Initial Release
     
  2. Offline

    L24D

    @Codisimus
    Hmm, it went from bad to worse, now it doesn't even work :p. It gives me a lovely little NPE.

    Upon server boot:

    Code:
    2011-07-16 23:38:46 [SEVERE] java.io.FileNotFoundException: plugins\PhatLoots.jar (The system cannot find the file specified)
    2011-07-16 23:38:46 [SEVERE]     at java.util.zip.ZipFile.open(Native Method)
    2011-07-16 23:38:46 [SEVERE]     at java.util.zip.ZipFile.<init>(Unknown Source)
    2011-07-16 23:38:46 [SEVERE]     at java.util.jar.JarFile.<init>(Unknown Source)
    2011-07-16 23:38:46 [SEVERE]     at java.util.jar.JarFile.<init>(Unknown Source)
    2011-07-16 23:38:46 [SEVERE]     at PhatLoots.PhatLootsMain.moveFile(PhatLootsMain.java:81)
    2011-07-16 23:38:46 [SEVERE]     at PhatLoots.PhatLootsMain.checkFiles(PhatLootsMain.java:70)
    2011-07-16 23:38:46 [SEVERE]     at PhatLoots.PhatLootsMain.onEnable(PhatLootsMain.java:49)
    2011-07-16 23:38:46 [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    2011-07-16 23:38:46 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:857)
    2011-07-16 23:38:46 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:264)
    2011-07-16 23:38:46 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:151)
    2011-07-16 23:38:46 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:136)
    2011-07-16 23:38:46 [SEVERE]     at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:284)
    2011-07-16 23:38:46 [SEVERE]     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:271)
    2011-07-16 23:38:46 [SEVERE]     at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
    2011-07-16 23:38:46 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
    2011-07-16 23:38:46 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-07-16 23:38:46 [SEVERE] [PhatLoots] Missing value for Economy in config file
    2011-07-16 23:38:46 [SEVERE] [PhatLoots] Please regenerate config file
    2011-07-16 23:38:46 [SEVERE] [PhatLoots] Missing value for UseOP in config file
    2011-07-16 23:38:46 [SEVERE] [PhatLoots] Please regenerate config file
    2011-07-16 23:38:46 [SEVERE] [PhatLoots] Missing value for AutoLoot in config file
    2011-07-16 23:38:46 [SEVERE] [PhatLoots] Please regenerate config file
    2011-07-16 23:38:46 [SEVERE] [PhatLoots] Missing value for AutoLootMessage in config file
    2011-07-16 23:38:46 [SEVERE] [PhatLoots] Please regenerate config file
    2011-07-16 23:38:46 [SEVERE] Error occurred while enabling PhatLoots v0.9.1 (Is it up to date?): null
    java.lang.NullPointerException
        at PhatLoots.PhatLootsMain.loadConfig(PhatLootsMain.java:124)
        at PhatLoots.PhatLootsMain.onEnable(PhatLootsMain.java:51)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:857)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:264)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:151)
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:136)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:284)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:271)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    [edit]: I'll play around with it for a bit, and see what happens...

    Hey, sorry for the double post, but i fixed the first issue, but now i have another one.
    Goes back to the chest being accessed again.
    The first one (previous post) is related to the filename, it doesn't seem to allow me to change it from its default name in any way. I usually mark my plugins with version numbers... So yeah.

    This one is a bit different, Parsing error:

    Code:
    2011-07-17 00:56:34 [SEVERE] Could not pass event PLAYER_INTERACT to PhatLoots
    java.lang.NumberFormatException: For input string: "never"
        at java.lang.NumberFormatException.forInputString(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at PhatLoots.PhatLoots.isTimedOut(PhatLoots.java:126)
        at PhatLoots.PhatLoots.getLoot(PhatLoots.java:74)
        at PhatLoots.PhatLootsPlayerListener.onPlayerInteract(PhatLootsPlayerListener.java:349)
        at org.bukkit.plugin.java.JavaPluginLoader$10.execute(JavaPluginLoader.java:307)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:321)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
        at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:210)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:552)
        at net.minecraft.server.Packet15Place.a(SourceFile:57)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:84)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    I know what the cause is, but your config clearly states to use never for single use chests... :p
    It appears that it can only parse numbers..
    Would using -1 be acceptable for single use chests?
    Not sure what setting it to 0 would do, it could only do one of two things i'd guess... either function once, or spam the chest with items. :p

    [edit]: or not work at all.. haha i'm having a terrible run of luck with this.
    setting it to "never" does work... but it throws the error above.
    if i try to set it to anything else, i get this:

    Code:
    2011-07-17 01:12:02 [SEVERE] Could not pass event PLAYER_INTERACT to PhatLoots
    java.lang.ArrayIndexOutOfBoundsException: 1
        at PhatLoots.PhatLoots.isTimedOut(PhatLoots.java:127)
        at PhatLoots.PhatLoots.getLoot(PhatLoots.java:74)
        at PhatLoots.PhatLootsPlayerListener.onPlayerInteract(PhatLootsPlayerListener.java:349)
        at org.bukkit.plugin.java.JavaPluginLoader$10.execute(JavaPluginLoader.java:307)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:321)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
        at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:210)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:552)
        at net.minecraft.server.Packet15Place.a(SourceFile:57)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:84)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    [edit2]:
    One final note. It does work, when it's set to never, it just throws the error in the first box. That's all :p
    I'm not saying it doesn't work at all.

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

    Codisimus

    @L24D
    are you setting the time in game?
     
  4. Offline

    L24D

    @Codisimus
    No, it's the default time setting in the config i set. Why?
     
  5. Offline

    ctek

    With PhatLoot 0.9.1 and CraftBukkit RB1000 I get this at startup every time:
    Code:
    04:01:35 [INFO] [PhatLoots] Load failed, saving turned off to prevent loss of data
    04:01:35 [SEVERE] java.lang.ArrayIndexOutOfBoundsException: 2
    04:01:35 [SEVERE]     at PhatLoots.PhatLoots.setCollectiveLoots(PhatLoots.java:307)
    04:01:35 [SEVERE]     at PhatLoots.SaveSystem.loadFromFile(SaveSystem.java:75)
    04:01:35 [SEVERE]     at PhatLoots.PhatLootsMain.onEnable(PhatLootsMain.java:50)
    04:01:35 [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    04:01:35 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:878)
    04:01:35 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:272)
    04:01:35 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:162)
    04:01:35 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:146)
    04:01:35 [SEVERE]     at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:284)
    04:01:35 [SEVERE]     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:271)
    04:01:35 [SEVERE]     at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
    04:01:35 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
    04:01:35 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    04:01:35 [INFO] PhatLoots 0.9.1 is enabled!
    04:01:35 [INFO] [PhatLoots] Successfully linked with Permissions!
    04:01:35 [INFO] [PhatLoots] Successfully linked with iConomy 5!
    It has done this for a while, on Bukkit RB935,953 and 1000.
    Otherwise great plugin, keep up the good work.
     
  6. Offline

    Codisimus

    @L24D
    Can I see your config?


    @ctek
    I still need to update to 1000 but you just need to delete the errored line and it will not show up again
     
  7. Offline

    L24D

    @Codisimus
    Kay, here it is...

    Code:
    #Config file for PhatLoots
    #Plugin made by Codisimus
    
    
    #Supported Economy plugins:
    #BOSEconomy, iConomy (4 or 5), Essentials, None
    
    Economy=none
    
    
    #If set to true, PhatLoots will overlook Permissions
    #Only OPs will be able to make PhatLoots
    #Everyone will be able to loot items
    
    UseOP=true
    
    
    #If set to true items will go straight to player's inventory
    #Once inventory is full items will show up in the chest
    #Type \! instead of ! in order to use an exclamation point (ex. hi\!)
    #Use & to specify colors for messages (ex. &3hi&a.)
    
    AutoLoot=true
    AutoLootMessage=<item> was automatically added to your inventory.
    
    
    #Can be set to "user" or "global"
    #user = when a player loots a chest they must wait the specified time to loot again
    #global = when looted by one person, everyone must wait to loot it again (first person there gets the loot)
    
    DefaultResetType=user
    
    
    #The number of items that will be received from the collective loots
    
    DefaultNumberOfCollectiveLootItemsRecieved=1
    
    
    #Amount of time before the chest will reset "Days'Hours'Minutes'Seconds"
    #Change to "never" in order for it to never reset
    
    DefaultResetTime=never
    
    
    #If set to "true", when a PhatLoots chest is created it will automatically be made public with LWC
    
    AutoLockPhatLootChestsWithLWC=false
    
    It clearly states to change it to never.
    But that's what's causing the problem.
    it's not an interger, so it cannot parse it. :p

    [edit]:
    I've got a temporary workaround until it's fixed... i just set the time to 65535.
    No more errors. But it still doesn't fix the problem with one time chests.
     
  8. Offline

    Codisimus

    @L24D
    Ok, I think I know wut is wrong. I'll work on it
     
  9. Offline

    WartBrain

    I haven't looked at this recently (been a few versions back) so forgive me if this has already been fixed/discussed:
    One thing I was running into was wanting to have a chest that gave, let's say, armor. I'd have a loot table setup for leather armor, iron, and diamond, for example. Obviously all at different %'s.
    What I was seeing is, if nobody looted that chest, the chest would continue to fill up with armor, until someone looted it - so if nobody looted it for, say, a week - by the time someone came around to loot it, it would be filled with all the different types of armor - when what I was hoping for was to have it randomly fill the chest with just the items in the config, ONCE, until someone came to loot it - but instead, it would just continue to fill the chest with the items until it was full, over a period of time.
    A simple fix might be to have an option to limit the maximum number of items in the chest - the plugin just won't add any more items if there are already X number of items in the chest already. Or maybe an option to clear the contents of the chest, first... /shrug
     
  10. Offline

    vDk

    Its possible to add message when player trying to get reward second time? for example "theres nothing usefull, back later..." beacuse now player can just open chest and its not cool.
    And option for disable possiblity to open linked chests would be nice :)
     
  11. Offline

    Ares513

    Hi, first of all, awesome plugin. Unfortunately, when I create a loot, it creates just fine, but after any reload or restart, it doesn't show up. Can you help?
     
  12. Offline

    HCLivess

    Work of a true genius
     
  13. Offline

    topsub

    I am getting this error:

    Code:
    2011-07-25 21:50:54 [SEVERE] Could not pass event PLAYER_COMMAND_PREPROCESS to PhatLoots
    java.lang.NoClassDefFoundError: com/griefcraft/lwc/LWC
            at PhatLoots.PhatLoots.addChest(PhatLoots.java:443)
            at PhatLoots.PhatLootsPlayerListener.onPlayerCommandPreprocess(PhatLootsPlayerListener.java:59)
            at org.bukkit.plugin.java.JavaPluginLoader$5.execute(JavaPluginLoader.java:272)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:706)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:677)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:670)
            at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
    I am using icomony with permissions 3.16
     
  14. Offline

    Phealoon

    I am having the same problem as WartBrain. I added a single paper to a chest and now I have 4. Why does it keep multiplying after I set items received to 1?
     
  15. Offline

    WiLDiSH

    I don't think it's working on my server. I have CB1000 and for some reason it won't let me add anything to the chests.
     
  16. Offline

    samp20

  17. Offline

    DrBowe

    @Codisimus
    Ok.
    So I have a very strange bug to report. I'll try to be as detailed as possible, here...
    /loot make 25s
    /loot add 25s money 25 25
    /loot time never
    /loot link (a chest)

    I loot it, all is well.
    I loot it again. The server restarts.
    ...What.
    I'd post error logs, but the server literally restarts every time I try to click it after the first time.

    EDIT
    Managed to get an error on my test server:
    Error Log (open)

    23:22:03 [SEVERE] Could not pass event PLAYER_INTERACT to PhatLoots
    java.lang.NumberFormatException: For input string: "never"
    at java.lang.NumberFormatException.forInputString(Unknown Source)
    at java.lang.Integer.parseInt(Unknown Source)
    at java.lang.Integer.parseInt(Unknown Source)
    at PhatLoots.PhatLoots.isTimedOut(PhatLoots.java:126)
    at PhatLoots.PhatLoots.getLoot(PhatLoots.java:74)
    at PhatLoots.PhatLootsPlayerListener.onPlayerInteract(PhatLootsPlayerLis
    tener.java:349)
    at org.bukkit.plugin.java.JavaPluginLoader$10.execute(JavaPluginLoader.j
    ava:307)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:321)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEven
    t(CraftEventFactory.java:168)
    at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.j
    ava:210)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:552)
    at net.minecraft.server.Packet15Place.a(SourceFile:57)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:84)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    >

    Happens whenever I click a chest that is set to 'never', and I've already looted it.
     
  18. Offline

    dak393

    I believe he is working on it (maybe he already updated) because I swear I saw this come up already and said the error was due to phatloot expecting an int for that (it was missing the string detection) Try updating if you are up to date just wait I think codisimus is working on it :)
     
  19. Offline

    Crazy Crack

    Dispensers? Could you make it so that when dispensers are used it randomly shoots out an item or block? That would be awesome!
     
  20. Offline

    gameswereus

    Will this be updated?

    EDIT: please update this! :p
     
  21. Offline

    JDD

    I am having this issue occu
    I am having this issue come up with all of his plugins (PhatLoot Turnstile and Quizblock) they work fine until I reset server then functionality is wishy washy if not lost all together.
     
  22. Offline

    McSpazzy

    Last edited by a moderator: May 12, 2016
  23. Offline

    JDD

    @McSpazzy Thanks, any chance you would want to look at turnstile and see why it's acting up as well /wink, or quizblock lol
     
  24. Offline

    McSpazzy

    Turnstile might be one of the same problems this one had, if its using the old register.
     
  25. Offline

    DrBowe

    @McSpazzy
    Beautiful. You just saved me a lot of stress. I'm assuming the issue was simply a deprecated method that was being used? Or something along those lines?
     
  26. Offline

    McSpazzy

    There were a couple if issues. Nothing too big. Ill keep it updated if i remember, unless there are some major breakages from updates or @Codisimus returns.
     
  27. Offline

    dak393

    Thanks man :) one great dev helping another :D
     
  28. Offline

    Andyb473

    Getting this error every time I try and use a chest that uses the collective loot feature:
    Tried with both [1000] and [1060], using both Codisimus' plugin and McSpazzy's updated version.

    Code:
    21:16:29 [SEVERE] java.lang.ArrayIndexOutOfBoundsException: 2
    21:16:29 [SEVERE] at PhatLoots.PhatLoots.setCollectiveLoots(PhatLoots.java
    :307)
    21:16:29 [SEVERE] at PhatLoots.SaveSystem.loadFromFile(SaveSystem.java:75)
    
    21:16:29 [SEVERE] at PhatLoots.PhatLootsMain.onEnable(PhatLootsMain.java:5
    0)
    21:16:29 [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlug
    in.java:126)
    21:16:29 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(
    JavaPluginLoader.java:857)
    21:16:29 [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(Si
    mplePluginManager.java:264)
    21:16:29 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftSe
    rver.java:151)
    21:16:29 [SEVERE] at org.bukkit.craftbukkit.CraftServer.enablePlugins(Craf
    tServer.java:136)
    21:16:29 [SEVERE] at net.minecraft.server.MinecraftServer.e(MinecraftServe
    r.java:284)
    21:16:29 [SEVERE] at net.minecraft.server.MinecraftServer.a(MinecraftServe
    r.java:271)
    21:16:29 [SEVERE] at net.minecraft.server.MinecraftServer.init(MinecraftSe
    rver.java:148)
    21:16:29 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftSer
    ver.java:335)
    21:16:29 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(Sour
    ceFile:422)
    What I'm trying to do is make a chest that, when it's opened, gives the player the four armor pieces, (headpiece, chestpiece, legplates and boots). it should give a each piece of armor (head, chest, legs, boots) with a different % chance for each material type, say 5% for diamond, 10% for gold 35% for iron and 50% for leather.

    so I place a chest (let's call it armorchest), and i type in:


    Code:
    /loot make armorchest
    
    /loot add armorchest coll1 298 1 50        (298 = leather head)
    /loot add armorchest coll1 306 1 35        (306 = iron head)
    /loot add armorchest coll1 314 1 10        (314 = gold head)
    /loot add armorchest coll1 310 1 5          (310 = diamond head)
    
    
    /loot add armorchest coll2 299 1 50        (299 = leather chest)
    /loot add armorchest coll2 307 1 35        (307 = iron chest)
    /loot add armorchest coll2 315 1 10         (315 = gold chest)
    /loot add armorchest coll2 311 1 5           (311 = diamond chest)
    
    
    /loot add armorchest coll3 300 1 50       (300 = leather legs)
    /loot add armorchest coll3 308 1 35       (308 = iron legs)
    /loot add armorchest coll3 316 1 10       (316 = gold legs)
    /loot add armorchest coll3 312 1 5         (312 = diamond legs)
    
    
    /loot add armorchest coll4 301 1 50      (301 = leather boots)
    /loot add armorchest coll4 309 1 35      (309 = iron boots)
    /loot add armorchest coll4 317 1 10       (317 = gold boots)
    /loot add armorchest coll4 313 1 5         (313 = diamond boots)
    
    
    /loot time armorchest 0'0'0'5 (short time to test it out quickly)
    /loot link armorchest
    I then open the chest, nothing appears. And the error occurs.

    Have I missed something out in making the chest? or completely missunderstood how the collective looting works?

    Getting the chests to give money and individual items is no problem, but I'm struggling with the collective feature.
     
  29. Offline

    Dragonne

    I read through the entire 14 pages of posts and couldn't find this...

    How can I put dyes as a reward? Actually trying to add cocoa beans and couldn't find a way to. Since there doesn't seem to be a way to specify the secondary ID on the item, I cannot figure it out.

    Thanks!
     
  30. Offline

    Monkey_nuts

    this doesn't work at all for me I set up a to reset after 20 secs and to have 1 bow and 3 arrows in it it worked once now it wont work again D:

    here is my setting file for it:
    Code:
    Chests(RestrictedUsers)=
    ResetTime=0'0'0'20
    IndividualLoots=261,1,100,~262,3,100,~
    NumberOfCollectiveLootItemsRecieved=1
    ResetType=user
    Coll5=
    Coll4=
    Coll3=
    Coll2=
    Coll1=
    
    I am running Permissions 3.x if that make any difference and iConomy5

    i managed to fix the problems of it not working at all but now i have a query ... can you make it so that there can only be 3 arrows and 1 bow at a time in the chest? beacause every 20 secs it adds new ones which is what i dont want.. :D

    have you tried 351:3 or 351.3 or 351,3? i think one of those works :D

    OK it doesn't work I was wrong :p

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

    Dragonne

    Hehehe, ya, I had tried all the basic ways that you might think would work. :)
     

Share This Page