private String name; private String main; private List<String> api; private List<String> depend = new ArrayList<>(); private List<String> softDepend = new ArrayList<>(); private List<String> loadBefore = new ArrayList<>(); private String version; private Map<String, Object> commands = new HashMap<>(); private String description; private final List<String> authors = new ArrayList<>(); private String website; private String prefix; private PluginLoadOrder order = PluginLoadOrder.POSTWORLD;
其中load属性分为POSTWORLD和STARTUP,他们区别官方在注释说明了
PluginLoadOrder.java
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/** * 表示这个插件在服务器启动时就开始加载。<br> * Indicates that the plugin will be loaded at startup. * * @see cn.nukkit.plugin.PluginLoadOrder * @since Nukkit 1.0 | Nukkit API 1.0.0 */ STARTUP, /** * 表示这个插件在第一个世界加载完成后开始加载。<br> * Indicates that the plugin will be loaded after the first/default world was created. * * @see cn.nukkit.plugin.PluginLoadOrder * @since Nukkit 1.0 | Nukkit API 1.0.0 */ POSTWORLD