-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc26100
commit f45bbcc
Showing
12 changed files
with
191 additions
and
101 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package cn.apisium.nekomaid.builtin; | ||
|
||
import cn.apisium.nekomaid.NekoMaid; | ||
import org.bukkit.Server; | ||
|
||
final class Options { | ||
private static boolean canSetMaxPlayers; | ||
static { | ||
try { | ||
Server.class.getMethod("setMaxPlayers", int.class); | ||
canSetMaxPlayers = true; | ||
} catch (Throwable ignored) { } | ||
} | ||
public static void init(NekoMaid main) { | ||
if (canSetMaxPlayers) main.GLOBAL_DATA.put("canSetMaxPlayers", true); | ||
main.onConnected(main, client -> client | ||
.on("server:set", args -> main.getServer().getScheduler().runTask(main, () -> { | ||
switch ((String) args[0]) { | ||
case "maxPlayers": if (canSetMaxPlayers) main.getServer().setMaxPlayers((int) args[1]); break; | ||
case "spawnRadius": main.getServer().setSpawnRadius((int) args[1]); break; | ||
case "hasWhitelist": main.getServer().setWhitelist((boolean) args[1]); break; | ||
} | ||
}))); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule vscode-material-icon-theme
updated
from e5fcd4 to 0b40fd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.