so as this project sits right now, i wouldn't mind doing some testing. could you fill me in on what you sort of have planned for methods that other mods can call? really I'm just looking to see how communication is planned back and forth.
Posts by nobotious
-
-
it is tempting Miwarre, once i get the rest of the plugin hashed out, i'll let you know. i still have to work on a few things, and then i'll go on to how i plan to improve the gui.
this may also extend into the territory of player made shops, but that is still a ways away yet. if I went that route i would likely tie into your currency back-end too haha. -
Figured i'd make a placeholder thread for a project I've been working on.
i've been working on a Gui Based item storage system, with a dual-pane GUI.
left-side will list all the items in your quickbar, and when clicked will deposit them into your bank/bag.
right-side will list all items in your bank/bag (in pages) with quantity, and when clicked will put one of said item into your inventory, and when shift-clicked will move a stack.Its still incredibly early, and not quite near finish, but I will post it as soon as it is!
(I know it looks incredibly ugly right now, just working on the back-end primarily and will polish the gui when its ready to release)
-
how exactly is the attribute being called?
-
ahh ok, i didn't think about the language localization side of things. was curious why it didn't exist in the Item object, but now that makes sense lol.
perhaps i'll just go through and make a method that will use itemid and variation in order to give localized names. i've been working on an item banking / bag menu plugin.
-
Having some curiosities about the way we are able to reference Items.
so i know how to get all of the different properties of an item object, like item.getName() , etc.
but is there a good way to get a name like we would find in our inventory menu? as in "stone" instead of "ore" with Variation of 3?
I know i could make some method to create this name, but would hate to do it for each and every item. -
i'm in no rush to release my plugin, just wanted to make sure the bug was still on the board :P. just been doing testing in singleplayer.
appreciate all your hard work!honestly for now, its not an issue with the rest of my development lol, would just introduce an exploit if i were to release it (at this moment).
-
i apologize if this seems dumb as i'm pretty new to all of this lol, but perhaps for now we could simply to try work with player attributes for a few things?
example: a players "currency" value being something along the line of:
player.setAttribute("modthathandlescurrency_currency", whatever_value)
or say a player enters a zone, have the area protection mod run something along:
player.setAttribute("modthathandlesareas_current_area", "name of current area")
i'm obviously over-simplifying this, and would love to see better inter-plugin communication, but just temporarily maybe come up with some sort of attribute naming convention lol, and provide a list of attributes that your plugin creates/uses.
-
-
-
-
-
-
excited, and patiently awaiting the api release
-
-
Hoping to do the following: (unsure if i can quite do with the API in its current state, will have to experiment)
"bags" mod. the mod will allow you to press a key to open a "bag". the bag will either be:
A. a gui based off of items whose data is stored in an SQL database, that is accessible by pressing the "bag" key
(Not Possible at this moment with the API, at least how i envisioned it)OR
B. an existing chest in the world, which can be accessed anywhere by pressing the "bag" key
(not 100% sure its possible yet, but would have to more or less have the bag key "cause" a player interaction event tied to an existing chest)
have started making some basic classes for it, but mostly waiting for api to release. -
understood. its been somewhat of a learning experience here working with hashmaps. a good learning experience though!
I'm very excited for the api to release. I'm working on making a "bag" that you can open via a command, it will be tied to an existing world chest (not sure on some specifics of this yet), or it will be stored via an sql database. whichever ends up being the laziest way haha. so a player types said command, and an inventory pops up as if you've opened a chest. (even if i can't quite do it with the api as-is, its a good learning platform).
-
still not 100% sure if my usage is correct, but i did realise i wasn't using " " around the variable. once i did the errors went away. so maybe fixed haha.
also thank you Miwarre!, that helps.
-
So to start off, i'll let you know for starters that i'm very new to java, as well as a few programming concepts.
so I'm working on a project, and trying to use player.setAttribute, and player.getAttribute. from what i can tell these can save a value to a hashmap, and pull said value from said hashmap.
i'm having trouble with .getAttribute.
sample code for what i'm doing
so and so odd thing is done, and saves something to a players Attribute.
if(blah == 1){ player.setAttribute(testattribute, 1);
}this part seems to "work"
however i'm having problems pulling the Attribute with getAttribute
Object test = player.getAttribute(testattribute);
i get the error "testattribute cannot be resolved to a variable"
i'm 95% sure i'm doing something wrong haha. if anyone could help point me in the right direction i'd love it!