Package de.jcm.discordgamesdk
Class CreateParams
java.lang.Object
de.jcm.discordgamesdk.CreateParams
- All Implemented Interfaces:
AutoCloseable
Initial parameters to create a
Core
from.- See Also:
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Deprecated.long
Gets the application/client ID.static long
Gets the default flags for new Cores.long
getFlags()
Gets the flags set for the Core.void
registerEventHandler
(DiscordEventAdapter eventHandler) Registers an event handler to later receive events from the created Core.void
setClientID
(long id) Sets the application/client ID.void
setFlags
(long flags) Sets flags for the Core.void
setFlags
(CreateParams.Flags... flags) Sets flags for the Core.
-
Constructor Details
-
CreateParams
public CreateParams()Create the CreateParams.
-
-
Method Details
-
setClientID
public void setClientID(long id) Sets the application/client ID.- Parameters:
id
- Application/client ID.
-
getClientID
public long getClientID()Gets the application/client ID.- Returns:
- Application/client ID.
-
setFlags
Sets flags for the Core.- Parameters:
flags
- Flags to initialize the Core with.- See Also:
-
setFlags
public void setFlags(long flags) Sets flags for the Core.- Parameters:
flags
- Flags to initialize the Core with.- See Also:
-
getFlags
public long getFlags()Gets the flags set for the Core.Use
CreateParams.Flags.fromLong(long)
to convert this to an array of flags.- Returns:
- Flags that have been set.
- See Also:
-
registerEventHandler
Registers an event handler to later receive events from the created Core.- Parameters:
eventHandler
- An EventHandler
-
getDefaultFlags
public static long getDefaultFlags()Gets the default flags for new Cores.- Returns:
- The default flags.
-
close
Deprecated.No operation, only kept for backwards compatibility- Specified by:
close
in interfaceAutoCloseable
-