07-24-2016, 03:09 AM
Results from the hackathon: For now, no code, but we did get a few things done:
Results from a chaospad:
We were also working with a mindmap: https://www.mindmeister.com/maps/show/732187302#
Results from a chaospad:
Code:
- The LobbyAPI plugin creates a minigame folder for minigames on startup in the root of the server
- The minigame plugins in this folder are loaded on startup if the folder already exists
- The Admin has to create a seperate world for the LobbyAPI to manage all the arenas
- The Admin can create "Rooms" of each minigame by creating a sign with a specific syntax
e.g.
Line1: [Lobby]
Line2: [NameOfGame]
-- Game Timers
First Timer -> Time for players to join the game
Second Timer -> No players can join the game, players can join teams
Third Timer -> Game is about to start
Fourth timer -> deadline/time until the game ends
-- The API works by expanding upon a baseclass similar as described here: https://forum.cuberite.org/thread-2240-post-23788.html#pid23788
-- How events are handled
BaseClass = {
OnSomeEvent()
}
-- The child class can override functions from the base class including events and can call the default behavior if desired.
ChildClass = {
function OnSomeEvent()
BaseClass.OnSomeEvent(self)
-- Other logic
end
}
-- How are teams initialized
-- If teamsEnabled is false all players are on their own.
-- else teams is an array of objects containing information about the teams.
function InitializeTeams(teamsEnabled, teams, assignPlayerRandomlyOnJoin)
end
-- Initialize with teams enabled
InitializeTeams(true, {
{
visible = true,
worldInteraction = true,
color = "blue"
name = "SUPER TEAM!"
}
}
)
-- Initialize without teams enabled
InitializeTeams(false)
We were also working with a mindmap: https://www.mindmeister.com/maps/show/732187302#