Skip to content

Proposal: Extract packets and events into their own library #2

@johnbanq

Description

@johnbanq

We now have like 10 mods in this repo,and stuff like packet sending & handling,player & world events are just basically lying around in modules that uses them,so why not aggregate them into a single library?
like chai_packets & chai_events.

This allows us to add things easier and know where to look for what we need

Pros

  • more organized codebase, easier to find API
  • aggregate places that "breaks" after MC updates

Cons

  • breaks existing plugins <- reason I am posting this as a issue instead of working on a fork then PR
  • will need ways to compile a module with dependency to other modules

PS: if this got accepted,what about packing modules into namespaces on the chaiscript side?
from onPlayerJoined to events.player.onJoined
from sendTextPacket to packets.sendTextPacket (or just packets.send with a overload)

PSS: This is more like a asking for permission than asking for change,because I thought I should ask before working on changes that breaks the API :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions