From 627ebf372138a8e51ad4a342f4392d3b8a2d90cc Mon Sep 17 00:00:00 2001 From: Etzelia Date: Fri, 21 Sep 2018 20:26:46 -0500 Subject: [PATCH] Cleanup & Javadocs Cleaned up some code Added Deprecated to MCMessage method of CoreResponse Added Javadocs --- docs/allclasses-frame.html | 23 + docs/allclasses-noframe.html | 23 + docs/constant-values.html | 122 ++++ docs/deprecated-list.html | 144 +++++ docs/help-doc.html | 223 +++++++ docs/index-files/index-1.html | 133 ++++ docs/index-files/index-2.html | 143 +++++ docs/index-files/index-3.html | 141 +++++ docs/index-files/index-4.html | 135 ++++ docs/index-files/index-5.html | 127 ++++ docs/index-files/index-6.html | 129 ++++ docs/index-files/index-7.html | 135 ++++ docs/index.html | 74 +++ docs/overview-frame.html | 23 + docs/overview-summary.html | 145 +++++ docs/overview-tree.html | 144 +++++ docs/package-list | 3 + docs/script.js | 30 + docs/stylesheet.css | 574 ++++++++++++++++++ docs/xyz/etztech/core/CoreUtils.html | 290 +++++++++ .../etztech/core/api/IMinecraftManager.html | 244 ++++++++ docs/xyz/etztech/core/api/package-frame.html | 20 + .../xyz/etztech/core/api/package-summary.html | 151 +++++ docs/xyz/etztech/core/api/package-tree.html | 131 ++++ docs/xyz/etztech/core/package-frame.html | 20 + docs/xyz/etztech/core/package-summary.html | 140 +++++ docs/xyz/etztech/core/package-tree.html | 135 ++++ docs/xyz/etztech/core/web/CoreResponse.html | 383 ++++++++++++ docs/xyz/etztech/core/web/CoreWeb.html | 358 +++++++++++ docs/xyz/etztech/core/web/ICallback.html | 224 +++++++ docs/xyz/etztech/core/web/package-frame.html | 25 + .../xyz/etztech/core/web/package-summary.html | 172 ++++++ docs/xyz/etztech/core/web/package-tree.html | 140 +++++ src/main/java/xyz/etztech/core/CoreUtils.java | 15 + .../etztech/core/api/IMinecraftManager.java | 10 + .../xyz/etztech/core/api/package-info.java | 4 + .../xyz/etztech/core/web/CoreResponse.java | 34 +- .../java/xyz/etztech/core/web/CoreWeb.java | 24 + .../java/xyz/etztech/core/web/ICallback.java | 6 + .../xyz/etztech/core/web/package-info.java | 4 + 40 files changed, 4999 insertions(+), 2 deletions(-) create mode 100644 docs/allclasses-frame.html create mode 100644 docs/allclasses-noframe.html create mode 100644 docs/constant-values.html create mode 100644 docs/deprecated-list.html create mode 100644 docs/help-doc.html create mode 100644 docs/index-files/index-1.html create mode 100644 docs/index-files/index-2.html create mode 100644 docs/index-files/index-3.html create mode 100644 docs/index-files/index-4.html create mode 100644 docs/index-files/index-5.html create mode 100644 docs/index-files/index-6.html create mode 100644 docs/index-files/index-7.html create mode 100644 docs/index.html create mode 100644 docs/overview-frame.html create mode 100644 docs/overview-summary.html create mode 100644 docs/overview-tree.html create mode 100644 docs/package-list create mode 100644 docs/script.js create mode 100644 docs/stylesheet.css create mode 100644 docs/xyz/etztech/core/CoreUtils.html create mode 100644 docs/xyz/etztech/core/api/IMinecraftManager.html create mode 100644 docs/xyz/etztech/core/api/package-frame.html create mode 100644 docs/xyz/etztech/core/api/package-summary.html create mode 100644 docs/xyz/etztech/core/api/package-tree.html create mode 100644 docs/xyz/etztech/core/package-frame.html create mode 100644 docs/xyz/etztech/core/package-summary.html create mode 100644 docs/xyz/etztech/core/package-tree.html create mode 100644 docs/xyz/etztech/core/web/CoreResponse.html create mode 100644 docs/xyz/etztech/core/web/CoreWeb.html create mode 100644 docs/xyz/etztech/core/web/ICallback.html create mode 100644 docs/xyz/etztech/core/web/package-frame.html create mode 100644 docs/xyz/etztech/core/web/package-summary.html create mode 100644 docs/xyz/etztech/core/web/package-tree.html create mode 100644 src/main/java/xyz/etztech/core/api/package-info.java create mode 100644 src/main/java/xyz/etztech/core/web/package-info.java diff --git a/docs/allclasses-frame.html b/docs/allclasses-frame.html new file mode 100644 index 0000000..931e2af --- /dev/null +++ b/docs/allclasses-frame.html @@ -0,0 +1,23 @@ + + + + + +All Classes + + + + + +

All Classes

+
+ +
+ + diff --git a/docs/allclasses-noframe.html b/docs/allclasses-noframe.html new file mode 100644 index 0000000..06cc8d3 --- /dev/null +++ b/docs/allclasses-noframe.html @@ -0,0 +1,23 @@ + + + + + +All Classes + + + + + +

All Classes

+
+ +
+ + diff --git a/docs/constant-values.html b/docs/constant-values.html new file mode 100644 index 0000000..8d6875d --- /dev/null +++ b/docs/constant-values.html @@ -0,0 +1,122 @@ + + + + + +Constant Field Values + + + + + + + + +
+ + + + + + + +
+ + +
+

Constant Field Values

+

Contents

+
+ +
+ + + + + + + +
+ + + + diff --git a/docs/deprecated-list.html b/docs/deprecated-list.html new file mode 100644 index 0000000..7dcc594 --- /dev/null +++ b/docs/deprecated-list.html @@ -0,0 +1,144 @@ + + + + + +Deprecated List + + + + + + + + +
+ + + + + + + +
+ + +
+

Deprecated API

+

Contents

+ +
+
+ + + +
+ +
+ + + + + + + +
+ + + + diff --git a/docs/help-doc.html b/docs/help-doc.html new file mode 100644 index 0000000..f9c0152 --- /dev/null +++ b/docs/help-doc.html @@ -0,0 +1,223 @@ + + + + + +API Help + + + + + + + + +
+ + + + + + + +
+ + +
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+ +This help file applies to API documentation generated using the standard doclet.
+ +
+ + + + + + + +
+ + + + diff --git a/docs/index-files/index-1.html b/docs/index-files/index-1.html new file mode 100644 index 0000000..d09fc58 --- /dev/null +++ b/docs/index-files/index-1.html @@ -0,0 +1,133 @@ + + + + + +A-Index + + + + + + + + +
+ + + + + + + +
+ + +
A C G I L S X  + + +

A

+
+
asyncGet(Plugin, String, Map<String, String>) - Static method in class xyz.etztech.core.web.CoreWeb
+
 
+
asyncGetCallback(Plugin, String, Map<String, String>, ICallback) - Static method in class xyz.etztech.core.web.CoreWeb
+
 
+
asyncPost(Plugin, String, Map<String, String>) - Static method in class xyz.etztech.core.web.CoreWeb
+
 
+
asyncPostCallback(Plugin, String, Map<String, String>, ICallback) - Static method in class xyz.etztech.core.web.CoreWeb
+
 
+
+A C G I L S X 
+ +
+ + + + + + + +
+ + + + diff --git a/docs/index-files/index-2.html b/docs/index-files/index-2.html new file mode 100644 index 0000000..b02be8c --- /dev/null +++ b/docs/index-files/index-2.html @@ -0,0 +1,143 @@ + + + + + +C-Index + + + + + + + + +
+ + + + + + + +
+ + +
A C G I L S X  + + +

C

+
+
CoreResponse - Class in xyz.etztech.core.web
+
+
A basic class to wrap a JSON response containing a simple status and message
+
+
CoreResponse(JsonArray) - Constructor for class xyz.etztech.core.web.CoreResponse
+
 
+
CoreResponse(JsonObject) - Constructor for class xyz.etztech.core.web.CoreResponse
+
 
+
CoreResponse(String) - Constructor for class xyz.etztech.core.web.CoreResponse
+
 
+
CoreUtils - Class in xyz.etztech.core
+
 
+
CoreUtils() - Constructor for class xyz.etztech.core.CoreUtils
+
 
+
CoreWeb - Class in xyz.etztech.core.web
+
 
+
CoreWeb() - Constructor for class xyz.etztech.core.web.CoreWeb
+
 
+
+A C G I L S X 
+ +
+ + + + + + + +
+ + + + diff --git a/docs/index-files/index-3.html b/docs/index-files/index-3.html new file mode 100644 index 0000000..da029dd --- /dev/null +++ b/docs/index-files/index-3.html @@ -0,0 +1,141 @@ + + + + + +G-Index + + + + + + + + +
+ + + + + + + +
+ + +
A C G I L S X  + + +

G

+
+
getLogger() - Static method in class xyz.etztech.core.CoreUtils
+
 
+
getMCJSON() - Method in class xyz.etztech.core.web.CoreResponse
+
 
+
getMCMessage() - Method in class xyz.etztech.core.web.CoreResponse
+
+
Deprecated.
+
+
getMessage() - Method in class xyz.etztech.core.web.CoreResponse
+
 
+
getSchedule() - Static method in class xyz.etztech.core.CoreUtils
+
 
+
getStatus() - Method in class xyz.etztech.core.web.CoreResponse
+
 
+
globalLog(Player, String) - Method in interface xyz.etztech.core.api.IMinecraftManager
+
 
+
+A C G I L S X 
+ +
+ + + + + + + +
+ + + + diff --git a/docs/index-files/index-4.html b/docs/index-files/index-4.html new file mode 100644 index 0000000..2791e8d --- /dev/null +++ b/docs/index-files/index-4.html @@ -0,0 +1,135 @@ + + + + + +I-Index + + + + + + + + +
+ + + + + + + +
+ + +
A C G I L S X  + + +

I

+
+
ICallback - Interface in xyz.etztech.core.web
+
+
An interface for Core async callbacks
+
+
IMinecraftManager - Interface in xyz.etztech.core.api
+
+
An interface for the MinecraftManager plugin
+
+
invoke(String) - Method in interface xyz.etztech.core.web.ICallback
+
 
+
+A C G I L S X 
+ +
+ + + + + + + +
+ + + + diff --git a/docs/index-files/index-5.html b/docs/index-files/index-5.html new file mode 100644 index 0000000..2cba8a0 --- /dev/null +++ b/docs/index-files/index-5.html @@ -0,0 +1,127 @@ + + + + + +L-Index + + + + + + + + +
+ + + + + + + +
+ + +
A C G I L S X  + + +

L

+
+
logOverride(boolean) - Method in interface xyz.etztech.core.api.IMinecraftManager
+
 
+
+A C G I L S X 
+ +
+ + + + + + + +
+ + + + diff --git a/docs/index-files/index-6.html b/docs/index-files/index-6.html new file mode 100644 index 0000000..336411f --- /dev/null +++ b/docs/index-files/index-6.html @@ -0,0 +1,129 @@ + + + + + +S-Index + + + + + + + + +
+ + + + + + + +
+ + +
A C G I L S X  + + +

S

+
+
setMessage(String) - Method in class xyz.etztech.core.web.CoreResponse
+
 
+
setStatus(Boolean) - Method in class xyz.etztech.core.web.CoreResponse
+
 
+
+A C G I L S X 
+ +
+ + + + + + + +
+ + + + diff --git a/docs/index-files/index-7.html b/docs/index-files/index-7.html new file mode 100644 index 0000000..57c2ec2 --- /dev/null +++ b/docs/index-files/index-7.html @@ -0,0 +1,135 @@ + + + + + +X-Index + + + + + + + + +
+ + + + + + + +
+ + +
A C G I L S X  + + +

X

+
+
xyz.etztech.core - package xyz.etztech.core
+
 
+
xyz.etztech.core.api - package xyz.etztech.core.api
+
+
API classes for EtzTech plugins
+
+
xyz.etztech.core.web - package xyz.etztech.core.web
+
+
A core set of web utilities
+
+
+A C G I L S X 
+ +
+ + + + + + + +
+ + + + diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..03e86d0 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,74 @@ + + + + + +Generated Documentation (Untitled) + + + + + + + + + +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="overview-summary.html">Non-frame version</a>.</p> + + + diff --git a/docs/overview-frame.html b/docs/overview-frame.html new file mode 100644 index 0000000..da5b045 --- /dev/null +++ b/docs/overview-frame.html @@ -0,0 +1,23 @@ + + + + + +Overview List + + + + + +
All Classes
+
+

Packages

+ +
+

 

+ + diff --git a/docs/overview-summary.html b/docs/overview-summary.html new file mode 100644 index 0000000..bb03027 --- /dev/null +++ b/docs/overview-summary.html @@ -0,0 +1,145 @@ + + + + + +Overview + + + + + + + + +
+ + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + +
Packages 
PackageDescription
xyz.etztech.core 
xyz.etztech.core.api +
API classes for EtzTech plugins
+
xyz.etztech.core.web +
A core set of web utilities
+
+
+ +
+ + + + + + + +
+ + + + diff --git a/docs/overview-tree.html b/docs/overview-tree.html new file mode 100644 index 0000000..ebe703a --- /dev/null +++ b/docs/overview-tree.html @@ -0,0 +1,144 @@ + + + + + +Class Hierarchy + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For All Packages

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/docs/package-list b/docs/package-list new file mode 100644 index 0000000..faa04ae --- /dev/null +++ b/docs/package-list @@ -0,0 +1,3 @@ +xyz.etztech.core +xyz.etztech.core.api +xyz.etztech.core.web diff --git a/docs/script.js b/docs/script.js new file mode 100644 index 0000000..b346356 --- /dev/null +++ b/docs/script.js @@ -0,0 +1,30 @@ +function show(type) +{ + count = 0; + for (var key in methods) { + var row = document.getElementById(key); + if ((methods[key] & type) != 0) { + row.style.display = ''; + row.className = (count++ % 2) ? rowColor : altColor; + } + else + row.style.display = 'none'; + } + updateTabs(type); +} + +function updateTabs(type) +{ + for (var value in tabs) { + var sNode = document.getElementById(tabs[value][0]); + var spanNode = sNode.firstChild; + if (value == type) { + sNode.className = activeTableTab; + spanNode.innerHTML = tabs[value][1]; + } + else { + sNode.className = tableTab; + spanNode.innerHTML = "" + tabs[value][1] + ""; + } + } +} diff --git a/docs/stylesheet.css b/docs/stylesheet.css new file mode 100644 index 0000000..cebb4fd --- /dev/null +++ b/docs/stylesheet.css @@ -0,0 +1,574 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ + +@import url('resources/fonts/dejavu.css'); + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4A6782; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; + font-style:italic; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +table tr td dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:11px; + z-index:200; + margin-top:-9px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-color:#4D7A97; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:11px; + margin:0; +} +.topNav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.bottomNav { + margin-top:10px; + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.subNav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +ul.subNavList li{ + list-style:none; + float:left; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.navBarCell1Rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skipNav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader span{ + margin-right:15px; +} +.indexHeader h1 { + font-size:13px; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:12px; +} +.indexContainer h2 { + font-size:13px; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; + padding-top:2px; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:5px 0 10px 0px; + font-size:14px; + font-family:'DejaVu Sans Mono',monospace; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #ededed; + background-color:#f8f8f8; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { + width:100%; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.overviewSummary, .memberSummary { + padding:0px; +} +.overviewSummary caption, .memberSummary caption, .typeSummary caption, +.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, +.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, +.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, +.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, +.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, +.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, +.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, +.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, +.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +.memberSummary caption span.activeTableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#F8981D; + height:16px; +} +.memberSummary caption span.tableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#4D7A97; + height:16px; +} +.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { + padding-top:0px; + padding-left:0px; + padding-right:0px; + background-image:none; + float:none; + display:inline; +} +.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, +.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { + display:none; + width:5px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .activeTableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .tableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + background-color:#4D7A97; + float:left; + +} +.overviewSummary td, .memberSummary td, .typeSummary td, +.useSummary td, .constantsSummary td, .deprecatedSummary td { + text-align:left; + padding:0px 0px 12px 10px; + width:100%; +} +th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, +td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ + vertical-align:top; + padding-right:0px; + padding-top:8px; + padding-bottom:3px; +} +th.colFirst, th.colLast, th.colOne, .constantsSummary th { + background:#dee3e9; + text-align:left; + padding:8px 3px 3px 7px; +} +td.colFirst, th.colFirst { + white-space:nowrap; + font-size:13px; +} +td.colLast, th.colLast { + font-size:13px; +} +td.colOne, th.colOne { + font-size:13px; +} +.overviewSummary td.colFirst, .overviewSummary th.colFirst, +.overviewSummary td.colOne, .overviewSummary th.colOne, +.memberSummary td.colFirst, .memberSummary th.colFirst, +.memberSummary td.colOne, .memberSummary th.colOne, +.typeSummary td.colFirst{ + width:25%; + vertical-align:top; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +.tableSubHeadingColor { + background-color:#EEEEFF; +} +.altColor { + background-color:#FFFFFF; +} +.rowColor { + background-color:#EEEEEF; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} + +ul.blockList ul.blockList ul.blockList li.blockList h3 { + font-style:normal; +} + +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} + +td.colLast div { + padding-top:0px; +} + + +td.colLast a { + padding-bottom:3px; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:3px 10px 2px 0px; + color:#474747; +} +.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, +.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, +.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { + font-weight:bold; +} +.deprecationComment, .emphasizedPhrase, .interfaceName { + font-style:italic; +} + +div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, +div.block div.block span.interfaceName { + font-style:normal; +} + +div.contentContainer ul.blockList li.blockList h2{ + padding-bottom:0px; +} diff --git a/docs/xyz/etztech/core/CoreUtils.html b/docs/xyz/etztech/core/CoreUtils.html new file mode 100644 index 0000000..8c8f9fc --- /dev/null +++ b/docs/xyz/etztech/core/CoreUtils.html @@ -0,0 +1,290 @@ + + + + + +CoreUtils + + + + + + + + +
+ + + + + + + +
+ + + +
+
xyz.etztech.core
+

Class CoreUtils

+
+
+ +
+
    +
  • +
    +
    +
    public class CoreUtils
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      CoreUtils() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static java.util.logging.LoggergetLogger() 
      static org.bukkit.scheduler.BukkitSchedulergetSchedule() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        CoreUtils

        +
        public CoreUtils()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getSchedule

        +
        public static org.bukkit.scheduler.BukkitScheduler getSchedule()
        +
        +
        Returns:
        +
        The server scheduler
        +
        +
      • +
      + + + +
        +
      • +

        getLogger

        +
        public static java.util.logging.Logger getLogger()
        +
        +
        Returns:
        +
        The Minecraft logger
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/docs/xyz/etztech/core/api/IMinecraftManager.html b/docs/xyz/etztech/core/api/IMinecraftManager.html new file mode 100644 index 0000000..487dce4 --- /dev/null +++ b/docs/xyz/etztech/core/api/IMinecraftManager.html @@ -0,0 +1,244 @@ + + + + + +IMinecraftManager + + + + + + + + +
+ + + + + + + +
+ + + +
+
xyz.etztech.core.api
+

Interface IMinecraftManager

+
+
+
+
    +
  • +
    +
    +
    public interface IMinecraftManager
    +
    An interface for the MinecraftManager plugin
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        logOverride

        +
        void logOverride(boolean override)
        +
        +
        Parameters:
        +
        override - Override global logging for Minecraft Manager
        +
        +
      • +
      + + + +
        +
      • +

        globalLog

        +
        void globalLog(org.bukkit.entity.Player player,
        +               java.lang.String message)
        +
        +
        Parameters:
        +
        player - The player being logged
        +
        message - The message to log
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/docs/xyz/etztech/core/api/package-frame.html b/docs/xyz/etztech/core/api/package-frame.html new file mode 100644 index 0000000..74df7b9 --- /dev/null +++ b/docs/xyz/etztech/core/api/package-frame.html @@ -0,0 +1,20 @@ + + + + + +xyz.etztech.core.api + + + + + +

xyz.etztech.core.api

+
+

Interfaces

+ +
+ + diff --git a/docs/xyz/etztech/core/api/package-summary.html b/docs/xyz/etztech/core/api/package-summary.html new file mode 100644 index 0000000..6fbb9d3 --- /dev/null +++ b/docs/xyz/etztech/core/api/package-summary.html @@ -0,0 +1,151 @@ + + + + + +xyz.etztech.core.api + + + + + + + + +
+ + + + + + + +
+ + +
+

Package xyz.etztech.core.api

+
+
API classes for EtzTech plugins
+
+

See: Description

+
+
+ + + + +

Package xyz.etztech.core.api Description

+
API classes for EtzTech plugins
+
+ +
+ + + + + + + +
+ + + + diff --git a/docs/xyz/etztech/core/api/package-tree.html b/docs/xyz/etztech/core/api/package-tree.html new file mode 100644 index 0000000..92b126b --- /dev/null +++ b/docs/xyz/etztech/core/api/package-tree.html @@ -0,0 +1,131 @@ + + + + + +xyz.etztech.core.api Class Hierarchy + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package xyz.etztech.core.api

+Package Hierarchies: + +
+
+

Interface Hierarchy

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/docs/xyz/etztech/core/package-frame.html b/docs/xyz/etztech/core/package-frame.html new file mode 100644 index 0000000..ce95422 --- /dev/null +++ b/docs/xyz/etztech/core/package-frame.html @@ -0,0 +1,20 @@ + + + + + +xyz.etztech.core + + + + + +

xyz.etztech.core

+
+

Classes

+ +
+ + diff --git a/docs/xyz/etztech/core/package-summary.html b/docs/xyz/etztech/core/package-summary.html new file mode 100644 index 0000000..c144796 --- /dev/null +++ b/docs/xyz/etztech/core/package-summary.html @@ -0,0 +1,140 @@ + + + + + +xyz.etztech.core + + + + + + + + +
+ + + + + + + +
+ + +
+

Package xyz.etztech.core

+
+
+ +
+ +
+ + + + + + + +
+ + + + diff --git a/docs/xyz/etztech/core/package-tree.html b/docs/xyz/etztech/core/package-tree.html new file mode 100644 index 0000000..ada7d87 --- /dev/null +++ b/docs/xyz/etztech/core/package-tree.html @@ -0,0 +1,135 @@ + + + + + +xyz.etztech.core Class Hierarchy + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package xyz.etztech.core

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/docs/xyz/etztech/core/web/CoreResponse.html b/docs/xyz/etztech/core/web/CoreResponse.html new file mode 100644 index 0000000..1990d1e --- /dev/null +++ b/docs/xyz/etztech/core/web/CoreResponse.html @@ -0,0 +1,383 @@ + + + + + +CoreResponse + + + + + + + + +
+ + + + + + + +
+ + + +
+
xyz.etztech.core.web
+

Class CoreResponse

+
+
+ +
+
    +
  • +
    +
    +
    public class CoreResponse
    +extends java.lang.Object
    +
    A basic class to wrap a JSON response containing a simple status and message
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      CoreResponse(com.google.gson.JsonArray httpResponse) 
      CoreResponse(com.google.gson.JsonObject httpResponse) 
      CoreResponse(java.lang.String rawReponse) 
      +
    • +
    + + +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        CoreResponse

        +
        public CoreResponse(com.google.gson.JsonArray httpResponse)
        +
        +
        Parameters:
        +
        httpResponse - A JSON array e.g. multiple results from one call
        +
        +
      • +
      + + + +
        +
      • +

        CoreResponse

        +
        public CoreResponse(com.google.gson.JsonObject httpResponse)
        +
        +
        Parameters:
        +
        httpResponse - A JSON array e.g. a single result from one call
        +
        +
      • +
      + + + +
        +
      • +

        CoreResponse

        +
        public CoreResponse(java.lang.String rawReponse)
        +
        +
        Parameters:
        +
        rawReponse - A raw JSON array in string format
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getStatus

        +
        public java.lang.Boolean getStatus()
        +
      • +
      + + + +
        +
      • +

        setStatus

        +
        public void setStatus(java.lang.Boolean status)
        +
      • +
      + + + +
        +
      • +

        getMessage

        +
        public java.lang.String getMessage()
        +
      • +
      + + + +
        +
      • +

        setMessage

        +
        public void setMessage(java.lang.String message)
        +
      • +
      + + + +
        +
      • +

        getMCMessage

        +
        @Deprecated
        +public java.lang.String getMCMessage()
        +
        Deprecated. 
        +
        +
        Returns:
        +
        A legacy Minecraft message using color codes
        +
        +
      • +
      + + + +
        +
      • +

        getMCJSON

        +
        public net.md_5.bungee.api.chat.TextComponent getMCJSON()
        +
        +
        Returns:
        +
        A Spigot JSON message
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/docs/xyz/etztech/core/web/CoreWeb.html b/docs/xyz/etztech/core/web/CoreWeb.html new file mode 100644 index 0000000..13f6ad4 --- /dev/null +++ b/docs/xyz/etztech/core/web/CoreWeb.html @@ -0,0 +1,358 @@ + + + + + +CoreWeb + + + + + + + + +
+ + + + + + + +
+ + + +
+
xyz.etztech.core.web
+

Class CoreWeb

+
+
+ +
+
    +
  • +
    +
    +
    public class CoreWeb
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      CoreWeb() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static voidasyncGet(org.bukkit.plugin.Plugin plugin, + java.lang.String url, + java.util.Map<java.lang.String,java.lang.String> data) 
      static voidasyncGetCallback(org.bukkit.plugin.Plugin plugin, + java.lang.String url, + java.util.Map<java.lang.String,java.lang.String> data, + ICallback callback) 
      static voidasyncPost(org.bukkit.plugin.Plugin plugin, + java.lang.String url, + java.util.Map<java.lang.String,java.lang.String> data) 
      static voidasyncPostCallback(org.bukkit.plugin.Plugin plugin, + java.lang.String url, + java.util.Map<java.lang.String,java.lang.String> data, + ICallback callback) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        CoreWeb

        +
        public CoreWeb()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        asyncGet

        +
        public static void asyncGet(org.bukkit.plugin.Plugin plugin,
        +                            java.lang.String url,
        +                            java.util.Map<java.lang.String,java.lang.String> data)
        +
        +
        Parameters:
        +
        plugin - The calling plugin
        +
        url - The URL to call
        +
        data - A map of parameters
        +
        +
      • +
      + + + +
        +
      • +

        asyncGetCallback

        +
        public static void asyncGetCallback(org.bukkit.plugin.Plugin plugin,
        +                                    java.lang.String url,
        +                                    java.util.Map<java.lang.String,java.lang.String> data,
        +                                    ICallback callback)
        +
        +
        Parameters:
        +
        plugin - The calling plugin
        +
        url - The URL to call
        +
        data - A map of parameters
        +
        callback - A class implementing an ICallBack to run upon completion
        +
        See Also:
        +
        ICallback
        +
        +
      • +
      + + + +
        +
      • +

        asyncPost

        +
        public static void asyncPost(org.bukkit.plugin.Plugin plugin,
        +                             java.lang.String url,
        +                             java.util.Map<java.lang.String,java.lang.String> data)
        +
        +
        Parameters:
        +
        plugin - The calling plugin
        +
        url - The URL to call
        +
        data - A map of parameters
        +
        +
      • +
      + + + +
        +
      • +

        asyncPostCallback

        +
        public static void asyncPostCallback(org.bukkit.plugin.Plugin plugin,
        +                                     java.lang.String url,
        +                                     java.util.Map<java.lang.String,java.lang.String> data,
        +                                     ICallback callback)
        +
        +
        Parameters:
        +
        plugin - The calling plugin
        +
        url - The URL to call
        +
        data - A map of parameters
        +
        callback - A class implementing an ICallBack to run upon completion
        +
        See Also:
        +
        ICallback
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/docs/xyz/etztech/core/web/ICallback.html b/docs/xyz/etztech/core/web/ICallback.html new file mode 100644 index 0000000..787e0ea --- /dev/null +++ b/docs/xyz/etztech/core/web/ICallback.html @@ -0,0 +1,224 @@ + + + + + +ICallback + + + + + + + + +
+ + + + + + + +
+ + + +
+
xyz.etztech.core.web
+

Interface ICallback

+
+
+
+
    +
  • +
    +
    +
    public interface ICallback
    +
    An interface for Core async callbacks
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        invoke

        +
        void invoke(java.lang.String httpResponse)
        +
        +
        Parameters:
        +
        httpResponse - The response from the async call
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/docs/xyz/etztech/core/web/package-frame.html b/docs/xyz/etztech/core/web/package-frame.html new file mode 100644 index 0000000..b503268 --- /dev/null +++ b/docs/xyz/etztech/core/web/package-frame.html @@ -0,0 +1,25 @@ + + + + + +xyz.etztech.core.web + + + + + +

xyz.etztech.core.web

+
+

Interfaces

+ +

Classes

+ +
+ + diff --git a/docs/xyz/etztech/core/web/package-summary.html b/docs/xyz/etztech/core/web/package-summary.html new file mode 100644 index 0000000..0ff1196 --- /dev/null +++ b/docs/xyz/etztech/core/web/package-summary.html @@ -0,0 +1,172 @@ + + + + + +xyz.etztech.core.web + + + + + + + + +
+ + + + + + + +
+ + +
+

Package xyz.etztech.core.web

+
+
A core set of web utilities
+
+

See: Description

+
+
+ + + + +

Package xyz.etztech.core.web Description

+
A core set of web utilities
+
+ +
+ + + + + + + +
+ + + + diff --git a/docs/xyz/etztech/core/web/package-tree.html b/docs/xyz/etztech/core/web/package-tree.html new file mode 100644 index 0000000..61ef9d3 --- /dev/null +++ b/docs/xyz/etztech/core/web/package-tree.html @@ -0,0 +1,140 @@ + + + + + +xyz.etztech.core.web Class Hierarchy + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package xyz.etztech.core.web

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/src/main/java/xyz/etztech/core/CoreUtils.java b/src/main/java/xyz/etztech/core/CoreUtils.java index 3257006..29c00cb 100644 --- a/src/main/java/xyz/etztech/core/CoreUtils.java +++ b/src/main/java/xyz/etztech/core/CoreUtils.java @@ -8,6 +8,21 @@ import java.util.logging.Logger; public class CoreUtils { private static final BukkitScheduler schedule = Bukkit.getScheduler(); + private static final Logger logger = Logger.getLogger("Minecraft"); + /** + * @return The server scheduler + */ + public static BukkitScheduler getSchedule() { + return schedule; + } + + /** + * @return The Minecraft logger + */ + public static Logger getLogger() { + return logger; + } + } diff --git a/src/main/java/xyz/etztech/core/api/IMinecraftManager.java b/src/main/java/xyz/etztech/core/api/IMinecraftManager.java index 81928b0..57e1a2a 100644 --- a/src/main/java/xyz/etztech/core/api/IMinecraftManager.java +++ b/src/main/java/xyz/etztech/core/api/IMinecraftManager.java @@ -2,10 +2,20 @@ package xyz.etztech.core.api; import org.bukkit.entity.Player; +/** + * An interface for the MinecraftManager plugin + */ public interface IMinecraftManager { + /** + * @param override Override global logging for Minecraft Manager + */ void logOverride(boolean override); + /** + * @param player The player being logged + * @param message The message to log + */ void globalLog(Player player, String message); } diff --git a/src/main/java/xyz/etztech/core/api/package-info.java b/src/main/java/xyz/etztech/core/api/package-info.java new file mode 100644 index 0000000..8a72af0 --- /dev/null +++ b/src/main/java/xyz/etztech/core/api/package-info.java @@ -0,0 +1,4 @@ +/** + * API classes for EtzTech plugins + */ +package xyz.etztech.core.api; \ No newline at end of file diff --git a/src/main/java/xyz/etztech/core/web/CoreResponse.java b/src/main/java/xyz/etztech/core/web/CoreResponse.java index 670e0b1..0f651b1 100644 --- a/src/main/java/xyz/etztech/core/web/CoreResponse.java +++ b/src/main/java/xyz/etztech/core/web/CoreResponse.java @@ -1,33 +1,46 @@ package xyz.etztech.core.web; import com.google.gson.JsonArray; -import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; +import net.md_5.bungee.api.chat.ComponentBuilder; +import net.md_5.bungee.api.chat.TextComponent; import org.bukkit.ChatColor; import java.util.logging.Logger; +/** + * A basic class to wrap a JSON response containing a simple status and message + */ public class CoreResponse { - protected JsonObject json; + private JsonObject json; private Boolean status; private String message; private static Logger log = Logger.getLogger("Minecraft"); + /** + * @param httpResponse A JSON array e.g. multiple results from one call + */ public CoreResponse(JsonArray httpResponse) { json = httpResponse.get(0).getAsJsonObject(); setStatus(json.get("status").getAsBoolean()); setMessage(json.get("message").getAsString()); } + /** + * @param httpResponse A JSON array e.g. a single result from one call + */ public CoreResponse(JsonObject httpResponse) { json = httpResponse; setStatus(httpResponse.get("status").getAsBoolean()); setMessage(httpResponse.get("message").getAsString()); } + /** + * @param rawReponse A raw JSON array in string format + */ public CoreResponse(String rawReponse) { JsonParser parser = new JsonParser(); try { @@ -56,6 +69,10 @@ public class CoreResponse { } + /** + * @return A legacy Minecraft message using color codes + */ + @Deprecated public String getMCMessage() { if (status) { return ChatColor.GREEN + message; @@ -63,4 +80,17 @@ public class CoreResponse { return ChatColor.RED + message; } } + + /** + * @return A Spigot JSON message + */ + public TextComponent getMCJSON() { + ComponentBuilder builder = new ComponentBuilder(message); + if (status) { + builder.color(net.md_5.bungee.api.ChatColor.GREEN); + } else { + builder.color(net.md_5.bungee.api.ChatColor.RED); + } + return new TextComponent(builder.create()); + } } diff --git a/src/main/java/xyz/etztech/core/web/CoreWeb.java b/src/main/java/xyz/etztech/core/web/CoreWeb.java index 1917c20..520232a 100644 --- a/src/main/java/xyz/etztech/core/web/CoreWeb.java +++ b/src/main/java/xyz/etztech/core/web/CoreWeb.java @@ -30,6 +30,11 @@ public class CoreWeb { private static final BukkitScheduler schedule = Bukkit.getScheduler(); private static final Logger logger = Logger.getLogger("Minecraft"); + /** + * @param plugin The calling plugin + * @param url The URL to call + * @param data A map of parameters + */ public static void asyncGet(final Plugin plugin, final String url, final Map data) { schedule.runTaskAsynchronously(plugin, () -> { ArrayList query = new ArrayList<>(); @@ -47,6 +52,13 @@ public class CoreWeb { }); } + /** + * @param plugin The calling plugin + * @param url The URL to call + * @param data A map of parameters + * @param callback A class implementing an ICallBack to run upon completion + * @see ICallback + */ public static void asyncGetCallback(final Plugin plugin, final String url, final Map data, final ICallback callback) { schedule.runTaskAsynchronously(plugin, () -> { StringBuilder result = new StringBuilder(); @@ -75,6 +87,11 @@ public class CoreWeb { }); } + /** + * @param plugin The calling plugin + * @param url The URL to call + * @param data A map of parameters + */ public static void asyncPost(final Plugin plugin, final String url, final Map data) { schedule.runTaskAsynchronously(plugin, () -> { try { @@ -92,6 +109,13 @@ public class CoreWeb { }); } + /** + * @param plugin The calling plugin + * @param url The URL to call + * @param data A map of parameters + * @param callback A class implementing an ICallBack to run upon completion + * @see ICallback + */ public static void asyncPostCallback(final Plugin plugin, final String url, final Map data, final ICallback callback) { schedule.runTaskAsynchronously(plugin, () -> { StringBuilder result = new StringBuilder(); diff --git a/src/main/java/xyz/etztech/core/web/ICallback.java b/src/main/java/xyz/etztech/core/web/ICallback.java index a1da705..e4bb04b 100644 --- a/src/main/java/xyz/etztech/core/web/ICallback.java +++ b/src/main/java/xyz/etztech/core/web/ICallback.java @@ -1,7 +1,13 @@ package xyz.etztech.core.web; +/** + * An interface for Core async callbacks + */ public interface ICallback { + /** + * @param httpResponse The response from the async call + */ void invoke(String httpResponse); } diff --git a/src/main/java/xyz/etztech/core/web/package-info.java b/src/main/java/xyz/etztech/core/web/package-info.java new file mode 100644 index 0000000..b5ba409 --- /dev/null +++ b/src/main/java/xyz/etztech/core/web/package-info.java @@ -0,0 +1,4 @@ +/** + * A core set of web utilities + */ +package xyz.etztech.core.web; \ No newline at end of file