Solved Subcommands and data storage

Discussion in 'Plugin Development' started by UnrealPowerz, Sep 27, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    UnrealPowerz

    Hi everyone,

    I'm trying to create a subcommand handler that i can just import into any project.
    So i want to be able to do this:
    Code:java
    1. registerCommand(String cmd, CommandStuffz executor, int minArgs, int maxArgs, boolean allowConsole);
    But how can i store it (String cmd, CommandStuffz executor, int minArgs, int maxArgs, boolean allowConsole) into a variable?
    A hashmap looks like an obvious choice because you can just
    put and get commands, but i have more than 1 data type.
    I want to have something like
    CMD1|executor|...
    CMD2|executor|...
    kinda table-ish but i can't find any data type that is somewhat related to this.

    Thanks,
    UnrealPowerz

    PS: Sorry for my nooby-ness
     
  2. Offline

    chasechocolate

    Look into objects (OOP).
     
    UnrealPowerz likes this.
  3. Offline

    xTrollxDudex

    UnrealPowerz and CaptainBern like this.
  4. UnrealPowerz likes this.
  5. Offline

    xTrollxDudex

  6. Offline

    xTrollxDudex

  7. xTrollxDudex Lol, surprised I do know people in real life? Haha..
    UnrealPowerz See? Told ya to look at torch of notch :p
     
  8. Offline

    UnrealPowerz

    xTrollxDudex Ermagherd, i looked at CaptainBern handler but i wanted to go a little further (minargs and stuff).
    But i think i'm gonna have a look at objects.
     
Thread Status:
Not open for further replies.

Share This Page