Someone PLEASE HELP!!!!!! (jsonapi)
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
4 posts
Page 1 of 1
Hello I am working on a large project that requires the jsonapi to work
I am using the following code to connect to my server to rerive the info I
need.
I am using the following code to connect to my server to rerive the info I
need.
Code: Select all
Now its giving me a 404 not found error yet if you look in the code box bellow here is all the methords that I have set in the config and they work from my iphone app. Imports JsonExSerializer
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports com.ramblingwood.minecraft.jsonapi
Imports System.Collections
Imports System.Security.Cryptography
Imports System.IO
Imports System.Net
Public Class ServerMaintainer
Private Sub ServerMaintainer_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Main.WindowState = FormWindowState.Normal
End Sub
#Region "Server conection"
Private host As String
Private port As Integer
Private username As String
Private password As String
Private salt As String
Private ser As New Serializer(GetType(ArrayList))
Private deser As New Serializer(GetType(Dictionary(Of Object, Object)))
Private urlFormat_call As String = "http://{0}:{1}/api/call?method={2}&args={3}&key={4}"
Private urlFormat_callMultiple As String = "http:/{0}:{1}/api/call-multiple?method={2}&args={3}&key={4}"
Public Sub server(ByVal host As String, ByVal port As Integer, ByVal username As String, ByVal password As String, ByVal salt As String)
Me.host = "69.25.207.91"
Me.port = "20061"
Me.username = "richardjmanning"
Me.password = "password234"
Me.salt = "hello"
ser.Config.OutputTypeComment = False
ser.Config.IsCompact = True
deser.Config.OutputTypeComment = False
deser.Config.IsCompact = True
End Sub
Public Function createKey(ByVal methods As IEnumerable) As String
Dim method_json As String = ToJSON(methods)
Return sha256(username & method_json & password & salt)
End Function
Public Function createKey(ByVal method As String) As String
Return sha256(username & method & password & salt)
End Function
Public Function makeURL(ByVal method As String, ByVal args As IEnumerable) As Uri
Return New Uri([String].Format(urlFormat_call, host, port, Uri.EscapeUriString(method), Uri.EscapeUriString(ToJSON(args)), createKey(method)))
End Function
Public Function makeURLMultiple(ByVal methods As IEnumerable, ByVal args As IEnumerable) As Uri
Return New Uri([String].Format(urlFormat_callMultiple, host, port, Uri.EscapeUriString(ToJSON(methods)), Uri.EscapeUriString(ToJSON(args)), createKey(methods)))
End Function
Public Function [call](ByVal method As String, ByVal args As IEnumerable) As Dictionary(Of Object, Object)
Dim url As Uri = makeURL(method, args)
Dim c As New WebClient()
Dim s As Stream = c.OpenRead(url)
Dim r As New StreamReader(s)
Return DirectCast(deser.Deserialize(r.ReadToEnd()), Dictionary(Of Object, Object))
End Function
Public Function [call](ByVal method As IEnumerable, ByVal args As IEnumerable) As Dictionary(Of Object, Object)
Return callMultiple(method, args)
End Function
Public Function callMultiple(ByVal methods As IEnumerable, ByVal args As IEnumerable) As Dictionary(Of Object, Object)
Dim url As Uri = makeURLMultiple(methods, args)
Dim c As New WebClient()
Dim s As Stream = c.OpenRead(url)
Dim r As New StreamReader(s)
Return DirectCast(deser.Deserialize(r.ReadToEnd()), Dictionary(Of Object, Object))
End Function
Private Function sha256(ByVal input As String) As String
Dim hash As New SHA256Managed()
Dim hashed As Byte() = hash.ComputeHash(Encoding.UTF8.GetBytes(input))
Return BitConverter.ToString(hashed).Replace("-", "").ToLower()
End Function
Public Function ToJSON(ByVal obj As Object) As String
Return ser.Serialize(obj)
End Function
#End Region
Private Sub ServerMaintainer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim j As New JSONAPI("69.25.207.91", 20061, "richardjmanning", "password234", "hello")
Dim arr As New ArrayList()
arr.Add("alefcgorge")
arr.Add("test")
Dim result As Dictionary(Of Object, Object) = j.[call]("this.getWorldNames()", arr)
Console.ReadLine()
Console.WriteLine(result("result"))
If result(result("result")) IsNot Nothing AndAlso result(result("result")).ToString() <> "null" Then
For Each o As Object In DirectCast(result(result("result")), ArrayList)
For Each key As Object In DirectCast(o, Hashtable).Keys
Console.WriteLine((Convert.ToString(key) & ":") + DirectCast(o, Hashtable)(key))
Next
Next
End If
Console.ReadLine()
End Sub
End Class
Code: Select all
is anyone able to help PLEASE{
"name" : "JSONAPI standard",
"namespace" : "",
"depends" : [
"JSONAPI"
],
"methods" : [
{
"name": "getPlayerLimit",
"desc": "Gets the maximum amount of players allowed on the server.",
"returns": ["int", "The player limit."],
"call": "Server.getMaxPlayers()"
},
{
"name": "getServerVersion",
"desc": "Gets the version string of this server implementation.",
"returns": ["String", "A string representing the version."],
"call": "Server.getVersion()"
},
{
"name": "getBukkitVersion",
"desc": "Gets the Bukkit version that this server is running.",
"returns": ["String", "A string representing the version."],
"call": "Server.getBukkitVersion()"
},
{
"name": "getPluginVersion",
"desc": "Gets version of a plugin.",
"returns": ["String", "A string representing the version."],
"call": "Server.getPluginManager().getPlugin(0).getDescription().getVersion()",
"flags": [
"FALSE_ON_EXCEPTION"
],
"args": [
["String","Plugin name"]
]
},
{
"name": "getPlayer",
"desc": "Gets a |player| object representing the specified person.",
"returns": ["Player", "A player object respresenting the specified person."],
"call": "this.getPlayerExact(0)",
"args": [
["String","Player name"]
]
},
{
"name": "getOfflinePlayer",
"desc": "Gets an offlinePlayer object representing the specified person.",
"returns": ["OfflinePlayer", "A offlinePlayer object respresenting the specified person."],
"call": "Server.getOfflinePlayer(0)",
"args": [
["String","Player name"]
]
},
{
"name": "givePlayerItem",
"desc": "Gives the specified player the specified quanity of the item id by placing it in the first empty slot.",
"call": "this.giveItem(0, 1, 2)",
"returns": ["boolean", "True if the item was given. False will be returned if the player is not on the server."],
"args": [
["String","Player's name"],
["int","Id of item to give"],
["int","Quantity of item to give"]
]
},
{
"name": "givePlayerItemWithData",
"desc": "Gives the specified player the specified quanity of the item id with the specified data by placing it in the first empty slot.",
"call": "this.giveItem(0, 1, 2, 3)",
"returns": ["boolean", "True if the item was given. False will be returned if the player is not on the server. An exception could be throw for invalid data (data < 0 or data > 15)."],
"args": [
["String","Player's name"],
["int","Id of item to give"],
["int","Quantity of item to give"],
["int","Decimal representation of the data value."]
]
},
{
"name": "givePlayerItemDrop",
"desc": "Gives the specified player the specified quanity of the item id by dropping it in front of them.",
"returns": ["boolean", "True if the item was given. False will be returned if the player is not on the server."],
"call": "this.giveItemDrop(0, 1, 2)",
"args": [
["String", "Players' name"],
["int", "Id of item to drop"],
["int", "Quantity of item to drop"]
]
},
{
"name": "givePlayerItemDropWithData",
"desc": "Gives the specified player the specified quanity of the item id with the specified data by dropping it in front of them.",
"call": "this.giveItemDrop(0, 1, 2, 3)",
"returns": ["boolean", "True if the item was given. False will be returned if the player is not on the server. An exception could be throw for invalid data (data < 0 or data > 15)."],
"args": [
["String","Player's name"],
["int","Id of item to give"],
["int","Quantity of item to give"],
["int","Decimal representation of the data value."]
]
},
{
"name": "getPlayers",
"desc": "Gets an array of |player| objects that represent all of the players on the server.",
"returns": ["Player[]", "An array of |Player| objects"],
"call": "Server.getOnlinePlayers()"
},
{
"name": "setPlayerInventorySlotWithDamage",
"desc": "Sets the specified slot in the specified player's inventory to the specified type with the specified quantity and damage.",
"call": "this.setPlayerInventorySlot(0, 1, 2, 3, 4)",
"returns": ["boolean", "True if the item was given. False will be returned if the player is not on the server."],
"args": [
["String", "Player's name"],
["int", "Slot number"],
["int", "Id of block type to set"],
["int", "The damage of the item."],
["int", "Quantity to set"]
]
},
{
"name": "setPlayerInventorySlotWithDataAndDamage",
"desc": "Sets the specified slot in the specified player's inventory to the specified type with the specified data, quantity and damage.",
"call": "this.setPlayerInventorySlotWithDataAndDamage(0, 1, 2, 3, 4, 5)",
"returns": ["boolean", "True if the item was given. False will be returned if the player is not on the server."],
"args": [
["String", "Player's name"],
["int", "Slot number"],
["int", "Id of block type to set"],
["int", "The data of the item."],
["int", "The damage of the item."],
["int", "Quantity to set"]
]
},
{
"name": "addEnchantmentToPlayerInventorySlot",
"desc": "Adds an enchantment to the specified slot in the specified player's inventory with the specified level.",
"call": "this.addEnchantmentToPlayerInventorySlot(0, 1, 2, 3)",
"returns": ["boolean", "True if the enchanting process was successful. False is usually the restult will be returned if the player is not on the server."],
"args": [
["String", "Player's name"],
["int", "Slot number"],
["int", "The enchantment ID (EID): http://www.minecraftwiki.net/wiki/Enchanting#Enchantment_Types"],
["int", "The enchantment level"]
]
},
{
"name": "addEnchantmentsToPlayerInventorySlot",
"desc": "Adds an enchantment to the specified slot in the specified player's inventory with the specified level.",
"call": "this.addEnchantmentsToPlayerInventorySlot(0, 1, 2)",
"returns": ["boolean", "True if the enchanting process was successful. False is usually the restult will be returned if the player is not on the server."],
"args": [
["String", "Player's name"],
["int", "Slot number"],
["Object[]", "Array of {enchantment: 0, level: 1}-esque objects where enchantment is the EID-value from here: http://www.minecraftwiki.net/wiki/Enchanting#Enchantment_Types"]
]
},
{
"name": "removeEnchantmentsFromPlayerInventorySlot",
"desc": "Removes an enchantment to the specified slot in the specified player's inventory with the specified level.",
"call": "this.removeEnchantmentsFromPlayerInventorySlot(0, 1, 2)",
"returns": ["boolean", "True if the de-enchanting process was successful. False is usually the restult will be returned if the player is not on the server."],
"args": [
["String", "Player's name"],
["int", "Slot number"],
["Object[]", "Array of EID-values from here: http://www.minecraftwiki.net/wiki/Enchanting#Enchantment_Types"]
]
},
{
"name": "setPlayerInventorySlotWithDataDamageAndEnchantments",
"desc": "Sets the specified slot in the specified player's inventory to the specified type with the specified data, quantity and damage.",
"call": "this.setPlayerInventorySlotWithDataDamageAndEnchantments(0, 1, 2, 3, 4, 5, 6)",
"returns": ["boolean", "True if the item was given. False will be returned if the player is not on the server."],
"args": [
["String", "Player's name"],
["int", "Slot number"],
["int", "Id of block type to set"],
["int", "The data of the item."],
["int", "The damage of the item."],
["int", "Quantity to set"],
["Object[]", "Array of {enchantment: 0, level: 1}-esque objects where enchantment is the EID-value from here: http://www.minecraftwiki.net/wiki/Enchanting#Enchantment_Types"]
]
},
{
"name": "setPlayerInventorySlotWithData",
"desc": "Sets the specified slot in the specified player's inventory to the specified type with the specified data and damage.",
"call": "this.setPlayerInventorySlotWithData(0, 1, 2, 3, 4)",
"returns": ["boolean", "True if the item was given. False will be returned if the player is not on the server."],
"args": [
["String", "Player's name"],
["int", "Slot number"],
["int", "Id of block type to set"],
["int", "The data of the item."],
["int", "Quantity to set"]
]
},
{
"name": "clearPlayerInventorySlot",
"desc": "Removes everything from the specified slot in the player's inventory.",
"call": "this.clearPlayerInventorySlot(0, 1)",
"returns": ["boolean", "True if the slot was cleared. False will be returned if the player is not on the server."],
"args": [
["String", "Player's name"],
["int", "Slot number"]
]
},
{
"name": "updatePlayerInventorySlot",
"desc": "Changes the number of items in a player's inventory slot.",
"call": "this.updatePlayerInventorySlot(0, 1, 2)",
"returns": ["boolean", "True if the slot was update. False will be returned if the player is not on the server."],
"args": [
["String", "Player's name"],
["int", "Slot number"],
["int", "New amount"]
]
},
{
"name": "setPlayerInventorySlot",
"desc": "Sets the specified slot in the specified player's inventory to the specified type with the specified quantity.",
"call": "this.setPlayerInventorySlot(0, 1, 2, 3)",
"returns": ["boolean", "True if the item was given. False will be returned if the player is not on the server."],
"args": [
["String", "Player's name"],
["int", "Slot number"],
["int", "Id of block type to set"],
["int", "Quantity to set"]
]
},
{
"name": "removePlayerInventoryItem",
"desc": "Removes all items of the given type from the given player's inventory.",
"returns": ["Object", "An object of all the things that couldn't be removed. This shouldn't happen though. Null will be returned if the player is not on the server."],
"call": "this.removePlayerInventoryItem(0, 1)",
"args": [
["String", "Player's name"],
["int", "Id of block type to remove"]
]
},
{
"name": "addToWhitelist",
"desc": "Adds the specified player to the whitelist.",
"call": "this.whitelist(0)",
"args": [
["String", "The name of the player to be added to the whitelist"]
]
},
{
"name": "removeFromWhitelist",
"desc": "Removes the specified player from the whitelist.",
"call": "this.unwhitelist(0)",
"args": [
["String", "The name of the player to be removed from the whitelist"]
]
},
{
"name": "opPlayer",
"desc": "Ops the specified player.",
"call": "this.op(0)",
"args": [
["String", "The name of the player to be opped."]
]
},
{
"name": "deopPlayer",
"desc": "Deops the specified player.",
"call": "this.deop(0)",
"args": [
["String", "The name of the player to be deopped."]
]
},
{
"name": "ban",
"desc": "Bans the specified player.",
"call": "this.ban(0)",
"args": [
["String", "The name of the player to be banned."]
]
},
{
"name": "banWithReason",
"desc": "Bans the specified player with the specified reason.",
"call": "this.banWithReason(0, 1)",
"returns": ["boolean", "Returns true if the player was banned while online; false if the player was offline when he/she was banned."],
"args": [
["String", "The name of the player to be banned."],
["String", "The reason the player is being banned."]
]
},
{
"name": "unban",
"desc": "Unbans the specified player.",
"call": "this.unban(0)",
"args": [
["String", "The name of the player to be unbanned."]
]
},
{
"name": "banIP",
"desc": "Bans the specified IP.",
"call": "Server.banIP(0)",
"args": [
["String", "The IP to be banned."]
]
},
{
"name": "unbanIP",
"desc": "Bans the specified IP.",
"call": "Server.unbanIP(0)",
"args": [
["String", "The IP to be unbanned."]
]
},
{
"name": "teleport",
"desc": "Teleports the first specified player to the second specified player.",
"call": "this.teleport(0, 1)",
"returns": "Returns true if player one was successfully teleported. False if one or more players is offline.",
"flags": [
"FALSE_ON_EXCEPTION"
],
"args": [
["String", "The name of the player to be teleported."],
["String", "The name of the player to teleport to."]
]
},
{
"name": "saveMap",
"desc": "Saves the map to the filesystem.",
"call": "this.runCommand(\"save-all\")"
},
{
"name": "saveOff",
"desc": "Disables automatic terrian saving.",
"call": "this.runCommand(\"save-off\")"
},
{
"name": "saveOn",
"desc": "Enables automatic terrian saving.",
"call": "this.runCommand(\"save-on\")"
},
{
"name": "runConsoleCommand",
"desc": "Runs a command in the console.",
"call": "this.runCommand(0)",
"args": [
["String", "Command to send"]
]
},
{
"name": "reloadServer",
"desc": "Reloads the server, refreshing settings and plugin information.",
"call": "Server.reload()"
},
{
"name": "getWorld",
"desc": "Gets the |world| object with the given name.",
"returns": ["World", "The world with the given name."],
"call": "Server.getWorld(0)",
"args": [
["String", "Name of the world to get"]
]
},
{
"name": "getWorlds",
"desc": "Gets an array of all the |world| objects on the server.",
"returns": ["World[]", "All of the worlds on the server."],
"call": "Server.getWorlds()"
},
{
"name": "getWorldNames",
"desc": "Gets an array of all the world names on the server.",
"returns": ["String[]", "All of the names of the worlds on the server."],
"call": "this.getWorldNames()"
},
{
"name": "kickPlayer",
"desc": "Kick a player with the specified name and the optional message.",
"call": "Server.getPlayer(0).kickPlayer(1)",
"args": [
["String", "Name of player to kick"],
["String", "Custom message to display to the player after they are kicked"]
]
},
{
"name": "sendMessage",
"desc": "Send a private message to the specified player.",
"call": "Server.getPlayer(0).sendMessage(1)",
"flags": [
"NO_EXCEPTIONS"
],
"args": [
["String", "Player to whom the message is sent"],
["String", "The message to send"]
]
},
{
"name": "broadcast",
"desc": "Send a message to every player on the server.",
"returns": ["int", "The number of players the message was broadcast to."],
"call": "this.broadcastMessage(0)",
"args": [
["String", "The message to broadcast"]
]
},
{
"name": "getPlugins",
"desc": "Gets an array of all loaded plugins.",
"returns": ["Plugin[]", "An array of |plugin| objects."],
"call": "Server.getPluginManager().getPlugins()"
},
{
"name": "getPlugin",
"desc": "Gets the |plugin| object for the plugin with the given name.",
"returns": ["Plugin", "The specified plugin."],
"call": "Server.getPluginManager().getPlugin(0)",
"args": [
["String", "The name of the plugin to fetch"]
]
},
{
"name": "enablePlugin",
"desc": "Enables the specified plugin. Attempting to enable a plugin that is already enabled will have no effect.",
"returns": ["boolean", "True if the plugin was enabled. False will be returned if the plugin is not on the server."],
"call": "this.enablePlugin(0)",
"args": [
["String", "The name of the plugin to enable"]
]
},
{
"name": "disablePlugin",
"desc": "Disables the specified plugin. Attempting to disable a plugin that is not enabled will have no effect.",
"returns": ["boolean", "True if the plugin was disabled. False will be returned if the plugin is not on the server."],
"call": "this.disablePlugin(0)",
"args": [
["String", "The name of the plugin to disable"]
]
},
{
"name": "disablePlugins",
"desc": "Disables all plugins on the server.",
"call": "Server.getPluginManager().disablePlugins()"
},
{
"name": "getFileContents",
"desc": "Gets the contents of the specified file. The file path is relative to the folder that the craftbukkit jar is in.",
"returns": ["String", "The file's contents."],
"call": "this.getFileContents(0)",
"args": [
["String", "The name of the file to read."]
]
},
{
"name": "deleteFileOrFolder",
"desc": "Deletes the specified file or folder.",
"returns": ["boolean", "True if successful, false otherwise."],
"call": "this.deleteFileOrFolder(0)",
"args": [
["String", "The path to the file or folder relative to the server root."]
]
},
{
"name": "renameFileOrFolder",
"desc": "Renames the specified file or folder.",
"returns": ["boolean", "True if successful, false otherwise."],
"call": "this.renameFileOrFolder(0,1)",
"args": [
["String", "The old path to the file or folder relative to the server root."],
["String", "The new path to the file or folder relative to the server root."]
]
},
{
"name": "getBinaryFileBase64",
"desc": "Gets the binary contents of the specified file encoded in base64. The file path is relative to the folder that the craftbukkit jar is in.",
"returns": ["String", "The file's contents."],
"call": "this.getFileBinaryBase64(0)",
"args": [
["String", "The name of the file to read."]
]
},
{
"name": "setFileContents",
"desc": "Sets (not appends to) the contents of the specified file. The file path is relative to the folder that the craftbukkit jar is in.",
"call": "this.setFileContents(0, 1)",
"returns": ["boolean", "True if call succeeded. False will never be returned, instead an exception will be thrown and the call will not return as successful. This will occur if the specified file does not exist."],
"args": [
["String", "The name of the file to read."],
["String", "The content to put in the file."]
]
},
{
"name": "setFileBinaryBase64",
"desc": "Sets (not appends to) the contents of the specified binary file. The file path is relative to the folder that the craftbukkit jar is in. The second argument is base64 decoded and then set as the file's contents.",
"call": "this.setFileBinaryBase64(0, 1)",
"returns": ["boolean", "True if call succeeded. False will never be returned, instead an exception will be thrown and the call will not return as successful. This will occur if the specified file does not exist."],
"args": [
["String", "The name of the file to read."],
["String", "The base64 encoded content to put in the file."]
]
},
{
"name": "appendToFile",
"desc": "Appends to the contents of the specified file. The file path is relative to the folder that the craftbukkit jar is in.",
"call": "this.appendFileContents(0, 1)",
"returns": ["boolean", "True if call succeeded. False will never be returned, instead an exception will be thrown and the call will not return as successful. This will occur if the specified file does not exist."],
"args": [
["String", "The name of the file to read."],
["String", "The content to append to the file."]
]
},
{
"name": "editPropertiesFile",
"desc": "Sets the specified key of the specified file to the specified value with the specified type. The file path is relative to the folder that the craftbukkit jar is in.",
"call": "this.editPropertiesFile(0,1,2,3)",
"returns": ["boolean", "True if call succeeded. False will never be returned, instead an exception will be thrown and the call will not return as successful. This will occur if the specified file does not exist."],
"args": [
["String", "The name of the .properties file to edit WITHOUT the extentions. (server, not server.properties)"],
["String", "The type of value. Options are boolean, long, int, string and double."],
["String", "The key that will have value set to it."],
["String", "The value to set key to as A STRING. This means that true will be come \"true\" and 1.5 will become \"1.5\"."]
]
},
{
"name": "getPropertiesFile",
"desc": "Gets a key value set for the specified properties file. The file path is relative to the folder that the craftbukkit jar is in.",
"call": "this.getPropertiesFile(0)",
"returns": ["Object", "A key value set for the specified properties file."],
"args": [
["String", "The name of the properties file to read."]
]
},
{
"name": "getWhitelist",
"desc": "Gets the players on the whitelist.",
"returns": ["String[]", "Returns an array of strings; where each item in the array is a string that contains a player's name."],
"call": "this.getWhitelist()"
},
{
"name": "getOpList",
"desc": "Gets the players who are opped.",
"returns": ["String[]", "Returns an array of strings; where each item in the array is a string that contains a player's name."],
"call": "this.opList()"
},
{
"name": "getServerPort",
"desc": "Get the game port that the server runs on.",
"returns": ["int", "The port"],
"call": "Server.getPort()"
},
{
"name": "getServer",
"desc": "Gets server information: maxPlayers, players, port, name, serverName, version, worlds.",
"returns": ["Object", "Key value object with information about the server."],
"call": "this.getServer()"
},
{
"name": "getMotd",
"desc": "Gets server's MOTD",
"returns": ["String", "The MOTD"],
"call": "Server.getMotd()"
},
{
"name": "getServerIp",
"desc": "Get the IP that this server is bound to or empty string if not specified.",
"returns": ["String", "The IP"],
"call": "Server.getIp()"
},
{
"name": "getBannedPlayers",
"desc": "Gets the players on the ban list.",
"returns": ["String[]", "Returns an array of strings; where each item in the array is a string that contains a player's name."],
"call": "this.getBannedPlayers()"
},
{
"name": "getBannedIPs",
"desc": "Gets the IPs on the ban list.",
"returns": ["String[]", "Returns an array of strings; where each item in the array is a string that contains an IP address."],
"call": "this.getBannedIPs()"
},
{
"name": "getLatestConsoleLogs",
"desc": "Gets up to the last 50 lines in the console. Returned as an array of JSON stream objects.",
"returns": ["Object[]", "The array of objects"],
"call": "this.getConsoleLogs()"
},
{
"name": "getLatestChats",
"desc": "Gets up to the last 50 lines in chat. Returned as an array of JSON stream objects.",
"returns": ["Object[]", "The array of objects"],
"call": "this.getChatLogs()"
},
{
"name": "getLatestConnections",
"desc": "Gets up to the last 50 connections/disconnections. Returned as an array of JSON stream objects.",
"returns": ["Object[]", "The array of objects"],
"call": "this.getConnectionLogs()"
},
{
"name": "getLatestConsoleLogsWithLimit",
"desc": "Gets up to the last n lines in the console where n is the limit passed. Returned as an array of JSON stream objects.",
"returns": ["Object[]", "The array of objects"],
"call": "this.getConsoleLogs(0)",
"args": [
["int", "The maximum number of items to return."]
]
},
{
"name": "getLatestChatsWithLimit",
"desc": "Gets up to the last n lines in chat where n is the limit passed. Returned as an array of JSON stream objects.",
"returns": ["Object[]", "The array of objects"],
"call": "this.getChatLogs(0)",
"args": [
["int", "The maximum number of items to return."]
]
},
{
"name": "getPluginFiles",
"desc": "Retrives an array of files and directories that exist in the plugins data folder. Recursive.",
"returns": ["String[]", "The files in string format."],
"call": "this.getPluginFiles(0)",
"flags": [
"NO_EXCEPTIONS"
],
"args": [
["String", "The plugin that will have its files listed."]
]
},
{
"name": "broadcastWithName",
"desc": "Similar to broadcast, but lets you specify a name to chat as and displays the message with the proper format. Looks just like the person specified is on the esrver.",
"returns": ["boolean", "True on success, false on failure."],
"call": "this.chatWithName(0, 1)",
"args": [
["String", "The message."],
["String", "The name to send as."]
]
},
{
"name": "getLatestConnectionsWithLimit",
"desc": "Gets up to the last n connections/disconnections where n is the limit passed. Returned as an array of JSON stream objects.",
"returns": ["Object[]", "The array of objects"],
"call": "this.getConnectionLogs(0)",
"args": [
["int", "The maximum number of items to return."]
]
},
{
"name": "setPlayerHealth",
"desc": "Sets a player's health on a scale of 0-20.",
"returns": ["boolean", "True on succes, false if the player is not on the server."],
"call": "Server.getPlayer(0).setHealth(1)",
"flags": [
"FALSE_ON_EXCEPTION"
],
"args": [
["String", "The player's name."],
["int", "The amount of health to set."]
]
},
{
"name": "setPlayerLevel",
"desc": "Sets a player's level on a scale of 0-50.",
"returns": ["boolean", "True on succes, false if the player is not on the server."],
"call": "this.setPlayerLevel(0,1)",
"flags": [
"FALSE_ON_EXCEPTION"
],
"args": [
["String", "The player's name."],
["int", "The level to set."]
]
},
{
"name": "setPlayerExperience",
"desc": "Sets a player's health on a scale of 0-4625 (level 50).",
"returns": ["boolean", "True on succes, false if the player is not on the server."],
"call": "this.setPlayerExperience(0,1)",
"flags": [
"FALSE_ON_EXCEPTION"
],
"args": [
["String", "The player's name."],
["int", "The amount of experience to set."]
]
},
{
"name": "setPlayerFoodLevel",
"desc": "Sets a player's food level on a scale of 0-20.",
"returns": ["boolean", "True on succes, false if the player is not on the server."],
"call": "Server.getPlayer(0).setFoodLevel(1)",
"flags": [
"FALSE_ON_EXCEPTION"
],
"args": [
["String", "The player's name."],
["int", "The amount of food to set."]
]
},
{
"name": "setWorldTime",
"desc": "Sets the time for a given world.",
"returns": ["boolean", "True on succes, false if the world does not exist."],
"call": "this.setWorldTime(0, 1)",
"flags": [
"FALSE_ON_EXCEPTION"
],
"args": [
["String", "The world's name."],
["int", "Time (from 0-24000), 6000 is dawn, 24000 is midnight."]
]
},
{
"name": "setPlayerGameMode",
"desc": "Sets the game mode for a player. 0 is creative. 1 is survivial.",
"returns": ["boolean", "True on succes, false if the player is not on the server."],
"call": "this.setPlayerGameMode(0, 1)",
"flags": [
"FALSE_ON_EXCEPTION"
],
"args": [
["String", "The player's name."],
["int", "The game mode."]
]
},
{
"name":"getStream",
"desc":"Returns all the messages in a stream with the given name.",
"returns":["Object[]", "An array of message objects which are different for each kind of stream."],
"call":"this.getStream(0)",
"args": [
["String", "The name of the stream to fetch messages from."]
]
},
{
"name":"getStreamWithLimit",
"desc":"Returns all the messages in a stream with the given name.",
"returns":["Object[]", "An array of message objects which are different for each kind of stream."],
"call":"this.getStreamWithLimit(0, 1)",
"args": [
["String", "The name of the stream to fetch messages from."],
["int", "The number of messages to limit the results to."]
]
},
{
"name": "getPlayerCount",
"desc": "Gets the amount of players currently on the server.",
"returns": ["int", "The number of players on the server."],
"call": "Server.getOnlinePlayers().length"
},
{
"name":"getDirectory",
"desc":"Retrieves an array of files and directories that exist in the specified directory.",
"returns":["String[]", "The files in string format."],
"call":"this.getDirectory(0)",
"args": [
["String", "The directory that will have its files listed, relative to the folder that contains the the plugins folder."]
]
},
{
"name":"getBlock",
"desc":"Retrieves the block in the specified world at the specified coordinate.",
"returns":["Object", "Information about the block."],
"call":"Server.getWorld(0).getBlockAt(1, 2, 3)",
"args": [
["String", "The world name."],
["int", "The x-coord of the block."],
["int", "The y-coord of the block."],
["int", "The z-coord of the block."]
]
},
{
"name":"setBlockType",
"desc":"Set the type of the block in the specified world at the specified coordinate.",
"call":"Server.getWorld(0).getBlockAt(1, 2, 3).setTypeId(4)",
"args": [
["String", "The world name."],
["int", "The x-coord of the block."],
["int", "The y-coord of the block."],
["int", "The z-coord of the block."],
["int", "The type ID to change the block to."]
]
},
{
"name":"setBlockData",
"desc":"Set the data value of the block in the specified world at the specified coordinate.",
"call":"this.setBlockData(0,1,2,3,4)",
"args": [
["String", "The world name."],
["int", "The x-coord of the block."],
["int", "The y-coord of the block."],
["int", "The z-coord of the block."],
["int", "The decimal representation of the data value to set on the block."]
]
},
{
"name":"getSingleDirectory",
"desc":"Retrieves an array of files and directories that are direct children of the specified directory.",
"returns":["String[]", "The files in string format."],
"call":"this.getSingleDirectory(0)",
"args": [
["String", "The directory that will have its files listed, relative to the folder that contains the the plugins folder."]
]
},
{
"name":"getPlayerNames",
"desc":"Retrieves an array of the names of all the players currently on the server.",
"returns":["String[]", "The players' names."],
"call":"this.getPlayerNames()"
},
{
"name":"getOnlinePlayerNamesInWorld",
"desc":"Retrieves an array of the names of all the players currently in the given world.",
"returns":["String[]", "The players' names."],
"args": [
["String", "The world name"]
],
"call":"Server.getWorld(0).getPlayers()"
},
{
"name":"getOfflinePlayers",
"desc":"Retrieves an array of all the players who have ever played on the server but are not currently on the server.",
"returns":["OfflinePlayer[]", "An array of offlinePlayers."],
"call":"this.getOfflinePlayers()"
},
{
"name":"getOfflinePlayerNames",
"desc":"Retrieves an array of the names of all the players who have ever played on the server but are not currently on the server.",
"returns":["String[]", "The offline players' names."],
"call":"this.getOfflinePlayerNames()"
},
{
"name":"teleportPlayerToLocation",
"desc":"Teleports the specified player to the specified x, y and z co-ordinates.",
"call":"this.teleport(0,1,2,3)",
"returns":["boolean", "True if successful, false otherwise."],
"args": [
["String", "The player name."],
["int", "The x-coord of the block."],
["int", "The y-coord of the block."],
["int", "The z-coord of the block."]
]
},
{
"name":"teleportPlayerToWorldLocation",
"desc":"Teleports the specified player to the specified world and xyz co-ordinates.",
"call":"this.teleport(0,1,2,3,4)",
"returns":["boolean", "True if successful, false otherwise."],
"args": [
["String", "The player name."],
["String", "The world name."],
["int", "The x-coord of the block."],
["int", "The y-coord of the block."],
["int", "The z-coord of the block."]
]
}
]
}
It seems that your url is invalid.
CodenStuff wrote:Nope, it's just your sick and dirty mind. You sick twisted warped little pervo![]()
do you have any idea as to why the url is not valid it is the same url as I use in the ios client I am using so it should work shouldn't it?.............
sorry for double post but no one really seems to be helping I have
google and googled and googled and I cant find anything about
making it in vb.net
google and googled and googled and I cant find anything about
making it in vb.net
4 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023