Giter Club home page Giter Club logo

Comments (24)

Jasonzyt avatar Jasonzyt commented on August 24, 2024

Certainly you can add an enum argument

from levilamina.

Jasonzyt avatar Jasonzyt commented on August 24, 2024

Maybe #115 can help you

from levilamina.

KocTu4eK avatar KocTu4eK commented on August 24, 2024

No, you misunderstood me. I meant no <name: type> argument, just text like "add" and "stop".

from levilamina.

Jasonzyt avatar Jasonzyt commented on August 24, 2024

argument <op: string>?

from levilamina.

KocTu4eK avatar KocTu4eK commented on August 24, 2024

for example, the camerashake command has two overloads: the first "add" and the second "stop".
"add" and "stop" do not have <op: string>, they are just text without <> and [].
image

from levilamina.

dreamguxiang avatar dreamguxiang commented on August 24, 2024

This may not be possible

from levilamina.

dreamguxiang avatar dreamguxiang commented on August 24, 2024

For example, MC's /gametest is the same,
image

from levilamina.

KocTu4eK avatar KocTu4eK commented on August 24, 2024

I hope there is a way, because without this it is impossible to beautifully implement different functionality for one team.

from levilamina.

dreamguxiang avatar dreamguxiang commented on August 24, 2024

image
this?
image

from levilamina.

dreamguxiang avatar dreamguxiang commented on August 24, 2024

image
You can refer to this paragraph

from levilamina.

KocTu4eK avatar KocTu4eK commented on August 24, 2024

yes, thanks! I'll try it now

from levilamina.

KocTu4eK avatar KocTu4eK commented on August 24, 2024

seems to work, but very strange.

here is my command:
image
image

and whatever I enter, the parser throws me on the inspect overload:
image
image

Upd: I guess the parser has priority for short commands ...

from levilamina.

dreamguxiang avatar dreamguxiang commented on August 24, 2024

With two String, BDS can't tell if it's the first or the second. This is no longer part of the LL discussion.

from levilamina.

dreamguxiang avatar dreamguxiang commented on August 24, 2024

Please use back to enum, this may also be the reason why BDS uses that method internally

Sorry I couldn't help you.

from levilamina.

KocTu4eK avatar KocTu4eK commented on August 24, 2024

thanks for trying to help.

I hope that soon it will be possible to add something like "names" to overloads, like add & stop in camerashake, etc.

from levilamina.

xiaoqch avatar xiaoqch commented on August 24, 2024

No, you misunderstood me. I meant no <name: type> argument, just text like "add" and "stop".

you should call CommandParameterData::addOptions()
for example:
image

from levilamina.

KocTu4eK avatar KocTu4eK commented on August 24, 2024

I'll now try it

from levilamina.

KocTu4eK avatar KocTu4eK commented on August 24, 2024

what is the CommandParameterOption? what heading is it in?

from levilamina.

dreamguxiang avatar dreamguxiang commented on August 24, 2024

add enum CommandParameterOption in your code

from levilamina.

KocTu4eK avatar KocTu4eK commented on August 24, 2024

ok, but it doesn't solve my current parsing problem.
or am I missing something?

from levilamina.

KawaiiNahida avatar KawaiiNahida commented on August 24, 2024
  • [TODO] BDS CommandRegistery API Docs

from levilamina.

KocTu4eK avatar KocTu4eK commented on August 24, 2024

Sorry i didn't get the gist of addOptions() yesterday.
Today I figured out what you advised me, and everything works, thanks!
I think the question can be closed (but the documentation for the CommandRegistry API will still be useful).

image

from levilamina.

dreamguxiang avatar dreamguxiang commented on August 24, 2024

Thank you for your reply. Documentation will be available as soon as possible

from levilamina.

MCBEPluginModer avatar MCBEPluginModer commented on August 24, 2024

Thank you for your reply. Documentation will be available as soon as possible

How to make the parser work adequately with different arguments in 2 overloads?
For example:
/cmd
/cmd enum
And if I enter /cmd enum, then it would choose enum, and not the first overload option?

from levilamina.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.