Skip to content

Change DeliveryPacketVault format from List to HashMap? #6

@julianhelpertz

Description

@julianhelpertz

in the current version of delivery the DeliveryPacketVault functions like this:

It stores all DeliveryPacket's which were registered by the developer in an ArrayList and takes the index of this list as the id of the DeliveryPacket. So currently, there is no way to interfere with the id and mess something up but this means also that the id can not be manually set.

It might be a better plan to actually have a HashMap instead of the list a which holds the id's and the DeliveryPacket. If it would be changed to a HashMapthere has to be some algorithm which automatically gives the DeliveryPacket an id. Problem is that the id of the DeliveryPacket has to be the same on the server and client. Otherwise, there will be a with recognizing the DeliveryPacket.

Maybe it is an idea to send a 'simplePacketName' at the beginning of the DeliveryPacket which will be broken down from the real class name? Then there won't be the problem with the id 😏

Metadata

Metadata

Labels

featureNew feature which will be addedhelp wantedA fresh pair of eyes are need to view this

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions