├── .gitignore
├── .idea
├── .gitignore
├── compiler.xml
├── discord.xml
├── jarRepositories.xml
├── misc.xml
├── uiDesigner.xml
└── vcs.xml
├── LICENSE.txt
├── README.md
├── docs
├── allclasses-index.html
├── allpackages-index.html
├── element-list
├── help-doc.html
├── index-files
│ ├── index-1.html
│ ├── index-10.html
│ ├── index-11.html
│ ├── index-12.html
│ ├── index-13.html
│ ├── index-14.html
│ ├── index-15.html
│ ├── index-16.html
│ ├── index-17.html
│ ├── index-18.html
│ ├── index-19.html
│ ├── index-2.html
│ ├── index-20.html
│ ├── index-21.html
│ ├── index-3.html
│ ├── index-4.html
│ ├── index-5.html
│ ├── index-6.html
│ ├── index-7.html
│ ├── index-8.html
│ └── index-9.html
├── index.html
├── jquery-ui.overrides.css
├── member-search-index.js
├── module-search-index.js
├── net
│ └── swofty
│ │ └── hyperlandsapi
│ │ ├── Connection.html
│ │ ├── Endpoints.html
│ │ ├── HyperlandsAPI.html
│ │ ├── XUID.html
│ │ ├── datatypes
│ │ ├── PlayerCounts.html
│ │ ├── PlayerStatistics.html
│ │ ├── package-summary.html
│ │ ├── package-tree.html
│ │ ├── playercounts
│ │ │ ├── BedWarsCount.html
│ │ │ ├── DuelsCount.html
│ │ │ ├── LobbyCount.html
│ │ │ ├── SkyWarsCount.html
│ │ │ ├── TheBridgeCount.html
│ │ │ ├── UHCMeetupCount.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ └── statistics
│ │ │ ├── BedWarsStatistics.html
│ │ │ ├── DuelStatistics.html
│ │ │ ├── GeneralStatistics.html
│ │ │ ├── SkyWarsStatistics.html
│ │ │ ├── SpleefStatistics.html
│ │ │ ├── TheBridgeStatistics.html
│ │ │ ├── UHCMeetupStatistics.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── exceptions
│ │ ├── EmptyNameOrXUIDException.html
│ │ ├── PlayerNotFoundException.html
│ │ ├── RatelimitedException.html
│ │ ├── package-summary.html
│ │ └── package-tree.html
│ │ ├── managers
│ │ ├── PlayerManager.html
│ │ ├── ServerManager.html
│ │ ├── TextureManager.html
│ │ ├── package-summary.html
│ │ └── package-tree.html
│ │ ├── package-summary.html
│ │ └── package-tree.html
├── overview-summary.html
├── overview-tree.html
├── package-search-index.js
├── resources
│ ├── glass.png
│ └── x.png
├── script-dir
│ ├── images
│ │ ├── ui-bg_glass_55_fbf9ee_1x400.png
│ │ ├── ui-bg_glass_65_dadada_1x400.png
│ │ ├── ui-bg_glass_75_dadada_1x400.png
│ │ ├── ui-bg_glass_75_e6e6e6_1x400.png
│ │ ├── ui-bg_glass_95_fef1ec_1x400.png
│ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png
│ │ ├── ui-icons_222222_256x240.png
│ │ ├── ui-icons_2e83ff_256x240.png
│ │ ├── ui-icons_454545_256x240.png
│ │ ├── ui-icons_888888_256x240.png
│ │ └── ui-icons_cd0a0a_256x240.png
│ ├── jquery-3.5.1.min.js
│ ├── jquery-ui.min.css
│ ├── jquery-ui.min.js
│ └── jquery-ui.structure.min.css
├── script.js
├── search.js
├── serialized-form.html
├── stylesheet.css
├── tag-search-index.js
└── type-search-index.js
├── pom.xml
└── src
└── main
└── java
└── net
└── swofty
└── hyperlandsapi
├── Connection.java
├── Endpoints.java
├── HyperlandsAPI.java
├── XUID.java
├── datatypes
├── PlayerCounts.java
├── PlayerStatistics.java
├── playercounts
│ ├── BedWarsCount.java
│ ├── DuelsCount.java
│ ├── LobbyCount.java
│ ├── SkyWarsCount.java
│ ├── TheBridgeCount.java
│ └── UHCMeetupCount.java
└── statistics
│ ├── BedWarsStatistics.java
│ ├── DuelStatistics.java
│ ├── GeneralStatistics.java
│ ├── SkyWarsStatistics.java
│ ├── SpleefStatistics.java
│ ├── TheBridgeStatistics.java
│ └── UHCMeetupStatistics.java
├── exceptions
├── EmptyNameOrXUIDException.java
├── PlayerNotFoundException.java
└── RatelimitedException.java
└── managers
├── PlayerManager.java
├── ServerManager.java
└── TextureManager.java
/.gitignore:
--------------------------------------------------------------------------------
1 | # Project exclude paths
2 | /target/
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Editor-based HTTP Client requests
5 | /httpRequests/
6 | # Datasource local storage ignored files
7 | /dataSources/
8 | /dataSources.local.xml
9 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/discord.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/jarRepositories.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) [2022] [Jiří Apjár]
4 | Copyright (c) [2022] [Filip Zeman]
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 |
--------------------------------------------------------------------------------
/docs/allpackages-index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | All Packages
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
26 |
51 |
52 |
53 |
56 | Package Summary
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/docs/element-list:
--------------------------------------------------------------------------------
1 | net.swofty.hyperlandsapi
2 | net.swofty.hyperlandsapi.datatypes
3 | net.swofty.hyperlandsapi.datatypes.playercounts
4 | net.swofty.hyperlandsapi.datatypes.statistics
5 | net.swofty.hyperlandsapi.exceptions
6 | net.swofty.hyperlandsapi.managers
7 |
--------------------------------------------------------------------------------
/docs/help-doc.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | API Help
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
26 |
51 |
52 |
53 |
57 |
58 | Overview
59 | The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
60 |
61 |
62 | Package
63 | Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain six categories:
64 |
65 | Interfaces
66 | Classes
67 | Enum Classes
68 | Exceptions
69 | Errors
70 | Annotation Interfaces
71 |
72 |
73 |
74 | Class or Interface
75 | Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
76 |
77 | Class Inheritance Diagram
78 | Direct Subclasses
79 | All Known Subinterfaces
80 | All Known Implementing Classes
81 | Class or Interface Declaration
82 | Class or Interface Description
83 |
84 |
85 |
86 | Nested Class Summary
87 | Field Summary
88 | Property Summary
89 | Constructor Summary
90 | Method Summary
91 |
92 |
93 |
94 | Field Details
95 | Property Details
96 | Constructor Details
97 | Method Details
98 |
99 | The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
100 |
101 |
102 | Annotation Interface
103 | Each annotation interface has its own separate page with the following sections:
104 |
105 | Annotation Interface Declaration
106 | Annotation Interface Description
107 | Required Element Summary
108 | Optional Element Summary
109 | Element Details
110 |
111 |
112 |
113 | Enum Class
114 | Each enum class has its own separate page with the following sections:
115 |
116 | Enum Declaration
117 | Enum Description
118 | Enum Constant Summary
119 | Enum Constant Details
120 |
121 |
122 |
123 | Tree (Class Hierarchy)
124 | There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object
. Interfaces do not inherit from java.lang.Object
.
125 |
126 | When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
127 | When viewing a particular package, class or interface page, clicking on "Tree" displays the hierarchy for only that package.
128 |
129 |
130 |
131 | Index
132 | The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields, as well as lists of all packages and all classes.
133 |
134 |
135 | Serialized Form
136 | Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to those who implement rather than use the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See Also" section of the class description.
137 |
138 |
139 | Search
140 | You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camel-case" abbreviations. For example:
141 |
142 | j.l.obj
will match "java.lang.Object"
143 | InpStr
will match "java.io.InputStream"
144 | HM.cK
will match "java.util.HashMap.containsKey(Object)"
145 |
146 | Refer to the Javadoc Search Specification for a full description of search features.
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
--------------------------------------------------------------------------------
/docs/index-files/index-1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | A-Index
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/docs/index-files/index-10.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | K-Index
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/docs/index-files/index-11.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | L-Index
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/docs/index-files/index-12.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | M-Index
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/docs/index-files/index-13.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | N-Index
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/docs/index-files/index-15.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | R-Index
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/docs/index-files/index-18.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | U-Index
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/docs/index-files/index-19.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | V-Index
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/docs/index-files/index-20.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | W-Index
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/docs/index-files/index-21.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | X-Index
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/docs/index-files/index-3.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | C-Index
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/docs/index-files/index-4.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | D-Index
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/docs/index-files/index-5.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | E-Index
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/docs/index-files/index-6.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | F-Index
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/docs/index-files/index-8.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | H-Index
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/docs/index-files/index-9.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | I-Index
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Overview
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
26 |
51 |
52 |
53 |
54 |
Packages
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/docs/jquery-ui.overrides.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 | *
5 | * This code is free software; you can redistribute it and/or modify it
6 | * under the terms of the GNU General Public License version 2 only, as
7 | * published by the Free Software Foundation. Oracle designates this
8 | * particular file as subject to the "Classpath" exception as provided
9 | * by Oracle in the LICENSE file that accompanied this code.
10 | *
11 | * This code is distributed in the hope that it will be useful, but WITHOUT
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 | * version 2 for more details (a copy is included in the LICENSE file that
15 | * accompanied this code).
16 | *
17 | * You should have received a copy of the GNU General Public License version
18 | * 2 along with this work; if not, write to the Free Software Foundation,
19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 | *
21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 | * or visit www.oracle.com if you need additional information or have any
23 | * questions.
24 | */
25 |
26 | .ui-state-active,
27 | .ui-widget-content .ui-state-active,
28 | .ui-widget-header .ui-state-active,
29 | a.ui-button:active,
30 | .ui-button:active,
31 | .ui-button.ui-state-active:hover {
32 | /* Overrides the color of selection used in jQuery UI */
33 | background: #F8981D;
34 | }
35 |
--------------------------------------------------------------------------------
/docs/module-search-index.js:
--------------------------------------------------------------------------------
1 | moduleSearchIndex = [];updateSearchResults();
--------------------------------------------------------------------------------
/docs/net/swofty/hyperlandsapi/datatypes/package-summary.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | net.swofty.hyperlandsapi.datatypes
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
26 |
51 |
52 |
53 |
56 |
57 | package net.swofty.hyperlandsapi.datatypes
58 |
59 |
60 |
61 | Class Summary
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/docs/net/swofty/hyperlandsapi/datatypes/package-tree.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | net.swofty.hyperlandsapi.datatypes Class Hierarchy
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
26 |
51 |
52 |
53 |
60 |
61 | Class Hierarchy
62 |
63 | java.lang.Object
64 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/docs/net/swofty/hyperlandsapi/datatypes/playercounts/package-summary.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | net.swofty.hyperlandsapi.datatypes.playercounts
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
26 |
51 |
52 |
53 |
56 |
57 | package net.swofty.hyperlandsapi.datatypes.playercounts
58 |
59 |
60 |
61 | Class Summary
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/docs/net/swofty/hyperlandsapi/datatypes/playercounts/package-tree.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | net.swofty.hyperlandsapi.datatypes.playercounts Class Hierarchy
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
26 |
51 |
52 |
53 |
60 |
61 | Class Hierarchy
62 |
63 | java.lang.Object
64 |
65 | net.swofty.hyperlandsapi.datatypes.playercounts.BedWarsCount
66 | net.swofty.hyperlandsapi.datatypes.playercounts.DuelsCount
67 | net.swofty.hyperlandsapi.datatypes.playercounts.LobbyCount
68 | net.swofty.hyperlandsapi.datatypes.playercounts.SkyWarsCount
69 | net.swofty.hyperlandsapi.datatypes.playercounts.TheBridgeCount
70 | net.swofty.hyperlandsapi.datatypes.playercounts.UHCMeetupCount
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/docs/net/swofty/hyperlandsapi/datatypes/statistics/package-summary.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | net.swofty.hyperlandsapi.datatypes.statistics
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
26 |
51 |
52 |
53 |
56 |
57 | package net.swofty.hyperlandsapi.datatypes.statistics
58 |
59 |
60 |
61 | Class Summary
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/docs/net/swofty/hyperlandsapi/datatypes/statistics/package-tree.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | net.swofty.hyperlandsapi.datatypes.statistics Class Hierarchy
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
26 |
51 |
52 |
53 |
60 |
61 | Class Hierarchy
62 |
63 | java.lang.Object
64 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/docs/net/swofty/hyperlandsapi/exceptions/package-summary.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | net.swofty.hyperlandsapi.exceptions
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
26 |
51 |
52 |
53 |
56 |
57 | package net.swofty.hyperlandsapi.exceptions
58 |
59 |
60 |
61 | Exception Summary
62 |
63 |
64 |
65 |
66 |
67 |
This class is a custom exception that is thrown when a player's name or XUID is empty.
68 |
69 |
70 |
71 |
The PlayerNotFoundException class extends the RuntimeException class and is used to throw an exception when a player is
72 | not found
73 |
74 |
75 |
76 |
This class is a custom exception that is thrown when the rate limit is exceeded
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/docs/net/swofty/hyperlandsapi/exceptions/package-tree.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | net.swofty.hyperlandsapi.exceptions Class Hierarchy
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
26 |
51 |
52 |
53 |
60 |
61 | Class Hierarchy
62 |
63 | java.lang.Object
64 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/docs/net/swofty/hyperlandsapi/managers/package-summary.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | net.swofty.hyperlandsapi.managers
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
26 |
51 |
52 |
53 |
56 |
57 | package net.swofty.hyperlandsapi.managers
58 |
59 |
60 |
61 | Class Summary
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/docs/net/swofty/hyperlandsapi/managers/package-tree.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | net.swofty.hyperlandsapi.managers Class Hierarchy
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
26 |
51 |
52 |
53 |
60 |
61 | Class Hierarchy
62 |
63 | java.lang.Object
64 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/docs/net/swofty/hyperlandsapi/package-summary.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | net.swofty.hyperlandsapi
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
26 |
51 |
52 |
53 |
56 |
57 | package net.swofty.hyperlandsapi
58 |
59 |
60 |
61 | Class Summary
62 |
63 |
64 |
65 |
66 |
67 |
The class that handles all of the outgoing connections to the API
68 | Note that even though all calls are async, they are dependent on the Connection object
69 | So if you call two different API method with the same Connection object they will wait for
70 | one another
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 | Enum Class Summary
80 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/docs/net/swofty/hyperlandsapi/package-tree.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | net.swofty.hyperlandsapi Class Hierarchy
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
26 |
51 |
52 |
53 |
60 |
61 | Class Hierarchy
62 |
63 | java.lang.Object
64 |
69 |
70 |
71 |
72 |
73 | Enum Class Hierarchy
74 |
75 | java.lang.Object
76 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
--------------------------------------------------------------------------------
/docs/overview-summary.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Generated Documentation (Untitled)
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 | index.html
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/docs/package-search-index.js:
--------------------------------------------------------------------------------
1 | packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"net.swofty.hyperlandsapi"},{"l":"net.swofty.hyperlandsapi.datatypes"},{"l":"net.swofty.hyperlandsapi.datatypes.playercounts"},{"l":"net.swofty.hyperlandsapi.datatypes.statistics"},{"l":"net.swofty.hyperlandsapi.exceptions"},{"l":"net.swofty.hyperlandsapi.managers"}];updateSearchResults();
--------------------------------------------------------------------------------
/docs/resources/glass.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Swofty-Developments/HyperlandsAPI/b7402457198a8f04843bf8942b9313c9957a079a/docs/resources/glass.png
--------------------------------------------------------------------------------
/docs/resources/x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Swofty-Developments/HyperlandsAPI/b7402457198a8f04843bf8942b9313c9957a079a/docs/resources/x.png
--------------------------------------------------------------------------------
/docs/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Swofty-Developments/HyperlandsAPI/b7402457198a8f04843bf8942b9313c9957a079a/docs/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png
--------------------------------------------------------------------------------
/docs/script-dir/images/ui-bg_glass_65_dadada_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Swofty-Developments/HyperlandsAPI/b7402457198a8f04843bf8942b9313c9957a079a/docs/script-dir/images/ui-bg_glass_65_dadada_1x400.png
--------------------------------------------------------------------------------
/docs/script-dir/images/ui-bg_glass_75_dadada_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Swofty-Developments/HyperlandsAPI/b7402457198a8f04843bf8942b9313c9957a079a/docs/script-dir/images/ui-bg_glass_75_dadada_1x400.png
--------------------------------------------------------------------------------
/docs/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Swofty-Developments/HyperlandsAPI/b7402457198a8f04843bf8942b9313c9957a079a/docs/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png
--------------------------------------------------------------------------------
/docs/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Swofty-Developments/HyperlandsAPI/b7402457198a8f04843bf8942b9313c9957a079a/docs/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png
--------------------------------------------------------------------------------
/docs/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Swofty-Developments/HyperlandsAPI/b7402457198a8f04843bf8942b9313c9957a079a/docs/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png
--------------------------------------------------------------------------------
/docs/script-dir/images/ui-icons_222222_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Swofty-Developments/HyperlandsAPI/b7402457198a8f04843bf8942b9313c9957a079a/docs/script-dir/images/ui-icons_222222_256x240.png
--------------------------------------------------------------------------------
/docs/script-dir/images/ui-icons_2e83ff_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Swofty-Developments/HyperlandsAPI/b7402457198a8f04843bf8942b9313c9957a079a/docs/script-dir/images/ui-icons_2e83ff_256x240.png
--------------------------------------------------------------------------------
/docs/script-dir/images/ui-icons_454545_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Swofty-Developments/HyperlandsAPI/b7402457198a8f04843bf8942b9313c9957a079a/docs/script-dir/images/ui-icons_454545_256x240.png
--------------------------------------------------------------------------------
/docs/script-dir/images/ui-icons_888888_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Swofty-Developments/HyperlandsAPI/b7402457198a8f04843bf8942b9313c9957a079a/docs/script-dir/images/ui-icons_888888_256x240.png
--------------------------------------------------------------------------------
/docs/script-dir/images/ui-icons_cd0a0a_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Swofty-Developments/HyperlandsAPI/b7402457198a8f04843bf8942b9313c9957a079a/docs/script-dir/images/ui-icons_cd0a0a_256x240.png
--------------------------------------------------------------------------------
/docs/script-dir/jquery-ui.structure.min.css:
--------------------------------------------------------------------------------
1 | /*! jQuery UI - v1.12.1 - 2018-12-06
2 | * http://jqueryui.com
3 | * Copyright jQuery Foundation and other contributors; Licensed MIT */
4 |
5 | .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}
--------------------------------------------------------------------------------
/docs/script.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 | *
5 | * This code is free software; you can redistribute it and/or modify it
6 | * under the terms of the GNU General Public License version 2 only, as
7 | * published by the Free Software Foundation. Oracle designates this
8 | * particular file as subject to the "Classpath" exception as provided
9 | * by Oracle in the LICENSE file that accompanied this code.
10 | *
11 | * This code is distributed in the hope that it will be useful, but WITHOUT
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 | * version 2 for more details (a copy is included in the LICENSE file that
15 | * accompanied this code).
16 | *
17 | * You should have received a copy of the GNU General Public License version
18 | * 2 along with this work; if not, write to the Free Software Foundation,
19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 | *
21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 | * or visit www.oracle.com if you need additional information or have any
23 | * questions.
24 | */
25 |
26 | var moduleSearchIndex;
27 | var packageSearchIndex;
28 | var typeSearchIndex;
29 | var memberSearchIndex;
30 | var tagSearchIndex;
31 | function loadScripts(doc, tag) {
32 | createElem(doc, tag, 'search.js');
33 |
34 | createElem(doc, tag, 'module-search-index.js');
35 | createElem(doc, tag, 'package-search-index.js');
36 | createElem(doc, tag, 'type-search-index.js');
37 | createElem(doc, tag, 'member-search-index.js');
38 | createElem(doc, tag, 'tag-search-index.js');
39 | }
40 |
41 | function createElem(doc, tag, path) {
42 | var script = doc.createElement(tag);
43 | var scriptElement = doc.getElementsByTagName(tag)[0];
44 | script.src = pathtoroot + path;
45 | scriptElement.parentNode.insertBefore(script, scriptElement);
46 | }
47 |
48 | function show(tableId, selected, columns) {
49 | if (tableId !== selected) {
50 | document.querySelectorAll('div.' + tableId + ':not(.' + selected + ')')
51 | .forEach(function(elem) {
52 | elem.style.display = 'none';
53 | });
54 | }
55 | document.querySelectorAll('div.' + selected)
56 | .forEach(function(elem, index) {
57 | elem.style.display = '';
58 | var isEvenRow = index % (columns * 2) < columns;
59 | elem.classList.remove(isEvenRow ? oddRowColor : evenRowColor);
60 | elem.classList.add(isEvenRow ? evenRowColor : oddRowColor);
61 | });
62 | updateTabs(tableId, selected);
63 | }
64 |
65 | function updateTabs(tableId, selected) {
66 | document.querySelector('div#' + tableId +' .summary-table')
67 | .setAttribute('aria-labelledby', selected);
68 | document.querySelectorAll('button[id^="' + tableId + '"]')
69 | .forEach(function(tab, index) {
70 | if (selected === tab.id || (tableId === selected && index === 0)) {
71 | tab.className = activeTableTab;
72 | tab.setAttribute('aria-selected', true);
73 | tab.setAttribute('tabindex',0);
74 | } else {
75 | tab.className = tableTab;
76 | tab.setAttribute('aria-selected', false);
77 | tab.setAttribute('tabindex',-1);
78 | }
79 | });
80 | }
81 |
82 | function switchTab(e) {
83 | var selected = document.querySelector('[aria-selected=true]');
84 | if (selected) {
85 | if ((e.keyCode === 37 || e.keyCode === 38) && selected.previousSibling) {
86 | // left or up arrow key pressed: move focus to previous tab
87 | selected.previousSibling.click();
88 | selected.previousSibling.focus();
89 | e.preventDefault();
90 | } else if ((e.keyCode === 39 || e.keyCode === 40) && selected.nextSibling) {
91 | // right or down arrow key pressed: move focus to next tab
92 | selected.nextSibling.click();
93 | selected.nextSibling.focus();
94 | e.preventDefault();
95 | }
96 | }
97 | }
98 |
99 | var updateSearchResults = function() {};
100 |
101 | function indexFilesLoaded() {
102 | return moduleSearchIndex
103 | && packageSearchIndex
104 | && typeSearchIndex
105 | && memberSearchIndex
106 | && tagSearchIndex;
107 | }
108 |
109 | // Workaround for scroll position not being included in browser history (8249133)
110 | document.addEventListener("DOMContentLoaded", function(e) {
111 | var contentDiv = document.querySelector("div.flex-content");
112 | window.addEventListener("popstate", function(e) {
113 | if (e.state !== null) {
114 | contentDiv.scrollTop = e.state;
115 | }
116 | });
117 | window.addEventListener("hashchange", function(e) {
118 | history.replaceState(contentDiv.scrollTop, document.title);
119 | });
120 | contentDiv.addEventListener("scroll", function(e) {
121 | var timeoutID;
122 | if (!timeoutID) {
123 | timeoutID = setTimeout(function() {
124 | history.replaceState(contentDiv.scrollTop, document.title);
125 | timeoutID = null;
126 | }, 100);
127 | }
128 | });
129 | if (!location.hash) {
130 | history.replaceState(contentDiv.scrollTop, document.title);
131 | }
132 | });
133 |
--------------------------------------------------------------------------------
/docs/serialized-form.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Serialized Form
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 | JavaScript is disabled on your browser.
24 |
25 |
26 |
51 |
52 |
53 |
56 |
57 |
58 |
59 | Package net.swofty.hyperlandsapi.exceptions
60 |
61 |
62 |
65 |
66 |
67 |
70 |
71 |
72 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/docs/tag-search-index.js:
--------------------------------------------------------------------------------
1 | tagSearchIndex = [{"l":"Serialized Form","h":"","u":"serialized-form.html"}];updateSearchResults();
--------------------------------------------------------------------------------
/docs/type-search-index.js:
--------------------------------------------------------------------------------
1 | typeSearchIndex = [{"l":"All Classes","u":"allclasses-index.html"},{"p":"net.swofty.hyperlandsapi.datatypes.playercounts","l":"BedWarsCount"},{"p":"net.swofty.hyperlandsapi.datatypes.statistics","l":"BedWarsStatistics"},{"p":"net.swofty.hyperlandsapi","l":"Connection"},{"p":"net.swofty.hyperlandsapi.datatypes.playercounts","l":"DuelsCount"},{"p":"net.swofty.hyperlandsapi.datatypes.statistics","l":"DuelStatistics"},{"p":"net.swofty.hyperlandsapi.exceptions","l":"EmptyNameOrXUIDException"},{"p":"net.swofty.hyperlandsapi","l":"Endpoints"},{"p":"net.swofty.hyperlandsapi.datatypes.statistics","l":"GeneralStatistics"},{"p":"net.swofty.hyperlandsapi","l":"HyperlandsAPI"},{"p":"net.swofty.hyperlandsapi.datatypes.playercounts","l":"LobbyCount"},{"p":"net.swofty.hyperlandsapi.datatypes","l":"PlayerCounts"},{"p":"net.swofty.hyperlandsapi.managers","l":"PlayerManager"},{"p":"net.swofty.hyperlandsapi.exceptions","l":"PlayerNotFoundException"},{"p":"net.swofty.hyperlandsapi.datatypes","l":"PlayerStatistics"},{"p":"net.swofty.hyperlandsapi.exceptions","l":"RatelimitedException"},{"p":"net.swofty.hyperlandsapi.managers","l":"ServerManager"},{"p":"net.swofty.hyperlandsapi.datatypes.playercounts","l":"SkyWarsCount"},{"p":"net.swofty.hyperlandsapi.datatypes.statistics","l":"SkyWarsStatistics"},{"p":"net.swofty.hyperlandsapi.datatypes.statistics","l":"SpleefStatistics"},{"p":"net.swofty.hyperlandsapi.managers","l":"TextureManager"},{"p":"net.swofty.hyperlandsapi.datatypes.playercounts","l":"TheBridgeCount"},{"p":"net.swofty.hyperlandsapi.datatypes.statistics","l":"TheBridgeStatistics"},{"p":"net.swofty.hyperlandsapi.datatypes.playercounts","l":"UHCMeetupCount"},{"p":"net.swofty.hyperlandsapi.datatypes.statistics","l":"UHCMeetupStatistics"},{"p":"net.swofty.hyperlandsapi","l":"XUID"}];updateSearchResults();
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 |
7 | net.swofty
8 | HyperlandsJavaAPI
9 | 1.0-SNAPSHOT
10 |
11 |
12 | 1.8
13 | 1.8
14 |
15 |
16 |
17 |
18 | org.projectlombok
19 | lombok
20 | 1.18.24
21 | provided
22 |
23 |
24 | org.json
25 | json
26 | 20210307
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/Connection.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi;
2 |
3 | import net.swofty.hyperlandsapi.managers.PlayerManager;
4 | import net.swofty.hyperlandsapi.managers.ServerManager;
5 | import net.swofty.hyperlandsapi.managers.TextureManager;
6 |
7 | import java.util.concurrent.ExecutorService;
8 | import java.util.concurrent.Executors;
9 |
10 | /**
11 | * The class that handles all of the outgoing connections to the API
12 | * Note that even though all calls are async, they are dependent on the Connection object
13 | * So if you call two different API method with the same Connection object they will wait for
14 | * one another
15 | */
16 | public class Connection {
17 |
18 | // The base URL of the API.
19 | public static String baseURL = "https://api.hyperlandsmc.net";
20 |
21 | // It's a variable that stores the time the connection was last used.
22 | private long usedTimestamp;
23 |
24 | // It's creating a new thread that will be used to execute the code.
25 | private final ExecutorService executor = Executors.newSingleThreadExecutor();
26 |
27 | Connection() {
28 | usedTimestamp = 0;
29 | }
30 |
31 | /**
32 | * This function returns a new instance of the TextureManager class, which is a class that manages the accessing of
33 | * textures
34 | *
35 | * @return A new instance of TextureManager.
36 | */
37 | public TextureManager getTextureManager() {
38 | return new TextureManager(this, executor);
39 | }
40 |
41 | /**
42 | * This function returns a new instance of the ServerManager class, which is a class that manages server functions
43 | * such as player counts
44 | *
45 | * @return A new instance of ServerManager.
46 | */
47 | public ServerManager getServerManager() {
48 | return new ServerManager(this, executor);
49 | }
50 |
51 |
52 | /**
53 | * This function returns a new instance of the PlayerManager class, which is a class that manages the accessing of
54 | * player statistics
55 | *
56 | * @return A new instance of PlayerManager.
57 | */
58 | public PlayerManager getPlayerManager() {
59 | return new PlayerManager(this, executor);
60 | }
61 |
62 | /**
63 | * This function returns the timestamp of the last time the connection was used
64 | *
65 | * @return The usedTimestamp variable is being returned.
66 | */
67 | public Long getUsedTimestamp() {
68 | return usedTimestamp;
69 | }
70 |
71 | private void updateTimestamp() {
72 | usedTimestamp = System.currentTimeMillis();
73 | }
74 |
75 | }
76 |
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/Endpoints.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi;
2 |
3 | import lombok.Getter;
4 |
5 | public enum Endpoints {
6 | SKIN("/skin/"),
7 | HEAD("/head/"),
8 | STATS("/stats/"),
9 | STATS_XUID("/xuid/"),
10 | FUZZY_SEARCH("/fuzzySearch/"),
11 | PLAYER_COUNT("/playerCounts"),
12 | ;
13 |
14 | @Getter
15 | public String urlPath;
16 |
17 | Endpoints(String urlPath) {
18 | this.urlPath = urlPath;
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/HyperlandsAPI.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi;
2 |
3 | public class HyperlandsAPI {
4 |
5 | /**
6 | * This function returns a new Connection object.
7 | *
8 | * @return A new Connection object.
9 | */
10 | public static Connection getConnection() {
11 | return new Connection();
12 | }
13 |
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/XUID.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi;
2 |
3 | import lombok.Getter;
4 |
5 | public class XUID {
6 |
7 | @Getter
8 | public String XUID;
9 |
10 | XUID(String XUID) {
11 | this.XUID = XUID;
12 | }
13 |
14 | public static XUID getFromLong(Long XUID) {
15 | return new XUID(String.valueOf(XUID));
16 | }
17 |
18 | public static XUID getFromString(String XUID) {
19 | return new XUID(XUID);
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/datatypes/PlayerCounts.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi.datatypes;
2 |
3 | import lombok.Getter;
4 | import net.swofty.hyperlandsapi.datatypes.playercounts.*;
5 | import org.json.JSONObject;
6 |
7 | public class PlayerCounts {
8 |
9 | @Getter
10 | private final JSONObject object;
11 |
12 | @Getter
13 | public Double total;
14 | @Getter
15 | public BedWarsCount bedWarsCount;
16 | @Getter
17 | public DuelsCount duelsCount;
18 | @Getter
19 | public LobbyCount lobbyCount;
20 | @Getter
21 | public SkyWarsCount skyWarsCount;
22 | @Getter
23 | public TheBridgeCount theBridgeCount;
24 | @Getter
25 | public UHCMeetupCount uhcMeetupCount;
26 |
27 | public PlayerCounts(JSONObject object) {
28 | this.object = object;
29 |
30 | this.total = object.getDouble("total");
31 |
32 | this.bedWarsCount = new BedWarsCount(
33 | object.getJSONObject("bedwars").getDouble("total"),
34 | object.getJSONObject("bedwars").getJSONObject("modes").getDouble("solos"),
35 | object.getJSONObject("bedwars").getJSONObject("modes").getDouble("doubles"),
36 | object.getJSONObject("bedwars").getJSONObject("modes").getDouble("squads")
37 | );
38 |
39 | this.lobbyCount = new LobbyCount(
40 | object.getJSONObject("lobby").getDouble("total")
41 | );
42 |
43 | this.skyWarsCount = new SkyWarsCount(
44 | object.getJSONObject("skywars").getDouble("total"),
45 | object.getJSONObject("skywars").getJSONObject("modes").getDouble("solos"),
46 | object.getJSONObject("skywars").getJSONObject("modes").getDouble("doubles"),
47 | object.getJSONObject("skywars").getJSONObject("modes").getDouble("duels")
48 | );
49 |
50 | this.theBridgeCount = new TheBridgeCount(
51 | object.getJSONObject("thebridge").getDouble("total"),
52 | object.getJSONObject("thebridge").getJSONObject("modes").getDouble("solos-ranked"),
53 | object.getJSONObject("thebridge").getJSONObject("modes").getDouble("solos-casual"),
54 | object.getJSONObject("thebridge").getJSONObject("modes").getDouble("doubles-casual")
55 | );
56 |
57 | this.uhcMeetupCount = new UHCMeetupCount(
58 | object.getJSONObject("uhcmeetup").getDouble("total"),
59 | object.getJSONObject("uhcmeetup").getJSONObject("modes").getDouble("solos")
60 | );
61 |
62 | this.duelsCount = new DuelsCount(
63 | object.getJSONObject("uhcmeetup").getDouble("total")
64 | );
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/datatypes/PlayerStatistics.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi.datatypes;
2 |
3 | import lombok.Getter;
4 | import net.swofty.hyperlandsapi.datatypes.statistics.*;
5 | import org.json.JSONObject;
6 |
7 | public class PlayerStatistics {
8 |
9 | @Getter
10 | private final JSONObject object;
11 |
12 | @Getter
13 | public Boolean isOnline;
14 | @Getter
15 | public Double lastLogout;
16 | @Getter
17 | public String lastServer;
18 | @Getter
19 | public String rank;
20 | @Getter
21 | public String tag;
22 | @Getter
23 | public String plusColor;
24 | @Getter
25 | public Double expiry;
26 |
27 | @Getter
28 | public GeneralStatistics generalStatistics;
29 | @Getter
30 | public SkyWarsStatistics skyWarsStatistics;
31 | @Getter
32 | public BedWarsStatistics bedWarsStatistics;
33 | @Getter
34 | public TheBridgeStatistics theBridgeStatistics;
35 | @Getter
36 | public SpleefStatistics spleefStatistics;
37 | @Getter
38 | public DuelStatistics duelStatistics;
39 | @Getter
40 | public UHCMeetupStatistics uhcMeetupStatistics;
41 |
42 | public PlayerStatistics(JSONObject object) {
43 | this.object = object;
44 |
45 | this.isOnline = object.getJSONObject("status").getBoolean("online");
46 | this.lastLogout = object.getJSONObject("status").getDouble("lastLogout");
47 | this.lastServer = object.getJSONObject("status").getString("lastServer");
48 |
49 | this.rank = object.getJSONObject("rankData").getString("rank");
50 | this.tag = object.getJSONObject("rankData").getString("tag");
51 | this.plusColor = object.getJSONObject("rankData").getString("pluscolor");
52 | this.expiry = object.getJSONObject("rankData").getDouble("expiry");
53 |
54 | this.generalStatistics = new GeneralStatistics(
55 | object.getJSONObject("stats").getJSONObject("general").getString("playerName"),
56 | object.getJSONObject("stats").getJSONObject("general").getString("xuid"),
57 | object.getJSONObject("stats").getJSONObject("general").getDouble("level"),
58 | object.getJSONObject("stats").getJSONObject("general").getDouble("progress"),
59 | object.getJSONObject("stats").getJSONObject("general").getDouble("maxProgress")
60 | );
61 |
62 | this.skyWarsStatistics = new SkyWarsStatistics(
63 | object.getJSONObject("stats").getJSONObject("skywars").getDouble("wins"),
64 | object.getJSONObject("stats").getJSONObject("skywars").getDouble("kills")
65 | );
66 |
67 | this.bedWarsStatistics = new BedWarsStatistics(
68 | object.getJSONObject("stats").getJSONObject("bedwars").getDouble("wins"),
69 | object.getJSONObject("stats").getJSONObject("bedwars").getDouble("kills"),
70 | object.getJSONObject("stats").getJSONObject("bedwars").getDouble("finalKills"),
71 | object.getJSONObject("stats").getJSONObject("bedwars").getDouble("bedsBroken"),
72 | object.getJSONObject("stats").getJSONObject("bedwars").getDouble("currentWinstreak"),
73 | object.getJSONObject("stats").getJSONObject("bedwars").getDouble("bestWinstreak")
74 | );
75 |
76 | this.theBridgeStatistics = new TheBridgeStatistics(
77 | object.getJSONObject("stats").getJSONObject("thebridge").getDouble("wins"),
78 | object.getJSONObject("stats").getJSONObject("thebridge").getDouble("goals"),
79 | object.getJSONObject("stats").getJSONObject("thebridge").getDouble("currentWinstreak"),
80 | object.getJSONObject("stats").getJSONObject("thebridge").getDouble("bestWinstreak"),
81 | object.getJSONObject("stats").getJSONObject("thebridge").getDouble("peakRatingSolos")
82 | );
83 |
84 | this.spleefStatistics = new SpleefStatistics(
85 | object.getJSONObject("stats").getJSONObject("spleef").getDouble("wins"),
86 | object.getJSONObject("stats").getJSONObject("spleef").getDouble("currentWinstreak"),
87 | object.getJSONObject("stats").getJSONObject("spleef").getDouble("bestWinstreak")
88 | );
89 |
90 | this.duelStatistics = new DuelStatistics(
91 | object.getJSONObject("stats").getJSONObject("duels").getDouble("buildUhcWins"),
92 | object.getJSONObject("stats").getJSONObject("duels").getDouble("potWins"),
93 | object.getJSONObject("stats").getJSONObject("duels").getDouble("ironWins"),
94 | object.getJSONObject("stats").getJSONObject("duels").getDouble("archerWins"),
95 | object.getJSONObject("stats").getJSONObject("duels").getDouble("sumoWins"),
96 | object.getJSONObject("stats").getJSONObject("duels").getDouble("elo"),
97 | object.getJSONObject("stats").getJSONObject("duels").getDouble("currentWinstreak"),
98 | object.getJSONObject("stats").getJSONObject("duels").getDouble("bestWinstreak")
99 | );
100 |
101 | this.uhcMeetupStatistics = new UHCMeetupStatistics(
102 | object.getJSONObject("stats").getJSONObject("uhcmeetup").getDouble("wins"),
103 | object.getJSONObject("stats").getJSONObject("uhcmeetup").getDouble("kills")
104 | );
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/datatypes/playercounts/BedWarsCount.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi.datatypes.playercounts;
2 |
3 | import lombok.Getter;
4 |
5 | public class BedWarsCount {
6 |
7 | @Getter
8 | public Double total;
9 | @Getter
10 | public Double solos;
11 | @Getter
12 | public Double doubles;
13 | @Getter
14 | public Double squads;
15 |
16 | public BedWarsCount(Double total, Double solos, Double doubles, Double squads) {
17 | this.total = total;
18 | this.solos = solos;
19 | this.doubles = doubles;
20 | this.squads = squads;
21 | }
22 |
23 | }
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/datatypes/playercounts/DuelsCount.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi.datatypes.playercounts;
2 |
3 | import lombok.Getter;
4 |
5 | public class DuelsCount {
6 |
7 | @Getter
8 | public Double total;
9 |
10 | public DuelsCount(Double total) {
11 | this.total = total;
12 | }
13 |
14 | }
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/datatypes/playercounts/LobbyCount.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi.datatypes.playercounts;
2 |
3 | import lombok.Getter;
4 |
5 | public class LobbyCount {
6 |
7 | @Getter
8 | public Double total;
9 |
10 | public LobbyCount(Double total) {
11 | this.total = total;
12 | }
13 |
14 | }
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/datatypes/playercounts/SkyWarsCount.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi.datatypes.playercounts;
2 |
3 | import lombok.Getter;
4 |
5 | public class SkyWarsCount {
6 |
7 | @Getter
8 | public Double total;
9 | @Getter
10 | public Double solos;
11 | @Getter
12 | public Double doubles;
13 | @Getter
14 | public Double duels;
15 |
16 | public SkyWarsCount(Double total, Double solos, Double doubles, Double duels) {
17 | this.total = total;
18 | this.solos = solos;
19 | this.doubles = doubles;
20 | this.duels = duels;
21 | }
22 |
23 | }
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/datatypes/playercounts/TheBridgeCount.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi.datatypes.playercounts;
2 |
3 | import lombok.Getter;
4 |
5 | public class TheBridgeCount {
6 |
7 | @Getter
8 | public Double total;
9 | @Getter
10 | public Double solosRanked;
11 | @Getter
12 | public Double solosCasual;
13 | @Getter
14 | public Double doublesCasual;
15 |
16 | public TheBridgeCount(Double total, Double solosRanked, Double solosCasual, Double doublesCasual) {
17 | this.total = total;
18 | this.solosRanked = solosRanked;
19 | this.solosCasual = solosCasual;
20 | this.doublesCasual = doublesCasual;
21 | }
22 |
23 | }
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/datatypes/playercounts/UHCMeetupCount.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi.datatypes.playercounts;
2 |
3 | import lombok.Getter;
4 |
5 | public class UHCMeetupCount {
6 |
7 | @Getter
8 | public Double total;
9 | @Getter
10 | public Double solos;
11 |
12 | public UHCMeetupCount(Double total, Double solos) {
13 | this.total = total;
14 | this.solos = solos;
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/datatypes/statistics/BedWarsStatistics.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi.datatypes.statistics;
2 |
3 | import lombok.Getter;
4 |
5 | public class BedWarsStatistics {
6 |
7 | @Getter
8 | public Double wins;
9 | @Getter
10 | public Double kills;
11 | @Getter
12 | public Double finalKills;
13 | @Getter
14 | public Double bedsBroken;
15 | @Getter
16 | public Double currentWinstreak;
17 | @Getter
18 | public Double bestWinstreak;
19 |
20 | public BedWarsStatistics(Double wins, Double kills, Double finalKills, Double bedsBroken, Double currentWinstreak, Double bestWinstreak) {
21 | this.wins = wins;
22 | this.kills = kills;
23 | this.finalKills = finalKills;
24 | this.bedsBroken = bedsBroken;
25 | this.currentWinstreak = currentWinstreak;
26 | this.bestWinstreak = bestWinstreak;
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/datatypes/statistics/DuelStatistics.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi.datatypes.statistics;
2 |
3 | import lombok.Getter;
4 |
5 | public class DuelStatistics {
6 |
7 | @Getter
8 | public Double buildUhcWins;
9 | @Getter
10 | public Double potWins;
11 | @Getter
12 | public Double ironWins;
13 | @Getter
14 | public Double archerWins;
15 | @Getter
16 | public Double sumoWins;
17 | @Getter
18 | public Double elo;
19 | @Getter
20 | public Double currentWinstreak;
21 | @Getter
22 | public Double bestWinstreak;
23 |
24 | public DuelStatistics(Double buildUhcWins, Double potWins, Double ironWins, Double archerWins, Double sumoWins, Double elo, Double currentWinstreak, Double bestWinstreak) {
25 | this.buildUhcWins = buildUhcWins;
26 | this.potWins = potWins;
27 | this.ironWins = ironWins;
28 | this.archerWins = archerWins;
29 | this.sumoWins = sumoWins;
30 | this.elo = elo;
31 | this.currentWinstreak = currentWinstreak;
32 | this.bestWinstreak = bestWinstreak;
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/datatypes/statistics/GeneralStatistics.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi.datatypes.statistics;
2 |
3 | import lombok.Getter;
4 |
5 | public class GeneralStatistics {
6 |
7 | @Getter
8 | public String playerName;
9 | @Getter
10 | public String xuid;
11 | @Getter
12 | public Double level;
13 | @Getter
14 | public Double progress;
15 | @Getter
16 | public Double maxProgress;
17 |
18 | public GeneralStatistics(String playerName, String xuid, Double level, Double progress, Double maxProgress) {
19 | this.playerName = playerName;
20 | this.xuid = xuid;
21 | this.level = level;
22 | this.progress = progress;
23 | this.maxProgress = maxProgress;
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/datatypes/statistics/SkyWarsStatistics.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi.datatypes.statistics;
2 |
3 | import lombok.Getter;
4 |
5 | public class SkyWarsStatistics {
6 |
7 | @Getter
8 | public Double wins;
9 | @Getter
10 | public Double kills;
11 |
12 | public SkyWarsStatistics(Double wins, Double kills) {
13 | this.wins = wins;
14 | this.kills = kills;
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/datatypes/statistics/SpleefStatistics.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi.datatypes.statistics;
2 |
3 | import lombok.Getter;
4 |
5 | public class SpleefStatistics {
6 |
7 | @Getter
8 | public Double wins;
9 | @Getter
10 | public Double currentWinstreak;
11 | @Getter
12 | public Double bestWinstreak;
13 |
14 | public SpleefStatistics(Double wins, Double currentWinstreak, Double bestWinstreak) {
15 | this.wins = wins;
16 | this.currentWinstreak = currentWinstreak;
17 | this.bestWinstreak = bestWinstreak;
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/datatypes/statistics/TheBridgeStatistics.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi.datatypes.statistics;
2 |
3 | import lombok.Getter;
4 |
5 | public class TheBridgeStatistics {
6 |
7 | @Getter
8 | public Double wins;
9 | @Getter
10 | public Double goals;
11 | @Getter
12 | public Double currentWinstreak;
13 | @Getter
14 | public Double bestWinstreak;
15 | @Getter
16 | public Double peakRatingSolos;
17 |
18 | public TheBridgeStatistics(Double wins, Double goals, Double currentWinstreak, Double bestWinstreak, Double peakRatingSolos) {
19 | this.wins = wins;
20 | this.goals = goals;
21 | this.currentWinstreak = currentWinstreak;
22 | this.bestWinstreak = bestWinstreak;
23 | this.peakRatingSolos = peakRatingSolos;
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/datatypes/statistics/UHCMeetupStatistics.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi.datatypes.statistics;
2 |
3 | import lombok.Getter;
4 |
5 | public class UHCMeetupStatistics {
6 |
7 | @Getter
8 | public Double wins;
9 | @Getter
10 | public Double kills;
11 |
12 | public UHCMeetupStatistics(Double wins, Double kills) {
13 | this.wins = wins;
14 | this.kills = kills;
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/exceptions/EmptyNameOrXUIDException.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi.exceptions;
2 |
3 | /**
4 | * This class is a custom exception that is thrown when a player's name or XUID is empty.
5 | */
6 | public class EmptyNameOrXUIDException extends RuntimeException {
7 |
8 | public EmptyNameOrXUIDException(String errorMessage) { super(errorMessage); }
9 |
10 | }
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/exceptions/PlayerNotFoundException.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi.exceptions;
2 |
3 | /**
4 | * The PlayerNotFoundException class extends the RuntimeException class and is used to throw an exception when a player is
5 | * not found
6 | */
7 | public class PlayerNotFoundException extends RuntimeException {
8 |
9 | public PlayerNotFoundException(String errorMessage) { super(errorMessage); }
10 |
11 | }
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/exceptions/RatelimitedException.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi.exceptions;
2 |
3 | /**
4 | * This class is a custom exception that is thrown when the rate limit is exceeded
5 | */
6 | public class RatelimitedException extends RuntimeException {
7 |
8 | public RatelimitedException(String errorMessage) {
9 | super(errorMessage);
10 | }
11 |
12 | }
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/managers/PlayerManager.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi.managers;
2 |
3 | import lombok.SneakyThrows;
4 | import net.swofty.hyperlandsapi.Connection;
5 | import net.swofty.hyperlandsapi.Endpoints;
6 | import net.swofty.hyperlandsapi.XUID;
7 | import net.swofty.hyperlandsapi.datatypes.PlayerStatistics;
8 | import net.swofty.hyperlandsapi.exceptions.EmptyNameOrXUIDException;
9 | import net.swofty.hyperlandsapi.exceptions.PlayerNotFoundException;
10 | import org.json.JSONArray;
11 | import org.json.JSONObject;
12 |
13 | import javax.imageio.ImageIO;
14 | import java.awt.image.BufferedImage;
15 | import java.io.*;
16 | import java.net.MalformedURLException;
17 | import java.net.URL;
18 | import java.nio.charset.Charset;
19 | import java.util.ArrayList;
20 | import java.util.List;
21 | import java.util.concurrent.ExecutorService;
22 | import java.util.concurrent.Future;
23 |
24 | public class PlayerManager {
25 |
26 | // Creating a connection to the server and an executor service.
27 | private Connection connection;
28 | private ExecutorService executor;
29 |
30 | // A constructor that takes in a connection and an executor service.
31 | public PlayerManager(Connection connection, ExecutorService executor) {
32 | this.connection = connection;
33 | this.executor = executor;
34 | }
35 |
36 | /**
37 | * It takes a player's username, and returns a Future object that will contain the player's statistics
38 | *
39 | * @param playerUsername The username of the player you want to get the statistics of.
40 | * @return A Future object that contains a PlayerStatistics object.
41 | * @throws PlayerNotFoundException if the player ign passed through is not able to be located
42 | */
43 | @SneakyThrows
44 | public Future getStatistics(String playerUsername) {
45 | return executor.submit(() -> {
46 | JSONObject json = new JSONObject();
47 | try {
48 | URL url = new URL(Connection.baseURL + Endpoints.STATS.getUrlPath() + playerUsername);
49 | InputStream is = url.openStream();
50 | BufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName("UTF-8")));
51 | String jsonText = readAll(rd);
52 | json = new JSONObject(jsonText);
53 | } catch (Exception e) {}
54 |
55 | if (json.has("error") && json.getString("error").contains("Player not found"))
56 | throw new PlayerNotFoundException("Unable to locate a player with the IGN '" + playerUsername + "'");
57 |
58 | return new PlayerStatistics(json);
59 | });
60 | }
61 |
62 | /**
63 | * It takes a player's username, and returns a Future object that will contain a JSONObject of the player's
64 | * statistics
65 | *
66 | * @param playerUsername The username of the player you want to get the statistics of.
67 | * @return A Future object that contains a JSONObject
68 | * @throws PlayerNotFoundException if the player ign passed through is not able to be located
69 | */
70 | @SneakyThrows
71 | public Future getStatisticsAsJson(String playerUsername) {
72 | return executor.submit(() -> {
73 | JSONObject json = new JSONObject();
74 | try {
75 | URL url = new URL(Connection.baseURL + Endpoints.STATS.getUrlPath() + playerUsername);
76 | InputStream is = url.openStream();
77 | BufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName("UTF-8")));
78 | String jsonText = readAll(rd);
79 | json = new JSONObject(jsonText);
80 | } catch (Exception e) {}
81 |
82 | if (json.has("error") && json.getString("error").contains("Player not found"))
83 | throw new PlayerNotFoundException("Unable to locate a player with the IGN '" + playerUsername + "'");
84 |
85 | if (json.has("error") && json.getString("error").contains("name or xuid cannot be empty"))
86 | throw new EmptyNameOrXUIDException("The player's name or xuid cannot be empty");
87 |
88 | return json;
89 | });
90 | }
91 |
92 | /**
93 | * It takes a player's xuid, and returns a Future object that will contain the player's statistics
94 | *
95 | * @param playerXUID The xuid of the player you want to get the statistics of.
96 | * @return A Future object that contains a PlayerStatistics object.
97 | * @throws PlayerNotFoundException if the player xuid passed through is not able to be located
98 | */
99 | @SneakyThrows
100 | public Future getStatistics(XUID playerXUID) {
101 | return executor.submit(() -> {
102 | JSONObject json = new JSONObject();
103 | try {
104 | URL url = new URL(Connection.baseURL + Endpoints.STATS_XUID.getUrlPath() + playerXUID.XUID);
105 | InputStream is = url.openStream();
106 | BufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName("UTF-8")));
107 | String jsonText = readAll(rd);
108 | json = new JSONObject(jsonText);
109 | } catch (Exception e) {}
110 |
111 | if (json.has("error") && json.getString("error").contains("Player not found"))
112 | throw new PlayerNotFoundException("Unable to locate a player with the XUID '" + playerXUID.XUID + "'");
113 |
114 | return new PlayerStatistics(json);
115 | });
116 | }
117 |
118 | /**
119 | * It takes a player's xuid, and returns a Future object that will contain the player's statistics
120 | *
121 | * @param playerXUID The xuid of the player you want to get the statistics of.
122 | * @return A Future object that contains a JSONObject
123 | * @throws PlayerNotFoundException if the player xuid passed through is not able to be located
124 | */
125 | @SneakyThrows
126 | public Future getStatisticsAsJson(XUID playerXUID) {
127 | return executor.submit(() -> {
128 | JSONObject json = new JSONObject();
129 | try {
130 | URL url = new URL(Connection.baseURL + Endpoints.STATS_XUID.getUrlPath() + playerXUID.getXUID());
131 | InputStream is = url.openStream();
132 | BufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName("UTF-8")));
133 | String jsonText = readAll(rd);
134 | json = new JSONObject(jsonText);
135 | } catch (Exception e) {}
136 |
137 | if (json.has("error") && json.getString("error").contains("Player not found"))
138 | throw new PlayerNotFoundException("Unable to locate a player with the XUID '" + playerXUID.getXUID() + "'");
139 |
140 | return json;
141 | });
142 | }
143 |
144 | /**
145 | * It takes a player's username, and returns a list of all the usernames that are similar to it
146 | *
147 | * @param playerUsername The username of the player you want to search for.
148 | * @return A future object that contains a list of strings
149 | */
150 | public Future> executeFuzzySearch(String playerUsername) {
151 | return executor.submit(() -> {
152 | JSONArray json = new JSONArray();
153 | try {
154 | URL url = new URL(Connection.baseURL + Endpoints.FUZZY_SEARCH.getUrlPath() + playerUsername);
155 | InputStream is = url.openStream();
156 | BufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName("UTF-8")));
157 | String jsonText = readAll(rd);
158 | json = new JSONArray(jsonText);
159 | } catch (Exception e) {}
160 |
161 | ArrayList toReturn = new ArrayList<>();
162 | json.iterator().forEachRemaining(string -> toReturn.add((String) string));
163 | return toReturn;
164 | });
165 | }
166 |
167 | private static String readAll(Reader rd) throws IOException {
168 | StringBuilder sb = new StringBuilder();
169 | int cp;
170 | while ((cp = rd.read()) != -1) {
171 | sb.append((char) cp);
172 | }
173 | return sb.toString();
174 | }
175 | }
176 |
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/managers/ServerManager.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi.managers;
2 |
3 | import lombok.SneakyThrows;
4 | import net.swofty.hyperlandsapi.Connection;
5 | import net.swofty.hyperlandsapi.Endpoints;
6 | import net.swofty.hyperlandsapi.datatypes.PlayerCounts;
7 | import org.json.JSONObject;
8 |
9 | import javax.imageio.ImageIO;
10 | import java.awt.image.BufferedImage;
11 | import java.io.*;
12 | import java.net.URL;
13 | import java.nio.charset.Charset;
14 | import java.util.concurrent.ExecutorService;
15 | import java.util.concurrent.Future;
16 |
17 | public class ServerManager {
18 |
19 | // Creating a connection to the server and an executor service.
20 | private Connection connection;
21 | private ExecutorService executor;
22 |
23 | // A constructor that takes in a connection and an executor service.
24 | public ServerManager(Connection connection, ExecutorService executor) {
25 | this.connection = connection;
26 | this.executor = executor;
27 | }
28 |
29 | /**
30 | * Get the player count of the server, and return it asynchronously.
31 | *
32 | * The `@SneakyThrows` annotation is used to tell the compiler that we're going to throw an exception, but we're
33 | * going to handle it ourselves
34 | *
35 | * @return A Future object that will return a PlayerCounts object.
36 | */
37 | @SneakyThrows
38 | public Future getPlayerCount() {
39 | return executor.submit(() -> {
40 | JSONObject json = new JSONObject();
41 | try {
42 | URL url = new URL(Connection.baseURL + Endpoints.PLAYER_COUNT.getUrlPath());
43 | InputStream is = url.openStream();
44 | BufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName("UTF-8")));
45 | String jsonText = readAll(rd);
46 | json = new JSONObject(jsonText);
47 | } catch (Exception e) {}
48 |
49 | return new PlayerCounts(json);
50 | });
51 | }
52 |
53 | private static String readAll(Reader rd) throws IOException {
54 | StringBuilder sb = new StringBuilder();
55 | int cp;
56 | while ((cp = rd.read()) != -1) {
57 | sb.append((char) cp);
58 | }
59 | return sb.toString();
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/src/main/java/net/swofty/hyperlandsapi/managers/TextureManager.java:
--------------------------------------------------------------------------------
1 | package net.swofty.hyperlandsapi.managers;
2 |
3 | import lombok.SneakyThrows;
4 | import net.swofty.hyperlandsapi.Connection;
5 | import net.swofty.hyperlandsapi.Endpoints;
6 |
7 | import javax.imageio.ImageIO;
8 | import java.awt.image.BufferedImage;
9 | import java.net.URL;
10 | import java.util.concurrent.ExecutorService;
11 | import java.util.concurrent.Future;
12 |
13 | public class TextureManager {
14 |
15 | // Creating a connection to the server and an executor service.
16 | private Connection connection;
17 | private ExecutorService executor;
18 |
19 | // A constructor that takes in a connection and an executor service.
20 | public TextureManager(Connection connection, ExecutorService executor) {
21 | this.connection = connection;
22 | this.executor = executor;
23 | }
24 |
25 | /**
26 | * It returns a Future object that will contain the skin of the player with the given username
27 | * Note that this by default will pass through a steve skin if the username is invalid.
28 | *
29 | * @param playerUsername The username of the player you want to get the skin of.
30 | * @return A Future object that will contain the skin of the player.
31 | */
32 | @SneakyThrows
33 | public Future getSkin(String playerUsername) {
34 | return executor.submit(() -> ImageIO.read(new URL(Connection.baseURL + Endpoints.SKIN.getUrlPath() + playerUsername)));
35 | }
36 |
37 | /**
38 | * Get the head of a player asynchronously.
39 | * Note that this by default will pass through a steve skin if the username is invalid.
40 | *
41 | * @param playerUsername The username of the player you want to get the head of.
42 | * @return A Future object that will contain the image of the player's head.
43 | */
44 | @SneakyThrows
45 | public Future getHead(String playerUsername) {
46 | return executor.submit(() -> ImageIO.read(new URL(Connection.baseURL + Endpoints.HEAD.getUrlPath() + playerUsername)));
47 | }
48 | }
49 |
--------------------------------------------------------------------------------