[Poll] Need some input on this idea

Discussion in 'Plugin Development' started by bergerkiller, Aug 30, 2011.

?

Would you use such an API for your plugin?

Poll closed Sep 6, 2011.
  1. Yes! It would really increase the possibilities!

    80.0%
  2. No, please, we can easily manage these things ourselves!

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

    bergerkiller

    I have an idea and want your input about this. There are various plugins that change the text on signs; for example; show what users are online, dynamic rules, etc. What about the following:

    I make a plugin that allows 'variables' in the text of signs. For example:
    And then have these two variables automatically updated by the plugin, globally. So you could even make global messaging systems. Other plugins could hook into this plugin, setting the global variable. My plugin will then handle the changes.

    The reason I ask is that I implemented a train arrival system, but it could easily be used for other things too. It would be pretty awesome to have a 'one-for-all' system.

    If no one is interested I will simply keep this built-in in TrainCarts, so if you want it, PLEASE reply or send me a PM, or it WON'T happen.

    See my example system in action here
     
  2. Hm, why not?
    Especially if you make it efficient I can see lots of uses there.
     
  3. Offline

    bergerkiller

    Well it's more of the usability. Other plugins will require a (fixed) reference to this plugin, so I need to know how many plugin(s) (developers) will actually use such a system. I can make this easily, but to add a dependency to my own TrainCarts for a plugin no one uses, is useless. Then I rather import it into TrainCarts...

    EDIT

    Ok I am going to develop it, but it is in a single class file for now. I can always port it over into a separate plugin, so if someone requests it, I can add it. Or plugins manage these things themselves of course. :)

    EDIT2

    Here a simple example of what I mean:
    Code:
        public static class Variable {
            private String value;
            public String getValue() {
                return this.value;
            }
            public void setValue(String value) {
    
            }
            public void update() {
    
            }
    
            private ArrayList<Location> boundTo = new ArrayList<Location>();
            public class Location {
                public World world;
                public int x;
                public int y;
                public int z;
                public int startIndex;
                public int endIndex;
                public Sign sign;
            }
        }
     
  4. Looking good, still need a manager that handles updates. :p
     
  5. Offline

    bergerkiller

    @Pandemoneus True...I'll have to find a balance between variable-change as trigger and a scheduled task as trigger. I am now adding a 'changed' boolean value and one global update function. You can call this to update all changed signs simulatenously. (this to prevent 4 update calls to change 4 lines)
     
  6. Offline

    bergerkiller

    Anyone knows of a nice name for this? 'VariableSigns' and 'LinkedSigns' sound either off or simply too technic...I need something simple...
     
  7. Offline

    Jogy34

    Here are a few ideas:
    • Sign Variables
    • Program(able) Signs
    • Sign Variable Maker
    • Variables of Signs
    • %Sign%
     
  8. Offline

    imjake9

    Cool idea. As for names, SignVars and SignLink are basically what you already have, but catchier. :p Also, maybe WirelessSigns?
     
  9. Yeah, this would be useful for configuration; I have something similar in my regios plugin such as [OWNER] etc but yeah this could prove useful for admins.
     
  10. Offline

    bergerkiller

    I'm sold for SignLink, thanks @imjake9 :)
    It's short, simple and because of the S it will probably load last, also a nice benefit. :D

    Will work on this today, I'll try to add 'lists' too. (%variable on the first line of a sign, variable% on another sign on another line and then all signs in between will act as a list, will probably make it like so):
    EDIT

    Yup this sure has potential! I already made the system to display a variable on a single line of a sign...and I noticed you could easily link signs together. Then you can show huge lines, dynamically!

    ScreenShot1 (2).png

    Yup...I will and SHOULD add ticker support to this, with a default variable setting too. :)

    EDIT2

    Not only will it provide an API, it will also allow LONGER lines! This means, 15 colored chars instead of a breakdown. Ticker support is already working perfectly, now adding a raw packet sender. This means: it doesn't change the actual text. This allows me to read the variable locations at all time, reducing the data I have to store separately. This is awesome :D
     
  11. Offline

    bergerkiller

  12. I'd put that up on BukkitDev. I don't think they're checking submissions on here any more.
     
  13. Offline

    bergerkiller

    @Adamki11s true, but I don't really think it is a plugin in the first place, so yeah. xD

    Section for plugins that act as a core for other plugins?
     
  14. DEV :)
     
  15. Offline

    bergerkiller

  16. Doesn't look so bad ;)

    The thing I hate about bukkitdev is the posting, you never get much feedback.
     
  17. Offline

    bergerkiller

    Also true...

    TrainCarts page feedback: 11 pages long
    Dev page feedback: 0 messages

    Lol...without the release page I wouldn't have the valuable bug reports...
     
Thread Status:
Not open for further replies.

Share This Page