Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Salvaged from Google Cache. Created by Joshua Vanderburg.
- Arguments for McMyAdmin
- To get data from an active McMyAdmin instance, you will send a request to the
- following address:
- http://yoursite.com:8080/data.json
- It is important to note if you have "domain=+" in your mcmyadmin.conf file, you
- can use www.yoursite.com, yoursite.com or the IP address to talk to McMyAdmin.
- If you have it set, i.e. domain=yoursite.com, then you can ONLY use
- yoursite.com, NOT www.yoursite.com or the IP address.
- It should be noted that I only know how to manipulate this data in PHP and I
- will give examples for doing so. If you are using something else, it's up to
- you to find the equivalent.
- When making a request, it will be sent in the following format:
- http://yoursite.com:8080/data.json?args
- where args is the request. As I give exmples, I will only be supplying args,
- not the full website string. What is returned when you make a request is a JSON
- string. In PHP you can turn this into something useful with the function
- json_decode(); This will turn the string into a object. To get it into an array,
- you would use the function get_object_vars(); This will create a
- multi-dimensional array. It is important to note that only the first index (I
- don't know the proper names of these, but I trust you understand) becomes an
- array, go a dimension in and it is still an object.
- ---------------------------
- Requesting the status of the server
- ---------------------------
- data.json?req=status
- This is an example of the object after decoding:
- stdClass Object
- (
- [status] => 200
- [running] => 1
- [ready] => 1
- [stopping] =>
- [maxram] => 1024
- [users] => 1
- [maxusers] => 32
- [userinfo] => stdClass Object
- (
- [vanderburg] => stdClass Object
- (
- [IP] => ***.***.***.***
- [ConnectTime] => /Date(1290932397177)/
- [LastAskSource] =>
- [LastAskType] => 2
- [Name] => Vanderburg
- )
- )
- [ram] => 644
- [starttime] => 11/27/2010 8:15:12 PM
- [cpuusage] => 3
- )
- It doesn't return an IP address with *, I just did that so you can't get my
- private IP. Everything on here is fairly self-explanitory. [stopping] has no
- value because in the object it is the boolean "false". The 1s are "true". [ram]
- and [maxram] are values in megabytes. [cpuusage] is a percentage of the
- processor being used on the McMyAdmin process. [ConnectTime] appears to be
- javascript epoch notation (miliseconds since 1970 or whatever) I have not yet
- figured out what [LastAskSource] or [LastAskType] are.
- ----------------------------
- sending a message through the console
- ----------------------------
- data.json?req=sendchat&message=SOMEMESSAGE
- This does not return a string. It will send a message into the game that looks
- like "[Server]: SOMEMESSAGE". Fairly straight forward.
- ----------------------------
- Get last console message
- ----------------------------
- data.json?req=getchat&sine=TIMESTAMP
- After decode:
- stdClass Object
- (
- [status] => 200
- [chatdata] => Array
- (
- [0] => stdClass Object
- (
- [user] => CONSOLE
- [message] => Hey, guys.
- [timestamp] => Date(1293995277093)
- )
- )
- )
- McMyAdmin keeps track of approximately the last 20 messages it has. If you include
- the since parameter, it will grab all the messages it has since that time. If you
- exlude the since parameter, it will grab all the messages it has in its buffer.
- [user] is the name of who sent the message, [message] is the string that was sent.
- [timestamp] is the javascript epoch notation (miliseconds since 1970)
- ----------------------------
- Getting the McMyAdmin version
- ----------------------------
- data.json?req=versions
- After decoding:
- stdClass Object
- (
- [status] => 200
- [backend] => 0.7.6.8
- [edition] => Professional
- [mc] => 0.2.5_02
- [net] => .Net 2.0.50727.4952
- )
- [backend] is the McMyAdmin application. [edition] is your license type. [mc] is
- the Minecraft Server vesion. [net] is the version of .NET that McMyAdmin is
- running on.
- ----------------------------
- Reset your groups to default
- ----------------------------
- data.json?req=setgroupdefaults
- Does not return a string. It will clear out all your groups, remove any custom
- groups and restore all the default ones.
- ----------------------------
- Gets users in a group
- ----------------------------
- data.json?req=getgroupinfo&grp=GROUPNAME
- After decoding:
- stdClass Object
- (
- [status] => 200
- [group] => Administrators
- [members] => Array
- (
- [0] => Sinneslust
- [1] => Vanderburg
- [2] => PhonicUK
- )
- [commands] => Array
- (
- [0] => *
- [1] => kick
- [2] => ban
- [3] => ban-ip
- [4] => give
- [5] => giveme
- [6] => giveto
- [7] => summon
- [8] => lookup
- [9] => pardon
- [10] => pardon-ip
- [11] => save-all
- [12] => say
- [13] => stats
- [14] => tp
- [15] => whois
- [16] => goto
- [17] => lastseen
- [18] => ping
- )
- [inherits] =>
- [color] => b
- [level] => 0
- )
- This will return all the users in a specific group. [group] is the name of the
- group you requested. [members] are all your members for that group. This is
- already an array, indexed. [commands] are the /commands that that particular
- group has access to. This is already an array, indexed. [inherits] is a
- true/false boolean in the JSON string; 1 or null in the object. Is states
- whether it inherits groups from hMod. [color] is the colors of the text in game
- for that group. [level] is an indexed argument of the permissions it has from
- hMod.
- ------------------------------
- Get a list of the groups
- ------------------------------
- data.json?req=getgrouplist
- After decoding:
- stdClass Object
- (
- [status] => 200
- [groups] => Array
- (
- [0] => Everyone
- [1] => Regulars
- [2] => Moderators
- [3] => Administrators
- [4] => Guests
- )
- )
- [groups] is an indexed array of each group name.
- ------------------------------
- Add a group item
- ------------------------------
- data.json?req=addgroupvalue&type=TYPE&grp=GROUPVALUE&value=VALUE
- Does not return a string. If you want to add a user to a group,
- TYPE = groupmembers, grp = Everyone, Regulars, Moderators, etc, value = USERNAME.
- To add a group to the list, TYPE = groupslist, grp = group, value = GROUPNAME
- ------------------------------
- Delete a group item
- ------------------------------
- data.json?req=removegroupvalue&type=TYPElist&grp=GROUPVALUE&value=VALUE
- Does not return a string. Values are the same as above.
- ------------------------------
- Retrieve config by key.
- ------------------------------
- ANY ATTEMPT TO REQUEST OR SET A CONFIG KEY NOT LISTED HERE WILL NOT BE HONORED BY
- MCMYADMIN (e.g. maxusers, maxram, etc)
- data.json?req=getconfig&key=KEY
- Possible Keys:
- --- whitelist
- stdClass Object
- (
- [value] => none
- [status] => 200
- )
- [value] is a string declaring the type of whitelist.
- --- announceplayers
- stdClass Object
- (
- [value] => 1
- [status] => 200
- )
- [value] is a 1 or 0 (true or false) declaring whether connecting
- players are announced in game.
- --- showpermissionserror
- stdClass Object
- (
- [value] => 0
- [status] => 200
- )
- [value] is a 1 or 0 (true or false) determining if players are warned with
- "Access Denied."
- --- savewarn
- stdClass Object
- (
- [value] => 1
- [status] => 200
- )
- [value] is a 1 or 0 (true or false) declaring whether the server will warn
- you that it is saving.
- --- statusimage
- stdClass Object
- (
- [value] => 1
- [status] => 200
- )
- [value] is a 1 or 0 (true or false) declaring whether the server will
- generate an image on the status for your server.
- --- publiclist
- stdClass Object
- (
- [value] => 1
- [status] => 200
- )
- [value] is a 1 or 0 (true or false) declaring whether your server is listed
- on www.phonicuk.com/serverlist. Setting to true requires telemetry to be enabled.
- --- allowtelemetry
- stdClass Object
- (
- [value] => 1
- [status] => 200
- )
- [value] is a 1 or 0 (true or false) declaring whether your server sends back
- data on your server. Required to be on if publiclist is to be set to true.
- --- servername
- stdClass Object
- (
- [value] => Frantic Me!
- [status] => 200
- )
- [value] is a string of the title of your server.
- --- motd
- stdClass Object
- (
- [value] => Hey there, %p!\nWelcome to %s
- [status] => 200
- )
- [value] is a string of the Message of the Day. In the future, I'll include
- everything that McMyAdmin will parse.
- --- spawn-monsters
- stdClass Object
- (
- [value] => 1
- [status] => 200
- )
- [value] is a 1 or 0 (true or false) declaring whether monsters will spawn
- on your server.
- --- hellworld
- stdClass Object
- (
- [value] => 0
- [status] => 200
- )
- [value] is a 1 or 0 (true or false) declaring whether your server will
- generate hell world style chunks. This will not change existing chunks.
- --- online-mode
- stdClass Object
- (
- [value] => 0
- [status] => 200
- )
- [value] is a 1 or 0 (true or false) declaring whether your server checks
- with minecraft.net to authenticate users. If turned off, users could pose as
- administrators on your server and access their level of commands. Only set to
- false if minecraft.net is down.
- --- hmodcompat
- stdClass Object
- (
- [value] => 1
- [status] => 200
- )
- [value] is a 1 or 0 (true or false) declaring whether McMyAdmin will overwrite
- existing hMod groups and users and replace them with those defined in the Users
- and Groups of McMyAdmin.
- --- spawn-animals
- stdClass Object
- (
- [value] => 1
- [status] => 200
- )
- [value] is a 1 or 0 (true or false) declaring whether your server will spawn
- pigs, cows and chicken/duck hybrids.
- --- pvp
- stdClass Object
- (
- [value] => 1
- [status] => 200
- )
- [value] is a 1 or 0 (true or false) declaring whether players can harm each other.
- -------------------------
- Set config by key
- -------------------------
- data.json?req=setconfig&key=KEY
- Example of table:
- KEY NAME
- POSSIBLE KEY EXPLAINATION
- POSSIBLE KEY EXPLAINATION
- whitelist
- none No whitelisting
- groups Match any group
- history Historical
- lockdown Lockdown
- both Group Match + Historical
- announceplayers
- 1 True
- 0 False
- showpermissionserror
- 1 True
- 0 False
- savewarn
- 1 True
- 0 False
- statusimage
- 1 True
- 0 False
- publiclist
- 1 True
- 0 False
- allowtelemetry
- 1 True
- 0 False
- servername
- string This can be anything
- motd
- string This can be anything
- spawn-monsters
- 1 True
- 0 False
- hellworld
- 1 True
- 0 False
- online-mode
- 1 True
- 0 False
- hmodcompat
- 1 True
- 0 False
- spawn-animals
- 1 True
- 0 False
- pvp
- 1 True
- 0 False
- -------------------------
- Get McMyAdmin Schedule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement