mirror of
https://github.com/WiIIiam278/HuskSync.git
synced 2025-12-28 19:19:13 +00:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd83c8935d | ||
|
|
62095364ce | ||
|
|
304df9984c | ||
|
|
b73de81519 | ||
|
|
12e882fe22 | ||
|
|
4ed8b94d55 | ||
|
|
854bf37186 | ||
|
|
8bab2a8123 | ||
|
|
97ad608d56 | ||
|
|
f7419f7277 | ||
|
|
f0497f61f0 | ||
|
|
f6aab54d4d | ||
|
|
c306d700ce | ||
|
|
bbcb091daf | ||
|
|
eb9e2491e5 | ||
|
|
0250ad80c8 |
20
HEADER
20
HEADER
@@ -1,10 +1,16 @@
|
|||||||
This file is part of HuskSync by William278. Do not redistribute!
|
This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
|
|
||||||
Copyright (c) William278 <will27528@gmail.com>
|
Copyright (c) William278 <will27528@gmail.com>
|
||||||
All rights reserved.
|
Copyright (c) contributors
|
||||||
|
|
||||||
This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
plugin once from any of the official sources it is provided. The availability of this code does
|
you may not use this file except in compliance with the License.
|
||||||
not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
You may obtain a copy of the License at
|
||||||
"plugin" outside this intended purpose. This license does not cover libraries developed by third
|
|
||||||
parties that are utilised in the plugin.
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
217
LICENSE
217
LICENSE
@@ -1,21 +1,202 @@
|
|||||||
Copyright © William278 2023. All rights reserved
|
|
||||||
|
|
||||||
LICENSE
|
Apache License
|
||||||
This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
Version 2.0, January 2004
|
||||||
plugin once from any of the official sources it is provided. The availability of this code does
|
http://www.apache.org/licenses/
|
||||||
not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
|
||||||
"plugin" outside this intended purpose. This license does not cover libraries developed by third
|
|
||||||
parties that are utilised in the plugin.
|
|
||||||
|
|
||||||
CONTRIBUTOR AGREEMENT
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
By contributing code to this repository, contributors agree that they forfeit their contributions
|
|
||||||
to the copyright holder and only the copyright holder.
|
|
||||||
In exchange for contributing, the copyright holder may give, at their discretion, permission to use
|
|
||||||
the plugin in commercial contexts
|
|
||||||
|
|
||||||
DEFINITIONS
|
1. Definitions.
|
||||||
"plugin"; the jar file compiled from this source code
|
|
||||||
"source code"; the java source code and gradle configurations provided in this repository, however
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
excludes libraries
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
"copyright holder"; William278
|
|
||||||
"contributor(s)"; person(s) who submit (contribute) code through a pull request to this repository
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
20
README.md
20
README.md
@@ -51,22 +51,24 @@ Requires a MySQL (v8.0+) database, a Redis (v5.0+) server and any number of Spig
|
|||||||
3. Navigate to the HuskSync config file on each server (~/plugins/HuskSync/config.yml) and fill in both the MySQL and Redis database credentials.
|
3. Navigate to the HuskSync config file on each server (~/plugins/HuskSync/config.yml) and fill in both the MySQL and Redis database credentials.
|
||||||
4. Start every server again and synchronization will begin.
|
4. Start every server again and synchronization will begin.
|
||||||
|
|
||||||
## Building
|
## Development
|
||||||
To build HuskSync, simply run the following in the root of the repository:
|
To build HuskSync, simply run the following in the root of the repository:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./gradlew clean build
|
./gradlew clean build
|
||||||
```
|
```
|
||||||
|
|
||||||
## License
|
### License
|
||||||
HuskSync is a premium resource. This source code is provided as reference only for those who have purchased the resource from an official source.
|
HuskSync is licensed under the Apache 2.0 license.
|
||||||
|
|
||||||
- [License](https://github.com/WiIIiam278/HuskSync/blob/master/LICENSE)
|
- [License](https://github.com/WiIIiam278/HuskSync/blob/master/LICENSE)
|
||||||
|
|
||||||
## Contributing
|
Contributions to the project are welcome—feel free to open a pull request with new features, improvements and/or fixes!
|
||||||
A code bounty program is in place for HuskSync, where developers making significant code contributions to HuskSync may be entitled to a license at my discretion to use HuskSync in commercial contexts without having to purchase the resource. Please read the information for contributors in the LICENSE file before submitting a pull request.
|
|
||||||
|
|
||||||
## Translations
|
### Support
|
||||||
|
Due to its complexity, official support for HuskSync is provided through a paid model. This means that support is only available to users who have purchased a license to the plugin from Spigot, Polymart, or Craftaro and have provided proof of purchase. Please join our Discord server if you have done so and need help!
|
||||||
|
|
||||||
|
### Translations
|
||||||
Translations of the plugin locales are welcome to help make the plugin more accessible. Please submit a pull request with your translations as a `.yml` file.
|
Translations of the plugin locales are welcome to help make the plugin more accessible. Please submit a pull request with your translations as a `.yml` file.
|
||||||
|
|
||||||
- [Locales Directory](https://github.com/WiIIiam278/HuskSync/tree/master/common/src/main/resources/languages)
|
- [Locales Directory](https://github.com/WiIIiam278/HuskSync/tree/master/common/src/main/resources/languages)
|
||||||
@@ -74,10 +76,10 @@ Translations of the plugin locales are welcome to help make the plugin more acce
|
|||||||
|
|
||||||
## Links
|
## Links
|
||||||
- [Docs](https://william278.net/docs/husksync/) — Read the plugin documentation!
|
- [Docs](https://william278.net/docs/husksync/) — Read the plugin documentation!
|
||||||
- [Spigot](https://www.spigotmc.org/resources/husksync.97144/) — View the Spigot resource page (Also: [Polymart](https://polymart.org/resource/husksync.1634), [Craftaro](https://craftaro.com/marketplace/product/husksync.406))
|
- [Spigot](https://www.spigotmc.org/resources/husksync.97144/) — View the Spigot resource page (Also: [Polymart](https://polymart.org/resource/husksync.1634), [Craftaro](https://craftaro.com/marketplace/product/husksync.758))
|
||||||
- [Issues](https://github.com/WiIIiam278/HuskSync/issues) — File a bug report or feature request
|
- [Issues](https://github.com/WiIIiam278/HuskSync/issues) — File a bug report or feature request
|
||||||
- [Discord](https://discord.gg/tVYhJfyDWG) — Get help, ask questions (Proof of purchase required)
|
- [Discord](https://discord.gg/tVYhJfyDWG) — Get help, ask questions (Purchase required)
|
||||||
- [bStats](https://bstats.org/plugin/bukkit/HuskSync%20-%20Bukkit/13140) — View plugin metrics
|
- [bStats](https://bstats.org/plugin/bukkit/HuskSync%20-%20Bukkit/13140) — View plugin metrics
|
||||||
|
|
||||||
---
|
---
|
||||||
© [William278](https://william278.net/), 2023. All rights reserved.
|
© [William278](https://william278.net/), 2023. Licensed under the Apache-2.0 License.
|
||||||
|
|||||||
@@ -14,8 +14,10 @@ defaultTasks 'licenseFormat', 'build'
|
|||||||
ext {
|
ext {
|
||||||
set 'version', version.toString()
|
set 'version', version.toString()
|
||||||
set 'description', description.toString()
|
set 'description', description.toString()
|
||||||
|
|
||||||
set 'jedis_version', jedis_version.toString()
|
set 'jedis_version', jedis_version.toString()
|
||||||
set 'mysql_driver_version', mysql_driver_version.toString()
|
set 'mysql_driver_version', mysql_driver_version.toString()
|
||||||
|
set 'mariadb_driver_version', mariadb_driver_version.toString()
|
||||||
set 'snappy_version', snappy_version.toString()
|
set 'snappy_version', snappy_version.toString()
|
||||||
set 'commons_text_version', commons_text_version.toString()
|
set 'commons_text_version', commons_text_version.toString()
|
||||||
}
|
}
|
||||||
@@ -46,8 +48,8 @@ allprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.3'
|
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.0'
|
||||||
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.9.3'
|
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.10.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
test {
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync;
|
package net.william278.husksync;
|
||||||
@@ -124,10 +130,12 @@ public class BukkitHuskSync extends JavaPlugin implements HuskSync {
|
|||||||
|
|
||||||
// Prepare database connection
|
// Prepare database connection
|
||||||
this.database = new MySqlDatabase(this);
|
this.database = new MySqlDatabase(this);
|
||||||
log(Level.INFO, "Attempting to establish connection to the database...");
|
log(Level.INFO, String.format("Attempting to establish connection to the %s database...",
|
||||||
initialized.set(this.database.initialize());
|
settings.getDatabaseType().getDisplayName()));
|
||||||
|
this.database.initialize();
|
||||||
if (initialized.get()) {
|
if (initialized.get()) {
|
||||||
log(Level.INFO, "Successfully established a connection to the database");
|
log(Level.INFO, String.format("Successfully established a connection to the %s database",
|
||||||
|
settings.getDatabaseType().getDisplayName()));
|
||||||
} else {
|
} else {
|
||||||
throw new HuskSyncInitializationException("Failed to establish a connection to the database. " +
|
throw new HuskSyncInitializationException("Failed to establish a connection to the database. " +
|
||||||
"Please check the supplied database credentials in the config file");
|
"Please check the supplied database credentials in the config file");
|
||||||
@@ -189,7 +197,7 @@ public class BukkitHuskSync extends JavaPlugin implements HuskSync {
|
|||||||
"An update is available for HuskSync, v" + newVersion
|
"An update is available for HuskSync, v" + newVersion
|
||||||
+ " (Currently running v" + getPluginVersion() + ")")));
|
+ " (Currently running v" + getPluginVersion() + ")")));
|
||||||
}
|
}
|
||||||
} catch (HuskSyncInitializationException exception) {
|
} catch (IllegalStateException exception) {
|
||||||
log(Level.SEVERE, """
|
log(Level.SEVERE, """
|
||||||
***************************************************
|
***************************************************
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.api;
|
package net.william278.husksync.api;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.command;
|
package net.william278.husksync.command;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.command;
|
package net.william278.husksync.command;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.command;
|
package net.william278.husksync.command;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.data;
|
package net.william278.husksync.data;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.data;
|
package net.william278.husksync.data;
|
||||||
@@ -29,6 +35,7 @@ import org.jetbrains.annotations.Nullable;
|
|||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -55,8 +62,14 @@ public class BukkitMapHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the map view from the map
|
// Get the map view from the map
|
||||||
final MapView mapView = mapMeta.getMapView();
|
final MapView mapView;
|
||||||
if (mapView == null || !mapView.isLocked() || mapView.isVirtual()) {
|
try {
|
||||||
|
mapView = Bukkit.getScheduler().callSyncMethod(plugin, mapMeta::getMapView).get();
|
||||||
|
if (mapView == null || !mapView.isLocked() || mapView.isVirtual()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} catch (InterruptedException | ExecutionException e) {
|
||||||
|
plugin.getLogger().log(Level.WARNING, "Failed to save map data for a player", e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.data;
|
package net.william278.husksync.data;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.data;
|
package net.william278.husksync.data;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.event;
|
package net.william278.husksync.event;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.event;
|
package net.william278.husksync.event;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.event;
|
package net.william278.husksync.event;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.event;
|
package net.william278.husksync.event;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.event;
|
package net.william278.husksync.event;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.event;
|
package net.william278.husksync.event;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.listener;
|
package net.william278.husksync.listener;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.listener;
|
package net.william278.husksync.listener;
|
||||||
@@ -34,6 +40,7 @@ import org.bukkit.event.entity.PlayerDeathEvent;
|
|||||||
import org.bukkit.event.entity.ProjectileLaunchEvent;
|
import org.bukkit.event.entity.ProjectileLaunchEvent;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||||
import org.bukkit.event.inventory.InventoryOpenEvent;
|
import org.bukkit.event.inventory.InventoryOpenEvent;
|
||||||
|
import org.bukkit.event.inventory.PrepareItemCraftEvent;
|
||||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||||
import org.bukkit.event.player.PlayerDropItemEvent;
|
import org.bukkit.event.player.PlayerDropItemEvent;
|
||||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||||
@@ -166,6 +173,10 @@ public class BukkitEventListener extends EventListener implements BukkitJoinEven
|
|||||||
event.setCancelled(cancelPlayerEvent(event.getWhoClicked().getUniqueId()));
|
event.setCancelled(cancelPlayerEvent(event.getWhoClicked().getUniqueId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
|
public void onCraftItem(@NotNull PrepareItemCraftEvent event) {
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
public void onPlayerTakeDamage(@NotNull EntityDamageEvent event) {
|
public void onPlayerTakeDamage(@NotNull EntityDamageEvent event) {
|
||||||
if (event.getEntity() instanceof Player player) {
|
if (event.getEntity() instanceof Player player) {
|
||||||
@@ -178,7 +189,7 @@ public class BukkitEventListener extends EventListener implements BukkitJoinEven
|
|||||||
String[] commandArgs = event.getMessage().substring(1).split(" ");
|
String[] commandArgs = event.getMessage().substring(1).split(" ");
|
||||||
String commandLabel = commandArgs[0].toLowerCase(Locale.ENGLISH);
|
String commandLabel = commandArgs[0].toLowerCase(Locale.ENGLISH);
|
||||||
|
|
||||||
if (blacklistedCommands.contains(commandLabel)) {
|
if (blacklistedCommands.contains("*") || blacklistedCommands.contains(commandLabel)) {
|
||||||
event.setCancelled(cancelPlayerEvent(event.getPlayer().getUniqueId()));
|
event.setCancelled(cancelPlayerEvent(event.getPlayer().getUniqueId()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.listener;
|
package net.william278.husksync.listener;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.listener;
|
package net.william278.husksync.listener;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.migrator;
|
package net.william278.husksync.migrator;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.migrator;
|
package net.william278.husksync.migrator;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.player;
|
package net.william278.husksync.player;
|
||||||
@@ -30,6 +36,7 @@ import org.bukkit.advancement.AdvancementProgress;
|
|||||||
import org.bukkit.attribute.Attribute;
|
import org.bukkit.attribute.Attribute;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.inventory.InventoryType;
|
||||||
import org.bukkit.event.player.PlayerTeleportEvent;
|
import org.bukkit.event.player.PlayerTeleportEvent;
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
@@ -49,7 +56,7 @@ import java.util.logging.Level;
|
|||||||
* Bukkit implementation of an {@link OnlineUser}
|
* Bukkit implementation of an {@link OnlineUser}
|
||||||
*/
|
*/
|
||||||
public class BukkitPlayer extends OnlineUser {
|
public class BukkitPlayer extends OnlineUser {
|
||||||
|
|
||||||
private final BukkitHuskSync plugin;
|
private final BukkitHuskSync plugin;
|
||||||
private final Player player;
|
private final Player player;
|
||||||
|
|
||||||
@@ -172,6 +179,7 @@ public class BukkitPlayer extends OnlineUser {
|
|||||||
return BukkitSerializer.deserializeInventory(itemData.serializedItems).thenApplyAsync(contents -> {
|
return BukkitSerializer.deserializeInventory(itemData.serializedItems).thenApplyAsync(contents -> {
|
||||||
final CompletableFuture<Void> inventorySetFuture = new CompletableFuture<>();
|
final CompletableFuture<Void> inventorySetFuture = new CompletableFuture<>();
|
||||||
Bukkit.getScheduler().runTask(plugin, () -> {
|
Bukkit.getScheduler().runTask(plugin, () -> {
|
||||||
|
this.clearInventoryCraftingSlots();
|
||||||
player.setItemOnCursor(null);
|
player.setItemOnCursor(null);
|
||||||
player.getInventory().setContents(contents.getContents());
|
player.getInventory().setContents(contents.getContents());
|
||||||
player.updateInventory();
|
player.updateInventory();
|
||||||
@@ -181,6 +189,16 @@ public class BukkitPlayer extends OnlineUser {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clears any items the player may have in the crafting slots of their inventory
|
||||||
|
private void clearInventoryCraftingSlots() {
|
||||||
|
final Inventory inventory = player.getOpenInventory().getTopInventory();
|
||||||
|
if (inventory.getType() == InventoryType.CRAFTING) {
|
||||||
|
for (int slot = 0; slot < 5; slot++) {
|
||||||
|
inventory.setItem(slot, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CompletableFuture<ItemData> getEnderChest() {
|
public CompletableFuture<ItemData> getEnderChest() {
|
||||||
final Inventory enderChest = player.getEnderChest();
|
final Inventory enderChest = player.getEnderChest();
|
||||||
@@ -494,7 +512,7 @@ public class BukkitPlayer extends OnlineUser {
|
|||||||
.ifPresentOrElse(mapping -> mapping.setContainerValue(container, player, key),
|
.ifPresentOrElse(mapping -> mapping.setContainerValue(container, player, key),
|
||||||
() -> plugin.log(Level.WARNING,
|
() -> plugin.log(Level.WARNING,
|
||||||
"Could not set " + player.getName() + "'s persistent data key " + keyString +
|
"Could not set " + player.getName() + "'s persistent data key " + keyString +
|
||||||
" as it has an invalid type. Skipping!"));
|
" as it has an invalid type. Skipping!"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}).exceptionally(throwable -> {
|
}).exceptionally(throwable -> {
|
||||||
@@ -511,7 +529,7 @@ public class BukkitPlayer extends OnlineUser {
|
|||||||
public Audience getAudience() {
|
public Audience getAudience() {
|
||||||
return plugin.getAudiences().player(player);
|
return plugin.getAudiences().player(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isOffline() {
|
public boolean isOffline() {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ softdepend:
|
|||||||
libraries:
|
libraries:
|
||||||
- 'redis.clients:jedis:${jedis_version}'
|
- 'redis.clients:jedis:${jedis_version}'
|
||||||
- 'com.mysql:mysql-connector-j:${mysql_driver_version}'
|
- 'com.mysql:mysql-connector-j:${mysql_driver_version}'
|
||||||
|
- 'org.mariadb.jdbc:mariadb-java-client:${mariadb_driver_version}'
|
||||||
- 'org.xerial.snappy:snappy-java:${snappy_version}'
|
- 'org.xerial.snappy:snappy-java:${snappy_version}'
|
||||||
- 'org.apache.commons:commons-text:${commons_text_version}'
|
- 'org.apache.commons:commons-text:${commons_text_version}'
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync;
|
package net.william278.husksync;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync;
|
package net.william278.husksync;
|
||||||
@@ -16,9 +22,9 @@ package net.william278.husksync;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates an exception occurred while initialising the HuskSync plugin
|
* Indicates an exception occurred while initializing the HuskSync plugin
|
||||||
*/
|
*/
|
||||||
public class HuskSyncInitializationException extends RuntimeException {
|
public class HuskSyncInitializationException extends IllegalStateException {
|
||||||
public HuskSyncInitializationException(@NotNull String message) {
|
public HuskSyncInitializationException(@NotNull String message) {
|
||||||
super(message);
|
super(message);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.api;
|
package net.william278.husksync.api;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.command;
|
package net.william278.husksync.command;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.command;
|
package net.william278.husksync.command;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.command;
|
package net.william278.husksync.command;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.command;
|
package net.william278.husksync.command;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.command;
|
package net.william278.husksync.command;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.command;
|
package net.william278.husksync.command;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.command;
|
package net.william278.husksync.command;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.command;
|
package net.william278.husksync.command;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.config;
|
package net.william278.husksync.config;
|
||||||
@@ -29,7 +35,7 @@ import java.util.Optional;
|
|||||||
*/
|
*/
|
||||||
@YamlFile(rootedMap = true, header = """
|
@YamlFile(rootedMap = true, header = """
|
||||||
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||||
┃ HuskHomes Locales ┃
|
┃ HuskSync Locales ┃
|
||||||
┃ Developed by William278 ┃
|
┃ Developed by William278 ┃
|
||||||
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
||||||
┣╸ See plugin about menu for international locale credits
|
┣╸ See plugin about menu for international locale credits
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.config;
|
package net.william278.husksync.config;
|
||||||
@@ -16,6 +22,7 @@ package net.william278.husksync.config;
|
|||||||
import net.william278.annotaml.YamlComment;
|
import net.william278.annotaml.YamlComment;
|
||||||
import net.william278.annotaml.YamlFile;
|
import net.william278.annotaml.YamlFile;
|
||||||
import net.william278.annotaml.YamlKey;
|
import net.william278.annotaml.YamlKey;
|
||||||
|
import net.william278.husksync.database.Database;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -48,6 +55,10 @@ public class Settings {
|
|||||||
|
|
||||||
|
|
||||||
// Database settings
|
// Database settings
|
||||||
|
@YamlComment("Type of database to use (MYSQL, SQLITE)")
|
||||||
|
@YamlKey("database.type")
|
||||||
|
private Database.Type databaseType = Database.Type.MYSQL;
|
||||||
|
|
||||||
@YamlComment("Database connection settings")
|
@YamlComment("Database connection settings")
|
||||||
@YamlKey("database.credentials.host")
|
@YamlKey("database.credentials.host")
|
||||||
private String mySqlHost = "localhost";
|
private String mySqlHost = "localhost";
|
||||||
@@ -132,7 +143,7 @@ public class Settings {
|
|||||||
private Map<String, Boolean> synchronizationFeatures = SynchronizationFeature.getDefaults();
|
private Map<String, Boolean> synchronizationFeatures = SynchronizationFeature.getDefaults();
|
||||||
|
|
||||||
@YamlKey("synchronization.blacklisted_commands_while_locked")
|
@YamlKey("synchronization.blacklisted_commands_while_locked")
|
||||||
private List<String> blacklistedCommandsWhileLocked = new ArrayList<>();
|
private List<String> blacklistedCommandsWhileLocked = new ArrayList<>(List.of("*"));
|
||||||
|
|
||||||
@YamlKey("synchronization.event_priorities")
|
@YamlKey("synchronization.event_priorities")
|
||||||
private Map<String, String> synchronizationEventPriorities = EventType.getDefaults();
|
private Map<String, String> synchronizationEventPriorities = EventType.getDefaults();
|
||||||
@@ -161,6 +172,12 @@ public class Settings {
|
|||||||
return debugLogging;
|
return debugLogging;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
public Database.Type getDatabaseType() {
|
||||||
|
return databaseType;
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public String getMySqlHost() {
|
public String getMySqlHost() {
|
||||||
return mySqlHost;
|
return mySqlHost;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.data;
|
package net.william278.husksync.data;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.data;
|
package net.william278.husksync.data;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.data;
|
package net.william278.husksync.data;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.data;
|
package net.william278.husksync.data;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.data;
|
package net.william278.husksync.data;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.data;
|
package net.william278.husksync.data;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.data;
|
package net.william278.husksync.data;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.data;
|
package net.william278.husksync.data;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.data;
|
package net.william278.husksync.data;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.data;
|
package net.william278.husksync.data;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.data;
|
package net.william278.husksync.data;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.data;
|
package net.william278.husksync.data;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.data;
|
package net.william278.husksync.data;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.data;
|
package net.william278.husksync.data;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.data;
|
package net.william278.husksync.data;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.data;
|
package net.william278.husksync.data;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.data;
|
package net.william278.husksync.data;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.data;
|
package net.william278.husksync.data;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.data;
|
package net.william278.husksync.data;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.database;
|
package net.william278.husksync.database;
|
||||||
@@ -69,10 +75,8 @@ public abstract class Database {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the database and ensure tables are present; create tables if they do not exist.
|
* Initialize the database and ensure tables are present; create tables if they do not exist.
|
||||||
*
|
|
||||||
* @return A future returning boolean - if the connection could be established.
|
|
||||||
*/
|
*/
|
||||||
public abstract boolean initialize();
|
public abstract void initialize();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ensure a {@link User} has an entry in the database and that their username is up-to-date
|
* Ensure a {@link User} has an entry in the database and that their username is up-to-date
|
||||||
@@ -185,4 +189,30 @@ public abstract class Database {
|
|||||||
*/
|
*/
|
||||||
public abstract void close();
|
public abstract void close();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Identifies types of databases
|
||||||
|
*/
|
||||||
|
public enum Type {
|
||||||
|
MYSQL("MySQL", "mysql"),
|
||||||
|
MARIADB("MariaDB", "mariadb");
|
||||||
|
|
||||||
|
private final String displayName;
|
||||||
|
private final String protocol;
|
||||||
|
|
||||||
|
Type(@NotNull String displayName, @NotNull String protocol) {
|
||||||
|
this.displayName = displayName;
|
||||||
|
this.protocol = protocol;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
public String getDisplayName() {
|
||||||
|
return displayName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
public String getProtocol() {
|
||||||
|
return protocol;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,26 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.database;
|
package net.william278.husksync.database;
|
||||||
|
|
||||||
import com.zaxxer.hikari.HikariDataSource;
|
import com.zaxxer.hikari.HikariDataSource;
|
||||||
import net.william278.husksync.HuskSync;
|
import net.william278.husksync.HuskSync;
|
||||||
import net.william278.husksync.config.Settings;
|
|
||||||
import net.william278.husksync.data.DataAdaptionException;
|
import net.william278.husksync.data.DataAdaptionException;
|
||||||
import net.william278.husksync.data.DataSaveCause;
|
import net.william278.husksync.data.DataSaveCause;
|
||||||
import net.william278.husksync.data.UserData;
|
import net.william278.husksync.data.UserData;
|
||||||
@@ -34,51 +39,17 @@ import java.util.logging.Level;
|
|||||||
|
|
||||||
public class MySqlDatabase extends Database {
|
public class MySqlDatabase extends Database {
|
||||||
|
|
||||||
/**
|
|
||||||
* MySQL server hostname
|
|
||||||
*/
|
|
||||||
private final String mySqlHost;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* MySQL server port
|
|
||||||
*/
|
|
||||||
private final int mySqlPort;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Database to use on the MySQL server
|
|
||||||
*/
|
|
||||||
private final String mySqlDatabaseName;
|
|
||||||
private final String mySqlUsername;
|
|
||||||
private final String mySqlPassword;
|
|
||||||
private final String mySqlConnectionParameters;
|
|
||||||
|
|
||||||
private final int hikariMaximumPoolSize;
|
|
||||||
private final int hikariMinimumIdle;
|
|
||||||
private final long hikariMaximumLifetime;
|
|
||||||
private final long hikariKeepAliveTime;
|
|
||||||
private final long hikariConnectionTimeOut;
|
|
||||||
|
|
||||||
private static final String DATA_POOL_NAME = "HuskSyncHikariPool";
|
private static final String DATA_POOL_NAME = "HuskSyncHikariPool";
|
||||||
|
private final String flavor;
|
||||||
/**
|
private final String driverClass;
|
||||||
* The Hikari data source - a pool of database connections that can be fetched on-demand
|
private HikariDataSource dataSource;
|
||||||
*/
|
|
||||||
private HikariDataSource connectionPool;
|
|
||||||
|
|
||||||
public MySqlDatabase(@NotNull HuskSync plugin) {
|
public MySqlDatabase(@NotNull HuskSync plugin) {
|
||||||
super(plugin);
|
super(plugin);
|
||||||
final Settings settings = plugin.getSettings();
|
this.flavor = plugin.getSettings().getDatabaseType() == Type.MARIADB
|
||||||
this.mySqlHost = settings.getMySqlHost();
|
? "mariadb" : "mysql";
|
||||||
this.mySqlPort = settings.getMySqlPort();
|
this.driverClass = plugin.getSettings().getDatabaseType() == Type.MARIADB
|
||||||
this.mySqlDatabaseName = settings.getMySqlDatabase();
|
? "org.mariadb.jdbc.Driver" : "com.mysql.cj.jdbc.Driver";
|
||||||
this.mySqlUsername = settings.getMySqlUsername();
|
|
||||||
this.mySqlPassword = settings.getMySqlPassword();
|
|
||||||
this.mySqlConnectionParameters = settings.getMySqlConnectionParameters();
|
|
||||||
this.hikariMaximumPoolSize = settings.getMySqlConnectionPoolSize();
|
|
||||||
this.hikariMinimumIdle = settings.getMySqlConnectionPoolIdle();
|
|
||||||
this.hikariMaximumLifetime = settings.getMySqlConnectionPoolLifetime();
|
|
||||||
this.hikariKeepAliveTime = settings.getMySqlConnectionPoolKeepAlive();
|
|
||||||
this.hikariConnectionTimeOut = settings.getMySqlConnectionPoolTimeout();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -88,46 +59,69 @@ public class MySqlDatabase extends Database {
|
|||||||
* @throws SQLException if the connection fails for some reason
|
* @throws SQLException if the connection fails for some reason
|
||||||
*/
|
*/
|
||||||
private Connection getConnection() throws SQLException {
|
private Connection getConnection() throws SQLException {
|
||||||
return connectionPool.getConnection();
|
return dataSource.getConnection();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean initialize() {
|
public void initialize() throws IllegalStateException {
|
||||||
try {
|
// Initialize the Hikari pooled connection
|
||||||
// Create jdbc driver connection url
|
dataSource = new HikariDataSource();
|
||||||
final String jdbcUrl = "jdbc:mysql://" + mySqlHost + ":" + mySqlPort + "/" + mySqlDatabaseName + mySqlConnectionParameters;
|
dataSource.setDriverClassName(driverClass);
|
||||||
connectionPool = new HikariDataSource();
|
dataSource.setJdbcUrl(String.format("jdbc:%s://%s:%s/%s%s",
|
||||||
connectionPool.setJdbcUrl(jdbcUrl);
|
flavor,
|
||||||
|
plugin.getSettings().getMySqlHost(),
|
||||||
|
plugin.getSettings().getMySqlPort(),
|
||||||
|
plugin.getSettings().getMySqlDatabase(),
|
||||||
|
plugin.getSettings().getMySqlConnectionParameters()
|
||||||
|
));
|
||||||
|
|
||||||
// Authenticate
|
// Authenticate with the database
|
||||||
connectionPool.setUsername(mySqlUsername);
|
dataSource.setUsername(plugin.getSettings().getMySqlUsername());
|
||||||
connectionPool.setPassword(mySqlPassword);
|
dataSource.setPassword(plugin.getSettings().getMySqlPassword());
|
||||||
|
|
||||||
// Set various additional parameters
|
// Set connection pool options
|
||||||
connectionPool.setMaximumPoolSize(hikariMaximumPoolSize);
|
dataSource.setMaximumPoolSize(plugin.getSettings().getMySqlConnectionPoolSize());
|
||||||
connectionPool.setMinimumIdle(hikariMinimumIdle);
|
dataSource.setMinimumIdle(plugin.getSettings().getMySqlConnectionPoolIdle());
|
||||||
connectionPool.setMaxLifetime(hikariMaximumLifetime);
|
dataSource.setMaxLifetime(plugin.getSettings().getMySqlConnectionPoolLifetime());
|
||||||
connectionPool.setKeepaliveTime(hikariKeepAliveTime);
|
dataSource.setKeepaliveTime(plugin.getSettings().getMySqlConnectionPoolKeepAlive());
|
||||||
connectionPool.setConnectionTimeout(hikariConnectionTimeOut);
|
dataSource.setConnectionTimeout(plugin.getSettings().getMySqlConnectionPoolTimeout());
|
||||||
connectionPool.setPoolName(DATA_POOL_NAME);
|
dataSource.setPoolName(DATA_POOL_NAME);
|
||||||
|
|
||||||
// Prepare database schema; make tables if they don't exist
|
// Set additional connection pool properties
|
||||||
try (Connection connection = connectionPool.getConnection()) {
|
final Properties properties = new Properties();
|
||||||
// Load database schema CREATE statements from schema file
|
properties.putAll(
|
||||||
final String[] databaseSchema = getSchemaStatements("database/mysql_schema.sql");
|
Map.of("cachePrepStmts", "true",
|
||||||
try (Statement statement = connection.createStatement()) {
|
"prepStmtCacheSize", "250",
|
||||||
for (String tableCreationStatement : databaseSchema) {
|
"prepStmtCacheSqlLimit", "2048",
|
||||||
statement.execute(tableCreationStatement);
|
"useServerPrepStmts", "true",
|
||||||
}
|
"useLocalSessionState", "true",
|
||||||
|
"useLocalTransactionState", "true"
|
||||||
|
));
|
||||||
|
properties.putAll(
|
||||||
|
Map.of(
|
||||||
|
"rewriteBatchedStatements", "true",
|
||||||
|
"cacheResultSetMetadata", "true",
|
||||||
|
"cacheServerConfiguration", "true",
|
||||||
|
"elideSetAutoCommits", "true",
|
||||||
|
"maintainTimeStats", "false")
|
||||||
|
);
|
||||||
|
dataSource.setDataSourceProperties(properties);
|
||||||
|
|
||||||
|
// Prepare database schema; make tables if they don't exist
|
||||||
|
try (Connection connection = dataSource.getConnection()) {
|
||||||
|
final String[] databaseSchema = getSchemaStatements(String.format("database/%s_schema.sql", flavor));
|
||||||
|
try (Statement statement = connection.createStatement()) {
|
||||||
|
for (String tableCreationStatement : databaseSchema) {
|
||||||
|
statement.execute(tableCreationStatement);
|
||||||
}
|
}
|
||||||
return true;
|
} catch (SQLException e) {
|
||||||
} catch (SQLException | IOException e) {
|
throw new IllegalStateException("Failed to create database tables. Please ensure you are running MySQL v8.0+ " +
|
||||||
plugin.log(Level.SEVERE, "Failed to perform database setup: " + e.getMessage());
|
"and that your connecting user account has privileges to create tables.", e);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (SQLException | IOException e) {
|
||||||
plugin.log(Level.SEVERE, "An unhandled exception occurred during database setup!", e);
|
throw new IllegalStateException("Failed to establish a connection to the MySQL database. " +
|
||||||
|
"Please check the supplied database credentials in the config file", e);
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -433,9 +427,9 @@ public class MySqlDatabase extends Database {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void close() {
|
public void close() {
|
||||||
if (connectionPool != null) {
|
if (dataSource != null) {
|
||||||
if (!connectionPool.isClosed()) {
|
if (!dataSource.isClosed()) {
|
||||||
connectionPool.close();
|
dataSource.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.event;
|
package net.william278.husksync.event;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.event;
|
package net.william278.husksync.event;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.event;
|
package net.william278.husksync.event;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.event;
|
package net.william278.husksync.event;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.event;
|
package net.william278.husksync.event;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.event;
|
package net.william278.husksync.event;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.event;
|
package net.william278.husksync.event;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.hook;
|
package net.william278.husksync.hook;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.hook;
|
package net.william278.husksync.hook;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.listener;
|
package net.william278.husksync.listener;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.migrator;
|
package net.william278.husksync.migrator;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.player;
|
package net.william278.husksync.player;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.player;
|
package net.william278.husksync.player;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.redis;
|
package net.william278.husksync.redis;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.redis;
|
package net.william278.husksync.redis;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.redis;
|
package net.william278.husksync.redis;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.redis;
|
package net.william278.husksync.redis;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.util;
|
package net.william278.husksync.util;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.util;
|
package net.william278.husksync.util;
|
||||||
|
|||||||
32
common/src/main/resources/database/mariadb_schema.sql
Normal file
32
common/src/main/resources/database/mariadb_schema.sql
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
-- Set the storage engine
|
||||||
|
SET DEFAULT_STORAGE_ENGINE = INNODB;
|
||||||
|
|
||||||
|
-- Enable foreign key constraints
|
||||||
|
SET FOREIGN_KEY_CHECKS = 1;
|
||||||
|
|
||||||
|
-- Create the users table if it does not exist
|
||||||
|
CREATE TABLE IF NOT EXISTS `%users_table%`
|
||||||
|
(
|
||||||
|
`uuid` char(36) NOT NULL UNIQUE,
|
||||||
|
`username` varchar(16) NOT NULL,
|
||||||
|
|
||||||
|
PRIMARY KEY (`uuid`)
|
||||||
|
) ENGINE = InnoDB
|
||||||
|
DEFAULT CHARSET = utf8mb4
|
||||||
|
COLLATE = utf8mb4_unicode_ci;
|
||||||
|
CREATE INDEX IF NOT EXISTS `%users_table%_username` ON `%users_table%` (`username`);
|
||||||
|
|
||||||
|
-- Create the user data table if it does not exist
|
||||||
|
CREATE TABLE IF NOT EXISTS `%user_data_table%`
|
||||||
|
(
|
||||||
|
`version_uuid` char(36) NOT NULL UNIQUE,
|
||||||
|
`player_uuid` char(36) NOT NULL,
|
||||||
|
`timestamp` datetime NOT NULL,
|
||||||
|
`save_cause` varchar(32) NOT NULL,
|
||||||
|
`pinned` boolean NOT NULL DEFAULT FALSE,
|
||||||
|
`data` longblob NOT NULL,
|
||||||
|
PRIMARY KEY (`version_uuid`, `player_uuid`),
|
||||||
|
FOREIGN KEY (`player_uuid`) REFERENCES `%users_table%` (`uuid`) ON DELETE CASCADE
|
||||||
|
) ENGINE = InnoDB
|
||||||
|
DEFAULT CHARSET = utf8mb4
|
||||||
|
COLLATE = utf8mb4_unicode_ci;
|
||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync;
|
package net.william278.husksync;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.data;
|
package net.william278.husksync.data;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.hook;
|
package net.william278.husksync.hook;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of HuskSync by William278. Do not redistribute!
|
* This file is part of HuskSync, licensed under the Apache License 2.0.
|
||||||
*
|
*
|
||||||
* Copyright (c) William278 <will27528@gmail.com>
|
* Copyright (c) William278 <will27528@gmail.com>
|
||||||
* All rights reserved.
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* plugin once from any of the official sources it is provided. The availability of this code does
|
* you may not use this file except in compliance with the License.
|
||||||
* not grant you the rights to modify, re-distribute, compile or redistribute this source code or
|
* You may obtain a copy of the License at
|
||||||
* "plugin" outside this intended purpose. This license does not cover libraries developed by third
|
*
|
||||||
* parties that are utilised in the plugin.
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.william278.husksync.player;
|
package net.william278.husksync.player;
|
||||||
|
|||||||
41
docs/API.md
41
docs/API.md
@@ -1,11 +1,20 @@
|
|||||||
[](https://github.com/WiIIiam278/HuskSync)
|
|
||||||
# HuskSync API v2
|
|
||||||

|
|
||||||
|
|
||||||
The HuskSync API provides methods for retrieving and updating user data, as well as a number of events for tracking when user data is synced and saved.
|
The HuskSync API provides methods for retrieving and updating user data, as well as a number of events for tracking when user data is synced and saved.
|
||||||
|
|
||||||
The API is distributed via [JitPack](https://jitpack.io/#net.william278/HuskSync). Please note that the HuskSync v1 API is not compatible.
|
## Compatibility
|
||||||
(Some) javadocs are also available to view on Jitpack [here](https://javadoc.jitpack.io/net/william278/HuskSync/latest/javadoc/).
|
[](https://repo.william278.net/#/releases/net/william278/husksync/)
|
||||||
|
|
||||||
|
The HuskSync API shares version numbering with the plugin itself for consistency and convenience. Please note minor and patch plugin releases may make API additions and deprecations, but will not introduce breaking changes without notice.
|
||||||
|
|
||||||
|
| API Version | HuskSync Versions | Supported |
|
||||||
|
|:-----------:|:--------------------:|:---------:|
|
||||||
|
| v2.x | _v2.0—Current_ | ✅ |
|
||||||
|
| v1.x | _v1.0—v1.4.1_ | ❌️ |
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Targeting older versions</summary>
|
||||||
|
|
||||||
|
HuskSync versions prior to `v2.2.5` are distributed on [JitPack](https://jitpack.io/#/net/william278/HuskSync), and you will need to use the `https://jitpack.io` repository instead.
|
||||||
|
</details>
|
||||||
|
|
||||||
## Table of contents
|
## Table of contents
|
||||||
1. Adding the API to your project
|
1. Adding the API to your project
|
||||||
@@ -17,21 +26,21 @@ The API is distributed via [JitPack](https://jitpack.io/#net.william278/HuskSync
|
|||||||
<details>
|
<details>
|
||||||
<summary>Maven setup information</summary>
|
<summary>Maven setup information</summary>
|
||||||
|
|
||||||
- Add the repository to your `pom.xml` as per below.
|
Add the repository to your `pom.xml` as per below. You can alternatively specify `/snapshots` for the repository containing the latest development builds (not recommended).
|
||||||
```xml
|
```xml
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>jitpack.io</id>
|
<id>william278.net</id>
|
||||||
<url>https://jitpack.io</url>
|
<url>https://repo.william278.net/releases</url>
|
||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
```
|
```
|
||||||
- Add the dependency to your `pom.xml` as per below. Replace `version` with the latest version of HuskSync (without the v): 
|
Add the dependency to your `pom.xml` as per below. Replace `VERSION` with the latest version of HuskSync (without the v): 
|
||||||
```xml
|
```xml
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.william278</groupId>
|
<groupId>net.william278</groupId>
|
||||||
<artifactId>HuskSync</artifactId>
|
<artifactId>husksync</artifactId>
|
||||||
<version>version</version>
|
<version>VERSION</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
@@ -41,19 +50,19 @@ The API is distributed via [JitPack](https://jitpack.io/#net.william278/HuskSync
|
|||||||
<details>
|
<details>
|
||||||
<summary>Gradle setup information</summary>
|
<summary>Gradle setup information</summary>
|
||||||
|
|
||||||
- Add the dependency like so to your `build.gradle`:
|
Add the dependency as per below to your `build.gradle`. You can alternatively specify `/snapshots` for the repository containing the latest development builds (not recommended).
|
||||||
```groovy
|
```groovy
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
maven { url 'https://jitpack.io' }
|
maven { url 'https://repo.william278.net/releases' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
- Add the dependency as per below. Replace `version` with the latest version of HuskSync (without the v): 
|
Add the dependency as per below. Replace `VERSION` with the latest version of HuskSync (without the v): 
|
||||||
|
|
||||||
```groovy
|
```groovy
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly 'net.william278:HuskSync:version'
|
compileOnly 'net.william278:husksync:VERSION'
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|||||||
30
docs/FAQs.md
30
docs/FAQs.md
@@ -3,29 +3,43 @@ This page addresses a number of frequently asked questions about the plugin.
|
|||||||
## Frequently Asked Questions
|
## Frequently Asked Questions
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary> <b>What data can be synchronised?</b></summary>
|
<summary> <b>What data can be synchronized?</b></summary>
|
||||||
|
|
||||||
HuskSync supports synchronising a wide range of different data elements, each of which can be toggled to your liking. Please check out the [[Sync Features]] page for a full list.
|
HuskSync supports synchronising a wide range of different data elements, each of which can be toggled to your liking. Please check out the [[Sync Features]] page for a full list.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary> <b>Is Redis required? What is Redis?</b></summary>
|
<summary> <b>Are modded items supported?</b></summary>
|
||||||
|
|
||||||
HuskSync requires Redis to operate (for reasons demonstrated below). Redis is an in-memory database server used for caching data at scale and sending messages across a network. You have a Redis server in a similar fashion to the way you have a MySQL database server. If you're using a Minecraft hosting company, you'll want to contact their support and ask if they offer Redis. If you're looking for a host, I have a list of some popular hosts and whether or not they support Redis [available to read here.](https://william278.net/redis-hosts)
|
Modded items are not supported.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary> <b>How does the plugin synchronise data?</b></summary>
|
<summary> <b>Are MMOItems / SlimeFun items supported?</b></summary>
|
||||||
|
|
||||||
[](#)
|
No. MMOItems and SlimeFun are not compatible with HuskSync due to the way they inject data directly into item NBT rather than the Spigot API's plugin-agnostic PersistentDataContainer.
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary> <b>Is Redis required? What is Redis?</b></summary>
|
||||||
|
|
||||||
|
HuskSync requires Redis to operate (for reasons demonstrated below). Redis is an in-memory database server used for caching data at scale and sending messages across a network. You have a Redis server in a similar fashion to the way you have a MySQL database server. If you're using a Minecraft hosting company, you'll want to contact their support and ask if they offer Redis. If you're looking for a host, I have a list of some popular hosts and whether they support Redis [available to read here.](https://william278.net/redis-hosts)
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary> <b>How does the plugin synchronize data?</b></summary>
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
HuskSync makes use of both MySQL and Redis for optimal data synchronisation.
|
HuskSync makes use of both MySQL and Redis for optimal data synchronisation.
|
||||||
|
|
||||||
When a user changes servers, in addition to data being saved to MySQL, it is also cached via the Redis server with a temproary expiry key. When changing servers, the receiving server detects the key and sets the user data from Redis. When a player rejoins the network, the system fetches the last-saved data snapshot from the MySQL Database.
|
When a user changes servers, in addition to data being saved to MySQL, it is also cached via the Redis server with a temproary expiry key. When changing servers, the receiving server detects the key and sets the user data from Redis. When a player rejoins the network, the system fetches the last-saved data snapshot from the MySQL Database.
|
||||||
|
|
||||||
This approach is able to dramatically improve both synchronisation performance and reliability. A few other techniques are used to optimize this process, such as comrpessing the serialized user data json using Snappy.
|
This approach is able to dramatically improve both synchronization performance and reliability. A few other techniques are used to optimize this process, such as compressing the serialized user data json using Snappy.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -47,7 +61,9 @@ As a result, I recommend using an economy plugin (that directly *implements* the
|
|||||||
<details>
|
<details>
|
||||||
<summary> <b>Is this better than MySQLPlayerDataBridge?</b></summary>
|
<summary> <b>Is this better than MySQLPlayerDataBridge?</b></summary>
|
||||||
|
|
||||||
I can't provide a fair answer to this question! What I can say is that your mileage may vary. The performance improvements offered by HuskSync's synchronisation method will depend on your network environment and the economies of scale that come with your player count.
|
I can't provide a fair answer to this question! What I can say is that your mileage may vary. The performance improvements offered by HuskSync's synchronization method will depend on your network environment and the economies of scale that come with your player count.
|
||||||
|
|
||||||
|
With that said, servers running plugins or mods that make use of custom items (such as MMOItems, SlimeFun) are not supported by HuskSync and so MySQLPlayerDataBridge may be a better choice for you.
|
||||||
|
|
||||||
A migrator from MPDB is built-in to HuskSync.
|
A migrator from MPDB is built-in to HuskSync.
|
||||||
|
|
||||||
|
|||||||
@@ -27,5 +27,5 @@ Welcome! This is the plugin documentation for HuskSync v2.x+. Please click throu
|
|||||||
* 📂 [Buy HuskSync](https://www.spigotmc.org/resources/husksync.97144/)
|
* 📂 [Buy HuskSync](https://www.spigotmc.org/resources/husksync.97144/)
|
||||||
* 🛒 [Spigot](https://www.spigotmc.org/resources/husksync.97144/)
|
* 🛒 [Spigot](https://www.spigotmc.org/resources/husksync.97144/)
|
||||||
* 🛒 [Polymart](https://polymart.org/resource/husksync.1634)
|
* 🛒 [Polymart](https://polymart.org/resource/husksync.1634)
|
||||||
* 🛒 [Songoda](https://songoda.com/marketplace/product/husksync-a-modern-cross-server-player-data-synchronization-system.758)
|
* 🛒 [Craftaro](https://craftaro.com/marketplace/product/husksync.758)
|
||||||
* 💬 [Discord Support](https://discord.gg/tVYhJfyDWG)
|
* 💬 [Discord Support](https://discord.gg/tVYhJfyDWG)
|
||||||
@@ -7,28 +7,30 @@ You can customise how much data HuskSync saves about a player by [turning each s
|
|||||||
|
|
||||||
| Name | Description | Availability |
|
| Name | Description | Availability |
|
||||||
|---------------------------|-------------------------------------------------------------|:------------:|
|
|---------------------------|-------------------------------------------------------------|:------------:|
|
||||||
| Inventories | Items in player inventories & selected hotbar slot | ✅ |
|
| Inventories | Items in player inventories & selected hotbar slot | ✅ |
|
||||||
| Ender chests | Items in ender chests* | ✅ |
|
| Ender chests | Items in ender chests* | ✅ |
|
||||||
| Health | Player health points | ✅ |
|
| Health | Player health points | ✅ |
|
||||||
| Max health | Player max health points and health scale | ✅ |
|
| Max health | Player max health points and health scale | ✅ |
|
||||||
| Hunger | Player hunger, saturation & exhaustion | ✅ |
|
| Hunger | Player hunger, saturation & exhaustion | ✅ |
|
||||||
| Experience | Player level, experience points & score | ✅ |
|
| Experience | Player level, experience points & score | ✅ |
|
||||||
| Potion effects | Active status effects on players | ✅ |
|
| Potion effects | Active status effects on players | ✅ |
|
||||||
| Advancements | Player advancements, recipes & progress | ✅ |
|
| Advancements | Player advancements, recipes & progress | ✅ |
|
||||||
| Game modes | Player's current game mode | ✅ |
|
| Game modes | Player's current game mode | ✅ |
|
||||||
| Statistics | Player's in-game stats (ESC -> Statistics) | ✅ |
|
| Statistics | Player's in-game stats (ESC -> Statistics) | ✅ |
|
||||||
| Location | Player's current coordinate positon and world† | ✅ |
|
| Location | Player's current coordinate positon and world† | ✅ |
|
||||||
| Persistent Data Container | Custom plugin persistent data key map | ⚠️ |
|
| Persistent Data Container | Custom plugin persistent data key map | ⚠️ |
|
||||||
| Locked maps | Maps/treasure maps locked in a cartography table | ⚠️ |
|
| Locked maps | Maps/treasure maps locked in a cartography table | ⚠️ |
|
||||||
| Unlocked maps | Regular, unlocked maps/treasure maps ([why?](#map-syncing)) | ❌ |
|
| Unlocked maps | Regular, unlocked maps/treasure maps ([why?](#map-syncing)) | ❌ |
|
||||||
| Economy balances | Vault economy balance. ([why?](#economy-syncing)) | ❌ |
|
| Economy balances | Vault economy balance. ([why?](#economy-syncing)) | ❌ |
|
||||||
|
|
||||||
|
What about modded items? Or custom item plugins such as MMOItems or SlimeFun? These items are **not compatible**—check the [[FAQs]] for more information.
|
||||||
|
|
||||||
*Purpur's custom ender chest resizing feature is also supported.
|
*Purpur's custom ender chest resizing feature is also supported.
|
||||||
|
|
||||||
†This is intended for servers that have mirrorred worlds across instances (such as RPG servers). With this option enabled, players will be placed at the same coordinates when changing servers.
|
†This is intended for servers that have mirrorred worlds across instances (such as RPG servers). With this option enabled, players will be placed at the same coordinates when changing servers.
|
||||||
|
|
||||||
### PersistentDataContainer tags
|
### PersistentDataContainer tags
|
||||||
The player [PersistentDataContainer](https://blog.jeff-media.com/persistent-data-container-the-better-alternative-to-nbt-tags/) is a part of the Spigot API that enables plugins to set custom data tags to players, entities & items and have them persist. HuskSync will synchronise this data cross-server. Plugins that use legacy or propietary forms of saving data, such as by modifying NBT directly, may not correctly synchronise.
|
The player [PersistentDataContainer](https://blog.jeff-media.com/persistent-data-container-the-better-alternative-to-nbt-tags/) is a part of the Spigot API that enables plugins to set custom data tags to players, entities & items and have them persist. HuskSync will synchronise this data cross-server. Plugins that use legacy or proprietary forms of saving data, such as by modifying NBT directly, may not correctly synchronise.
|
||||||
|
|
||||||
### Custom enchantments
|
### Custom enchantments
|
||||||
Plugins that add custom enchantments by registering them to ItemStacks through setting them via the [EnchantmentStorageMeta](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/meta/EnchantmentStorageMeta.html) will work, but note that the plugin _must_ be lower on the load order than HuskSync; in other words, HuskSync should be on the plugin's `loadbefore:`. This is because Spigot's item serialization API requires that the plugin that registered the enchantment be online to serialize it due to how it reads from the enchantment registry and so if the plugin does not load before (and thus does not shut down after) HuskSync, it won't be able to serialize the custom enchantments in the event of a server shutdown with players online.
|
Plugins that add custom enchantments by registering them to ItemStacks through setting them via the [EnchantmentStorageMeta](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/meta/EnchantmentStorageMeta.html) will work, but note that the plugin _must_ be lower on the load order than HuskSync; in other words, HuskSync should be on the plugin's `loadbefore:`. This is because Spigot's item serialization API requires that the plugin that registered the enchantment be online to serialize it due to how it reads from the enchantment registry and so if the plugin does not load before (and thus does not shut down after) HuskSync, it won't be able to serialize the custom enchantments in the event of a server shutdown with players online.
|
||||||
@@ -41,10 +43,10 @@ However, experimental support for synchronising locked map items—that is,
|
|||||||
### Economy syncing
|
### Economy syncing
|
||||||
Although it's a common request, HuskSync doesn't synchronise economy data for a number of reasons!
|
Although it's a common request, HuskSync doesn't synchronise economy data for a number of reasons!
|
||||||
|
|
||||||
I strongly reccommend making use of economy plugins that have cross-server economy balance synchronisation built-in, of which there are a multitude of options available. Please see our [[FAQs]] section for more details on this decision.
|
I strongly recommend making use of economy plugins that have cross-server economy balance synchronisation built-in, of which there are a multitude of options available. Please see our [[FAQs]] section for more details on this decision.
|
||||||
|
|
||||||
## Toggling Sync Features
|
## Toggling Sync Features
|
||||||
All synchronisation features, except location and locked map synchronising, are enabled by default. To toggle a feature, navigate to the `features:` section in the `synchronisation:` part of your `config.yml` file, and change the option to `true`/`false` respectively.
|
All synchronization features, except location and locked map synchronising, are enabled by default. To toggle a feature, navigate to the `features:` section in the `synchronisation:` part of your `config.yml` file, and change the option to `true`/`false` respectively.
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Example in config.yml</summary>
|
<summary>Example in config.yml</summary>
|
||||||
|
|||||||
@@ -24,5 +24,5 @@
|
|||||||
* 📂 [Buy HuskSync](https://www.spigotmc.org/resources/husksync.97144/)
|
* 📂 [Buy HuskSync](https://www.spigotmc.org/resources/husksync.97144/)
|
||||||
* 🛒 [Spigot](https://www.spigotmc.org/resources/husksync.97144/)
|
* 🛒 [Spigot](https://www.spigotmc.org/resources/husksync.97144/)
|
||||||
* 🛒 [Polymart](https://polymart.org/resource/husksync.1634)
|
* 🛒 [Polymart](https://polymart.org/resource/husksync.1634)
|
||||||
* 🛒 [Songoda](https://songoda.com/marketplace/product/husksync-a-modern-cross-server-player-data-synchronization-system.758)
|
* 🛒 [Craftaro](https://craftaro.com/marketplace/product/husksync.758)
|
||||||
* 💬 [Discord Support](https://discord.gg/tVYhJfyDWG)
|
* 💬 [Discord Support](https://discord.gg/tVYhJfyDWG)
|
||||||
@@ -3,11 +3,12 @@ org.gradle.jvmargs='-Dfile.encoding=UTF-8'
|
|||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
javaVersion=16
|
javaVersion=16
|
||||||
|
|
||||||
plugin_version=2.2.5
|
plugin_version=2.2.8
|
||||||
plugin_archive=husksync
|
plugin_archive=husksync
|
||||||
plugin_description=A modern, cross-server player data synchronization system
|
plugin_description=A modern, cross-server player data synchronization system
|
||||||
|
|
||||||
jedis_version=4.3.2
|
jedis_version=4.3.2
|
||||||
mysql_driver_version=8.0.32
|
mysql_driver_version=8.1.0
|
||||||
|
mariadb_driver_version=3.1.4
|
||||||
snappy_version=1.1.9.1
|
snappy_version=1.1.9.1
|
||||||
commons_text_version=1.10.0
|
commons_text_version=1.10.0
|
||||||
Reference in New Issue
Block a user