Persistent data via Attributes

Discussion in 'Plugin Development' started by ferrago, Mar 23, 2015.

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


    Hey I have been using a slightly modified version of (I just modified it to make the API a bit more user friendly).

    So I am trying to store item stat information on the items this way to prevent string parsing of stats. So I am storing all attributes as FollowRange as a player with this stat is not affected in any way. So I noticed if you give two attributes different names but the same value and the same type of attribute (FollowRange) all of the similar attributes with the same value amount will be removed. For example say I am saving durability on an item and the item is newly created. I will store say 1500 for an attribute called MaxDurability and for an attribute called CurrentDurability (as the item has never been used). When checking the item's saved attributes only the first one added will still be present. However changing the stat value keeps both attributes stored on the item. My question is there any way to get around this and store two attributes with the same value and same type but different names on an object. Reason being is the way i have everything set up currently using like the name as the value also would break the entire system and call for an entire rewrite.

    Thanks for any help!

    Also as this is your code I am tagging you for help.
Thread Status:
Not open for further replies.

Share This Page