Attempts to set the Server singleton. This cannot be done if the Server is already set. @param server Server instance
(Server server)
| 46 | * @param server Server instance |
| 47 | */ |
| 48 | public static void setServer(Server server) { |
| 49 | if (Bukkit.server != null) { |
| 50 | throw new UnsupportedOperationException("Cannot redefine singleton Server"); |
| 51 | } |
| 52 | |
| 53 | Bukkit.server = server; |
| 54 | server.getLogger().info("This server is running " + getName() + " version " + getVersion()); |
| 55 | } |
| 56 | |
| 57 | public static String getName() { |
| 58 | return server.getName(); |
nothing calls this directly
no test coverage detected