You are viewing an older version of the site. Click here to view
the latest version of this page. (This may be a dead link, if so, try the root page of the docs
here.)
== get_server_info ==
[[../objects/ms.lang.RangeException|ms.lang.RangeException]]
[[../objects/ms.lang.NotFoundException|ms.lang.NotFoundException]] |- ! scope="row" | Since | 3.3.1 |- ! scope="row" | Restricted |
Returns various information about server.If value is set, it should be an integer of one of the following indexes, and only that information for that index will be returned.
=== Vital Info ===
{| style="width: 40%;" cellspacing="1" cellpadding="1" border="1" class="wikitable"
|-
! scope="col" width="20%" |
! scope="col" width="80%" |
|-
! scope="row" | Name
| get_server_info
|-
! scope="row" | Returns
| mixed
|-
! scope="row" | Usages
| [value]
|-
! scope="row" | Throws
| [[../objects/ms.lang.CastException|ms.lang.CastException]][[../objects/ms.lang.RangeException|ms.lang.RangeException]]
[[../objects/ms.lang.NotFoundException|ms.lang.NotFoundException]] |- ! scope="row" | Since | 3.3.1 |- ! scope="row" | Restricted |
No
|-
! scope="row" | Optimizations
| None
|}Otherwise if value is not specified (or is -1), it returns an array of information with the following pieces of information in the specified index:
=== Usages ===
- 0 - Empty.
- 1 - API version; The version of the plugin API this server is implementing.
- 2 - Server version; The bare version string of the server implementation.
- 3 - Allow flight; If true, Minecraft's inbuilt anti fly check is disabled.
- 4 - Allow nether; is true, the Nether dimension is enabled
- 5 - Allow end; if true, the End is enabled
- 6 - World container; The path to the world container.
- 7 - Max player limit; returns the player limit.
- 8 - Operators; An array of operators on the server.
- 9 - Plugins; An array of plugins loaded by the server.
- 10 - Online Mode; If true, users are authenticated with Mojang before login
- 11 - Server port; Get the game port that the server runs on
- 12 - Server IP; Get the IP that the server runs on
- 13 - Uptime; The number of milliseconds the server has been running
- 14 - gcmax; The maximum amount of memory that the Java virtual machine will attempt to use, in bytes
- 15 - gctotal; The total amount of memory in the Java virtual machine, in bytes
- 16 - gcfree; The amount of free memory in the Java Virtual Machine, in bytes
- 17 - MOTD; The message displayed on the server list.
get_server_info([value])=== Examples === Sorry, there are no examples for this function! :(
Find a bug in this page? Edit this page yourself, then submit a pull request. (Note this page is automatically generated from the documentation in the source code.)