Everneth / EMI-RP

0 stars 0 forks source link

Invitation System #1

Closed TptMike closed 5 years ago

TptMike commented 5 years ago

The Guild system now has creation and member addition functionality. The addition code needs an invite layer added to it so that invitees can accept or decline guild invites.

Requirements

Invites Table

In case of a shutdown or reboot, data needs to be persisted in the database and loaded in the onEnable() method

In memory hashmap

This data should be serialized and loaded into a hashmap in active memory so that it may properly resume the timeouts needed for invites to expire and so that players can be notified that they have an invite waiting when joining the game. This will be useful for sending multiple invites to the same player OR ensuring one invite is sent at a time

Roadmap

Invite class

Create

TptMike commented 5 years ago

Invites table scrapped in favor of in-memory singleton containing a hashmap of player UUIDs and a timer task to run at the end of the timer or be canceled on decline/accept. Players should be online when invited anyway.