Community Project(s)?

Discussion in 'Programming' started by NyxCode, May 3, 2017.

  1. Hey, I'm Nyx! And I'm bored. So I wanted to know if there's anyone who
    • has an (open source) project and would be happy to have people contributing to it
    • got a good idea, but doesn't want to realize it alone

    Background: I have worked on many projects, and most of them failed due to a lack of people helping. Now I want to give everyone the chance to find people here who would be happy to contribute to a project.
  2. I mean if you want to try out and give me feedback on waht I should add, I would appreciate it
  3. I'll take a look at it. When I get an idea, I'll make a pull request!
  4. You'd probably be better off just filing an issue, unless you use Kotlin ;)
  5. Of course I use kotlin and I'm proud of it :D
  6. @Redrield How about wrapping the bukkit inventory in a "GUI-class"? Then we'd only have one collection with all GUIs. Then we'd have a "GUI"-class, which stores its items (+ onClick action) itself. What do you think?

    (Imagine something like this:
  7. If you could give me an example of how people would use that, I would think about it. Though I think that perhaps profiling a method like that vs what I currently use may convince me more (If there are significant performance increases)
  8. I don't think that there will be any significant performant differences. I just think a more object oriented design would make the API more usable. Imagine some1 wants to edit an inventory after it has been created or modify items when they are clicked, etc.
  9. The original Kotlin API was designed to be more procedural than OO. I modeled it after several Kotlin DSLs that do the same thing (See Anko, TornadoFX, etc)
    • Like Like x 1
  10. Ok, I understand. Ayways, I think an API like this ( could be useful. How do you think about supporting functional and OOP style and letting the user decide which API to use?

    Oh yeah, usecase: a settings gui with buttuns which change color when clicked (thats the snippet above)
    #10 NyxCode, May 3, 2017
    Last edited: May 3, 2017
  11. Personally I'm not a fan of OO, though I will put it on the TODO list. As for functional, what do you think that would even look like?
  12. Ok. I didn't mean "functional", but "non-OO" or "procedural".
  13. The default API already acts like that?
    btw, thanks for bringing up durability, gonna add a few functions for setting durability
  14. You could change the function
    Code (Text):
    Code (Text):
    onClick(BiConsumer<Player, ItemStack>)
    Code (Text):
    onClick(BiFunction<Player, ItemStack, ItemStack>)
    so that the item can be modified when a player clicks on it.