Want a better Minecraft server? Read about SpigotMC here!
Separate names with a comma.
Discussion in 'Spigot Plugin Development' started by SubSide, Jun 3, 2015.
Java 7 supports diamond operators as well as other features that not only make code more beautiful, but either way I did state I didn't actually read the code thoroughly, so therefore I only noticed the non-usage of the diamond operator.
Tab chars are not okay. The tab char varies between OS's and on some OS's just plain break. Spaces not only allow cross compatibility, but also make consistency throughout OS's, rendering systems, and environments much more similar.
It's now using diamond operators.
The reason I like tabs, is so I can easily go up an indentation and down, without having to remove 4 characters xd
I don't know if there is a way to do this automatically, but oh well.
Anyway, I changed my automatic formatting (ctrl+shift+f) to change everything to spaces.
So yeah xd
Hmm. Looks like this would require a lot of boilerplate to set up a game. Lots of cyclic references in the generics. I'm not saying there is a better way to do it. I wouldn't know, as I haven't tried to find one. But personally, I wouldn't use this because of all the boilerplate code required.
The reason for this, is that it makes it possible to do like game.getPlayer(player) and it can return your gameplayer object, instead of having to cast it. And being able to do Game.createGame() to create your RunningGame object.
The initial set up is pretty annoying, but because it makes all the games that are created with it compatible (Except if you make it incompatible on purpose) with each other, is in my opinion worth it.
And I could always create 3 example classes, which people could just copy paste, so they don't have to go through all that trouble.
Btw, I think it's less than you expect
This is all you need to make it run:
That doesn't seem as bad as I initially thought.
Any more examples??
Seems good, but i use my own framework for my minigames
I did make a little spleef game with it that is publicly available: https://github.com/SubSide/Spleef
It's not 100% working, but you can see the idea.
I would love to see this frame work be built because i dont want to constantly have to create the arenas. Maybe some documentation on how to use it would be nice too. You could maybe add:
Teams and spectators are already in, teams aren't linked to the scoreboard (yet)
I'll think about those things
Would you be able to use this like one game per server for a bungeecord implementation?
Could you make a Minecraft premium account creator that uses the Protocol Lib AccountCreatePacket. Will this frame work make it not lag or not.
Sorry, not sorry
Yes, it is possible to make this a one game per server thing.
Just add the player onjoin to a game, and start it
Storing arena in config, setting up teams for it, countdown, those would make lifes easier
Well, my gameframework is just like it says, a framework for games. Arenas and such is to broad. What would you describe as an arena? just a single worldedit region? or do you have sides for teams? Do you have spawn positions that needs to be saved with it? or spectate locations? Do you need special locations where if the player touch them it will hurt them? or basically make them loose? (spleef).
Arenas is too broad, every game can have a completely different understanding of arenas. That's why I think it should be up to you to save those.