Jump to content

📢 Please make sure to read our Style Guide before editing. For questions, suggestions, or technical issues, please contact Noah.

Module:Infobox Player

From CrabCraft Wiki
Revision as of 11:53, 21 June 2025 by Noah (talk | contribs) (Created player infobox module)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:Infobox Player/doc

local infobox = require('Module:Infobox')
local p = {}

function p.infobox(frame)
	local args = frame:getParent().args
	local playerArgs = {
		title = args.username,
		rows = 3,
		label1 = 'Season Joined',
		data1 = args.seasonjoined,
		label2 = 'Nationality',
		data2 = args.nationality,
		label3 = 'Discord',
		data3 = args.discord,
	}

	local newFrame = {
		getParent = function()
			return { args = playerArgs }
		end
	}

	return infobox.infobox(newFrame)
end

return p