#Thread

1 messages · Page 1 of 1 (latest)

hollow wolf
#

k

#

wdym by exclusive

fierce nacelle
#

exclusive ideas just produced by my gigabrain rn

hollow wolf
#

oh

#

there

#

great

#

ill get working on it then

fierce nacelle
#

then i can flame in commit reviews

hollow wolf
#

i just realized ill have to write docs for this

#

NOOOOOOOOOOOOOOOOOOOO

#

nah

#

i was jokin

#

i love writing docs

fierce nacelle
#

docs will be like: "Yeah, not my method. Absolutely no clue what this does but hey it returns a String!"

#

then you don't need any javadocs for it

hollow wolf
#
// Creating an inventory
InventoryWrapper wrapper = InventoryProvider.register("plugin:inv-name", inventory);

// Getting an inventory
InventoryWrapper wrapepr = InventoryProvider.get("plugin:inv-name");

// Removing an inventory
InventoryProvider.unregister("plugin:inv-name");
```There updated a bit
#

the wrapper is created with an inventory

fierce nacelle
#

thank god someone once made a javadoc for getPlayer()... otherwise I wouldn't know till today what the method was supposed to do

hollow wolf
#

example

InventoryWrapper wrapper = InventoryProvider.register("testplugin:myinventory", Bukkit.createInventory(null, 54, "test"));

fierce nacelle
#

first it boots up a webservice to call with the president of the united states. afterwards it picks up some garbage, cleans my clothes and borns a baby. the baby will be declared as player and is hardcoded as an astronaut. once he became 9 years old the method will return him

hollow wolf
#

nice

#

lmao

hollow wolf
#

To get a wrapper

#

and the provider remembers the wrapeprs

#

wrappers

hollow wolf
#

apart creating stuff

#

thats for another class

fierce nacelle
#

InventoryWrapper ew. for what a provider? instead of "PLUGIN:blabla" let them insert the plugin instance. don't use bukkits inventory, and if, then just in the very very backend

hollow wolf
#

well i couldn't name it inventory

#

otherwise i couldn't use inventory in it

#

as it just manipulates the underlying inventory

fierce nacelle
#

its not a wrapper, you will have your own inventories

#

therefor you will have several layers. the end-user shouldn't really get in contact with the bukkit inventory api via your api.

hollow wolf
#

alright

#

ill still keep it named inventory wrapper

fierce nacelle
#

🤢

#

just call it {lib_name(-Lib)}Inventory

hollow wolf
#

LIBInventory

#

?

#

or OmniInventory

fierce nacelle
#

whatever your lib is called and subtract the Lib at the end

hollow wolf
#

OmniInventory it is

#

surely that won't cause problems

hollow wolf
#

recreate is private

#

dw about that

#

its for me to support resizing/renaming

hollow wolf
#

@fierce nacelle wdym by pagination

#

kk

#

Copilot just implemented this

#

idk if its correct lmfao

elder lynx
#

that should happily run forever or never

hollow wolf
#

no?

elder lynx
#

sure hope items.length is set somewhere else

hollow wolf
#

items is an array

#

right above the for loop

elder lynx
#

oh thats right, java does that - i should use that more often

hollow wolf
#

Just a little bit more complex

#

Air is last
If A's weight is more go forward
otherwise if less go backwards
otherwise if its the same compare the amount
if its more go forward
if its less go backwards
otherwise if its the same compare the name
if its higher in alphabetical order go forward
otherwise go backwards
if they are the same don't do anything

#

replaced it with this

#

updated

hollow wolf
#

All inventory features so far

#

mirrors are now added btw

hollow wolf
#

Full itemstack serialization and deserialization done

hollow wolf
#

This is now fully parsed

#

I need to add it to commands

#

but thats going to be easy

#

Now i need to handle complex commands

#

the ones where the entire class is a command

hollow wolf
#

Update

#

i am now parsing almost full commands

#
Adding base command: rank (autoComplete: true)
Registering subcommand: RuntimeSubcommand[name=list, prefix=, args=[], autoComplete=false, prev=info]
Registering subcommand: RuntimeSubcommand[name=info, prefix=, args=[RuntimeArgument[argIndex=0, name=rank, type=class java.lang.String, optional=false]], autoComplete=false, prev=]
Registering subcommand: RuntimeSubcommand[name=take, prefix=, args=[RuntimeArgument[argIndex=0, name=rank, type=class java.lang.String, optional=false]], autoComplete=false, prev=]
Registering subcommand: RuntimeSubcommand[name=give, prefix=, args=[RuntimeArgument[argIndex=0, name=rank, type=class java.lang.String, optional=false]], autoComplete=false, prev=]
RuntimeSubcommand[name=list, prefix=, args=[], autoComplete=false, prev=info]
```Last one is attempting to get path for "info a list list2", which should result in calling the "list" sub command as info takes 1 argument, and such is the case
plain ingot
#

this looks cool, what is it?

#

can't really figure out just from these messages but was interested

hollow wolf
hollow wolf
#

@fierce nacelle I see we both made a plugin for this

hollow wolf
#

Update on commands

#

say parameter A and B is required

#

if you pass only A

#

it says

#

/commandname A<-- [HERE] Missing argument: B

plain ingot
#

Which mc version?

hollow wolf
#

its 1.17+

#

i don't like 1.16.5

hollow wolf
#

Update

#

added support for regions

hollow wolf
#

Update

#

almost working command lib

hollow wolf
#

Added two new libs