/Ovommand

a virion designed to parse command data for PocketMine-MP

Primary LanguagePHPGNU General Public License v3.0GPL-3.0

ovo_logo
a virion framework designed to parse command data for PocketMine-MP

READ WIKI

DEMO PLUGIN

Ovommand

NEW PROB:

  • $returnRaw in BaseResult is confusing and useless?
  • isBlockPos current do nothing in CoordinateResult
  • Enum's value can be illegally edit via outside packet

Enums system:

Soft Enum Hard Enum
Can value be read by owner? YES YES
Can value be read by other? (Public) YES YES
Can value be read by other? (Private) NO NO
Can value be written by owner? (Before server starts) YES YES
Can value be written by others? (Private) NO NO
Can value be written by others? (Before server starts, not Protected) YES YES
Can value be written by owner? (After server starts) YES NO
Can value be written by others? (After server starts, not Protected) YES NO
Can value be written by others? (Before server starts, Protected) NO NO
Can value be written by others? (After server starts, Protected) NO NO
Can alias be written by owner? (Before server starts) YES YES
Can alias be written by owner? (After server starts) YES NO
Can alias be written by others? (Before server starts, not Protected) YES YES
Can alias be written by others? (Before server starts, Protected) NO NO
Can alias be written by others? (After server starts, not Protected) YES NO
Can alias be written by others? (After server starts, Protected) NO NO
Show useless dumps

TODO:

  • make reasonable enum that handle it value correctly (string -> value)
  • custom enum, parameters, enum-based parameters
  • feature rich
  • usage messages
  • result system (parser), not that good tho :l
  • attribute supports (temp abandoned)
  • SubCommand doesn't require perms if wanted
  • make syntax parser based on its string pos, not the string itself for the accuracy in catching broken syntax spoiled
  • fix a bug where the parser cannot check the correct span leading to this to be valid: /tp ~~~ a, where a is not valid but the parser cannot know that because it don't expect that to be a case!
  • fix broken SYNTAX_PRINT_VANILLA
  • fix an issue where it failed to parse the parameter after position parameter that has less than the span! eg: ~~~ a, failed to parse a

Suggest:

  • make canParse and parse into one
  • empty parameter functionality
  • allow parameter to not provide data to the ingame auto-complete
  • make overloadId global which will make the code shorter
  • template? (temp abandoned)
  • move part of Ovommand to BaseCommand
  • do subCommand even need description?
  • more features to the syntax parser
  • rename parsedId & matchedId in Results to rawParsedCount & parsedCount

Discuss:

  • Default Enums should have its own register and a version checker!? (temp abandoned)
  • the problem with shared data is that if other plugins try to use other plugins enum... the enum might not exist due to plugin loading order!
  • Default enums can have duplicated values if the event called more than twice on different plugins!
  • Merge onRun() and onSyntaxError()?
  • Add supports for private enums and synced properties for soft enums

Self note:

  • Soft enums cannot spread out its value using flag 1!
  • Two enums, one soft and one hard could have a same name
  • Enum name could be set to anything, not just ascii / UTF-8

❌ ✔️ ✅

checked unchecked crossed
_

ovo_warning
This project is under construction....