Skip to main content

Blueprint Overview

Everything in Server Core is available from Blueprint. There are three things to know about:

WhereUsed for
Server Core subsystemServerAll admin functions and server events
ServerCore Player ComponentOn every player controllerClient side: chat, commands, announcements, admin panel
Server Core Blueprint LibraryAnywhereHelpers: player ids, durations, permissions

Getting the subsystem​

Use Get Server Core from any Blueprint that has a world context (actors, components, widgets, game mode…).

warning

Admin functions only work on the server. On a client, Is Server Core Active returns false and admin functions return Not Server. Clients talk to the server through the Player Component.

Callers​

Every admin function takes a Caller (FServerCoreCaller):

  • Make Caller (Player Controller): the action is done by that player. Permissions and group priority are checked.
  • Make System Caller (Name): the action is done by the game. No checks. The name shows up in the admin log.
Event OnCheatDetected (PlayerController)
└─ Get Server Core
└─ Ban Player
Caller: Make System Caller ("AntiCheat")
Player Id: Get Player Id (PlayerController)
Reason: "Cheat detected"
Duration Seconds: 2592000 (30 days)
Ban IP Address: true

Results​

Admin functions return EServerCoreResult:

ResultMeaning
SuccessDone
No PermissionThe caller lacks the permission
Player Not FoundThe target is not online / not known
Target ImmuneThe target has an equal or higher priority, or is the caller
Already ExistsE.g. already whitelisted
Not FoundE.g. no ban to remove
Invalid ArgumentsE.g. empty name
MutedThe sender of a chat message is muted
Not ServerCalled on a client, or Server Core is disabled
FailedSomething else went wrong

Use Result To String to get a readable message.

Function overview​

CategoryFunctions
PlayersGet Online Players, Get Player Info, Get Player Record, Find Player, Get Player Controller, Is Player Online, Get Online Player Count, Make Caller
ModerationKick Player, Ban Player, Unban Player, Is Player Banned, Get Bans, Mute Player, Unmute Player, Is Player Muted, Get Mutes
WhitelistSet Whitelist Enabled, Is Whitelist Enabled, Add To Whitelist, Remove From Whitelist, Is Player Whitelisted, Get Whitelist
PermissionsGet Groups, Get Group, Save Group, Delete Group, Set Player Group, Get Player Group, Get Player Priority, Is Owner, Has Permission, Caller Has Permission, Can Target, Get Effective Permissions, Get Staff Members
NotesAdd Player Note, Remove Player Note, Get Player Notes
CommunicationAnnounce, Send Message To Player, Broadcast Chat Message
Server ControlChange Map, Restart Server, Shutdown Server, Cancel Pending Action, Get Pending Action, Get Available Maps, Resolve Map
CommandsExecute Command, Register Command, Unregister Command, Get Commands
LogsWrite Admin Log, Get Admin Logs
DataSave All, Reload Data

Details for every function are in the API Reference.

Library functions​

FunctionDescription
Get Server CoreThe subsystem
Get Player Id (Player Controller)Unique id as a string
Get Player Id From Player State
Get Player IP Address (Player Controller)Server only
Get Server Core Player Component (Player Controller)
Make System Caller (Name)
Parse Duration (Text) → Seconds"1d12h" → 129600
Format Duration (Seconds)93784 → "1d 2h 3m"
Result To String, Action To String
Does Permission List Grant (List, Permission)Wildcard and denial matching
Get Sanction Remaining Seconds (Sanction)
Tokenize Command Line (Command Line)Splits arguments, respecting quotes