You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/com/flowpowered/api/Engine.java
+12-15Lines changed: 12 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -23,51 +23,45 @@
23
23
*/
24
24
packagecom.flowpowered.api;
25
25
26
+
importjavax.annotation.Nullable;
27
+
26
28
importorg.apache.logging.log4j.Logger;
27
29
28
-
importcom.flowpowered.commons.Named;
29
-
importcom.flowpowered.events.EventManager;
30
-
importcom.flowpowered.filesystem.FileSystem;
31
30
importcom.flowpowered.api.geo.WorldManager;
31
+
importcom.flowpowered.api.plugins.FlowContext;
32
32
importcom.flowpowered.api.scheduler.Scheduler;
33
+
importcom.flowpowered.events.EventManager;
34
+
importcom.flowpowered.filesystem.FileSystem;
33
35
importcom.flowpowered.plugins.PluginManager;
34
36
35
37
/**
36
38
* Represents the core of an implementation of an engine (powers a game).
37
39
*/
38
-
publicinterfaceEngineextendsNamed{
40
+
publicinterfaceEngine {
39
41
40
42
/**
41
43
* Gets the version.
42
44
*
43
45
* @return build version
44
46
*/
45
47
StringgetVersion();
46
-
47
-
PlatformgetPlatform();
48
48
49
49
LoggergetLogger();
50
50
51
-
/**
52
-
* Ends this engine instance safely. All worlds, players, and configuration data is saved, and all threads are ended cleanly.<br/> <br/> Players will be sent a default disconnect message.
53
-
*
54
-
* @return true for for the first stop
55
-
*/
56
-
booleanstop();
57
-
58
51
/**
59
52
* Ends this engine instance safely. All worlds, players, and configuration data is saved, and all threads are ended cleanly. <br/> If any players are connected, will kick them with the given reason.
60
53
*
61
54
* @param reason for stopping the game instance
62
55
* @return true for for the first stop
63
56
*/
64
-
booleanstop(Stringreason);
57
+
booleanstop(@NullableStringreason);
65
58
66
59
/**
67
60
* Returns true if the game is running in debug mode <br/> <br/> To start debug mode, start Flow with -debug
68
61
*
69
62
* @return true if server is started with the -debug flag, false if not
70
63
*/
64
+
// TODO: move to Configuration or something
71
65
booleandebugMode();
72
66
73
67
SchedulergetScheduler();
@@ -89,5 +83,8 @@ public interface Engine extends Named {
@@ -56,38 +55,31 @@ public abstract class MaterialRegistry {
56
55
}
57
56
}
58
57
59
-
/**
60
-
* Sets up the material registry for its first use. May not be called more than once.<br/> This attempts to load the materials.dat file from the 'worlds' directory into memory.<br/>
61
-
*
62
-
* Can throw an {@link IllegalStateException} if the material registry has already been setup.
63
-
*
64
-
* @return StringToUniqueIntegerMap of registered materials
0 commit comments