Compare commits

...
26 Commits
Author SHA1 Message Date
NotAlexNoyle ee4d60ab4e Update canonical Gitea link 2026-10-31 14:24:33 -04:00
NotAlexNoyle 374e17577b Exclude CODEOWNERS from language statistics 2026-10-26 12:28:34 -04:00
NotAlexNoyle 4b99d060f0 Add CODEOWNERS (one staff approval) 2026-10-26 04:43:05 -04:00
NotAlexNoyleandClaude Opus 4.6 afe9033684 Merge upstream updates from EarthMC/QuickShop-Reremake (PR #3)
Remove Metrics, Sentry/Rollbar error reporting, FabledSkyblock integration,
environment checker, Bootstrap GUI, Spartan compatibility, and all tests.
Adopt Adventure API for item hover chat, simplify ReflectFactory methods,
cache hopper protection config. Retain 1.19.4 API compatibility
(EntityType.DROPPED_ITEM, PotionData, NMS-based item JSON serialization).
Clean up build.gradle.kts to match removed code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 07:05:13 -04:00
NotAlexNoyle 87fff7d84e Remove .github 2026-03-26 11:55:04 -04:00
NotAlexNoyle 9736254016 Merge PR #2 into Gradle-based QuickShop-OG 2026-03-26 11:50:42 -04:00
Warrior 4a190e1381 Remove method call that made a year old optimization useless 2026-01-07 22:25:48 +01:00
Warrior a941674e0e Ignore bad inventory close event calls 2025-12-19 17:05:44 +01:00
Warrior 443bfad57b "Fix" item names 2025-11-07 21:33:58 +01:00
Warrior 71c1d07013 Remove fabledskyblock integration 2025-11-07 21:33:34 +01:00
Warrior 7e43fcc051 more legacy chat fixes 2025-11-01 15:54:18 +01:00
Warrior 4fb434e958 hack item hover support back in 2025-11-01 15:45:22 +01:00
Warrior 5852485aef Cache protectHoppers in a variable 2025-08-21 23:29:57 +02:00
Warrior 3ccdf8dc8a Potiondata strikes again 2025-07-29 10:13:19 +02:00
Warrior 7f17257901 Fix more deprecated PotionData usage 2025-07-20 12:36:17 +02:00
Warrior 38f339bf49 Capitalize LiteBans properly
Fixes https://github.com/EarthMC/Issue-Tracker/issues/1974
2025-06-11 23:37:15 +02:00
Warrior 0d15f05781 Try fixing potion translations
Language loading still seems half busted but at least this is better
2025-03-03 20:45:16 +01:00
Warrior 1a5a027778 Lowercase key values for blacklist 2025-03-03 15:26:51 +01:00
Warrior 9c442b3cf0 Replace enummap/set 2025-03-03 15:25:30 +01:00
Warrior 5501a45a0c Don't unload virtual item manager when not in use 2025-03-03 11:42:01 +01:00
Warrior b5d9729bc2 Actual api version 2025-02-22 00:57:25 +01:00
Warrior 8ab984d701 Rip out more 2025-02-22 00:32:57 +01:00
Warrior f8f7485232 Rip stuff out until it compiles 2025-02-22 00:12:25 +01:00
Warrior 78aa5f3998 Allow muted players to purchase from shops 2025-02-05 22:58:42 +01:00
NotAlexNoyle 70a1b69a9e Fix build 2024-11-30 02:44:48 -05:00
NotAlexNoyle d4e6bb4f05 Merge pull request #1 from NotAlexNoyle/merge-reremake
Merge command changes from nfish2021
2024-11-30 02:26:00 -05:00
379 changed files with 17180 additions and 9789 deletions

No files matched your search

-10
View File
@@ -1,10 +0,0 @@
component_depth: 100
languages:
- java
- script
exclude:
- /src/main/resources
- /src/test/
- /.github
- /.idea
- /lib
-20
View File
@@ -1,20 +0,0 @@
version = 1
[[analyzers]]
name = "shell"
enabled = true
[[analyzers]]
name = "sql"
enabled = true
[[analyzers]]
name = "test-coverage"
enabled = true
[[analyzers]]
name = "java"
enabled = true
[analyzers.meta]
runtime_version = "15"
+1
View File
@@ -0,0 +1 @@
.gitea/CODEOWNERS linguist-detectable=false
+3
View File
@@ -0,0 +1,3 @@
# Pull requests request review from the eligible staff team(s).
# One approval from either an Admin or Developer satisfies branch protection.
* @trueog/Admins @trueog/Developers
-12
View File
@@ -1,12 +0,0 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: Ghost_chu
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
-72
View File
@@ -1,72 +0,0 @@
name: 'Bug Report'
description: 'Report a bug with QuickShop to us.'
title: '[BUG] '
labels:
- 'Bug'
body:
- type: 'markdown'
attributes:
value: |-
## Please Read!
This Form is reserved for **Bug reports only!**
- For performance issues with QuickShop, open a [Performance Report](https://github.com/PotatoCraft-Studio/QuickShop-Reremake/issues/new?template=performance.yml&labels=performance).
- For contributions towards the wiki, open a [Wiki Contribution](https://github.com/PotatoCraft-Studio/QuickShop-Reremake/issues/new?template=wiki_contribution.yml.yml&labels=wiki).
- Feature requests or other suggestions should be made in the [Discussions](https://github.com/PotatoCraft-Studio/QuickShop-Reremake/discussions).
Please fill out all required fields in their entirety and as detailed as possible. Failing to do so could get your issue closed without any warning.
- type: 'textarea'
attributes:
label: 'Description'
description: |-
Describe the bug as detailed as possible.
You cann upload screenshots of the bug in the "screenshots" section further down.
placeholder: 'When I used Quickshop did ... happen.'
validations:
required: true
- type: 'textarea'
attributes:
label: 'Steps to reproduce'
description: 'List your steps on how to reproduce this bug reliably here.'
placeholder: |-
1. Do something
2. ...
3. Bug!
validations:
required: true
- type: 'textarea'
attributes:
label: 'Expected Behaviour'
description: 'What did you expect QuickShop to do?'
placeholder: 'QuickShop should ...'
validations:
required: true
- type: 'textarea'
attributes:
label: 'Screenshots'
description: |-
Provide screenshots to show the bug, if possible.
Gifs or Videos are also welcome if they can help explaining the issue.
placeholder: 'When I used Quickshop did ... happen.'
validations:
required: true
- type: 'input'
attributes:
label: '`/qs paste` URL'
description: |-
Please execute `/qs paste` in-game or `qs paste` in your server console.
The plugin will generate a URL that you can then post in the field below.
If you can't create a paste, should you upload other files such as the `latest.log` file to https://paste.helpch.at and share the URL.
If QuickShop is unable to generate a Paste will it create a file under `plugins/QuickShop/`
placeholder: 'https://paste.helpch.at/...'
validations:
required: true
- type: 'textarea'
attributes:
label: 'Additional Context'
description: 'Feel free to include any info that may not fit any of the previous sections.'
placeholder: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam ...'
-16
View File
@@ -1,16 +0,0 @@
blank_issues_enabled: true
contact_links:
- name: 'Development Builds'
about: |-
Bleeding-edge builds with the latest features and bug fixes.
DEV-BUILDS MAY CAUSE DAMAGE TO YOUR SERVER! MAKE BACKUPS FIRST!
url: 'https://ci.codemc.io/job/PotatoCraft-Studio/job/QuickShop-Reremake-SNAPSHOT/'
- name: 'Feature Requests'
about: 'Use our discussions page to request changes towards QuickShop.'
url: 'https://github.com/PotatoCraft-Studio/QuickShop-Reremake/discussions/categories/ideas'
- name: 'Wiki'
about: 'Find info about QuickShop in our dedicated wiki.'
url: 'https://github.com/PotatoCraft-Studio/QuickShop-Reremake/wiki'
- name: 'Discord'
about: 'Join our Discord to ask questions and get fast support.'
url: 'https://discord.gg/bfefw2E'
-90
View File
@@ -1,90 +0,0 @@
name: 'Performance Report'
description: 'Report performance issues with QuickShop.'
title: '[PERFORMANCE] '
labels:
- 'Performance Issue'
body:
- type: 'markdown'
attributes:
value: |-
## Please Read!
This Form is reserved for **Performance reports only!**
- For Bugs or issues with QuickShop, open a [Bug Report](https://github.com/PotatoCraft-Studio/QuickShop-Reremake/issues/new?template=bug_report.yml&labels=bug).
- For contributions towards the wiki, open a [Wiki Contribution](https://github.com/PotatoCraft-Studio/QuickShop-Reremake/issues/new?template=wiki_contribution.yml.yml&labels=wiki).
- Feature requests or other suggestions should be made in the [Discussions](https://github.com/PotatoCraft-Studio/QuickShop-Reremake/discussions).
Please fill out all required fields in their entirety and as details as possible. Failing to do so could get your issue closed without any warning.
#### Additional Notes
Please only provide Sampler results from [Spark](https://www.spigotmc.org/resources/57242/)! Spigot Timings - no matter if v1 or v2 - will be ignored.
Your issue will be closed without any reply if only a Spigot Timings Report was provided.
- type: 'textarea'
attributes:
label: 'Description'
description: |-
Describe the issue as detailed as possible.
You cann upload screenshots of the issue in the "screenshots" section further down.
placeholder: 'When I used Quickshop did ... happen.'
validations:
required: true
- type: 'textarea'
attributes:
label: 'Steps to reproduce'
description: 'List your steps on how to reproduce this issue reliably here.'
placeholder: |-
1. Do something
2. ...
3. Bad performance!
validations:
required: true
- type: 'textarea'
attributes:
label: 'Expected Behaviour'
description: 'What did you expect QuickShop to do?'
placeholder: 'QuickShop should ...'
validations:
required: true
- type: 'textarea'
attributes:
label: 'Screenshots'
description: |-
Provide screenshots to show the performance problems, if possible.
Gifs or Videos are also welcome if they can help explaining the issue.
placeholder: 'When I used Quickshop did ... happen.'
validations:
required: true
- type: 'input'
attributes:
label: '`/qs paste` URL'
description: |-
Please execute `/qs paste` in-game or `qs paste` in your server console.
The plugin will generate a URL that you can then post in the field below.
If you can't create a paste, should you upload other files such as the `latest.log` file to https://paste.helpch.at and share the URL.
If QuickShop is unable to generate a Paste will it create a file under `plugins/QuickShop/`
placeholder: 'https://paste.helpch.at/...'
validations:
required: true
- type: 'input'
attributes:
label: 'Spark Sample URL'
description: |-
**How to use [Spark](https://www.spigotmc.org/resources/57242/)**
1. Download the plugin from the Spigot page (linked above) if you haven't already.
2. Add it to the server like any other plugin (Stop Server, add jar, start server).
3. Join the server and execute `/spark sampler --start`
4. Wait at least 10 minutes and/or perform the actions that cause performance issues with QuickShop.
5. Execute `/spark sampler --stop` to get the URL
6. Paste the URL in the field below.
validations:
required: true
- type: 'textarea'
attributes:
label: 'Additional Context'
description: 'Feel free to include any info that may not fit any of the previous sections.'
placeholder: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam ...'
@@ -1,36 +0,0 @@
name: 'Wiki Contribution'
description: 'Inform about a Contribution that you want to make towards the wiki.'
title: '[WIKI] '
labels:
- 'Wiki'
body:
- type: 'markdown'
attributes:
value: |-
## Please Read!
This Form is reserved for **Wiki Contributions only!**
- For Bugs or issues with QuickShop, open a [Bug Report](https://github.com/PotatoCraft-Studio/QuickShop-Reremake/issues/new?template=bug_report.yml&labels=bug).
- For performance issues with QuickShop, open a [Performance Report](https://github.com/PotatoCraft-Studio/QuickShop-Reremake/issues/new?template=performance.yml&labels=performance).
- Feature requests or other suggestions should be made in the [Discussions](https://github.com/PotatoCraft-Studio/QuickShop-Reremake/discussions).
Please fill out all required fields in their entirety and as detailed as possible. Failing to do so could get your issue closed without any warning.
- type: 'input'
attributes:
label: 'Repository URL'
description: 'Provide a URL to your GitHub Repository containing your Wiki changes.'
placeholder: 'https://github.com/example/repo'
validations:
required: true
- type: 'textarea'
attributes:
label: 'Changes'
description: 'Provide a list of all changes you made.'
placeholder: |-
- Changed this.
- Changed that.
- Also changed this!
validations:
required: true
-49
View File
@@ -1,49 +0,0 @@
version: 2
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
ignore:
- dependency-name: com.github.ben-manes.caffeine:caffeine
versions:
- "> 2.8.8"
- dependency-name: com.github.TownyAdvanced:Towny
versions:
- "> 0.96.2.0"
- dependency-name: io.sentry:sentry
versions:
- "> 3.1.1"
- dependency-name: net.kyori:adventure-text-serializer-gson
versions:
- "> 4.2.0, < 5"
- dependency-name: net.minidev:json-smart
versions:
- "> 1.3.2"
- dependency-name: net.tnemc:Reserve
versions:
- "> 0.1.3.0"
- dependency-name: org.junit.jupiter:junit-jupiter
versions:
- "> RELEASE"
- dependency-name: org.slf4j:slf4j-nop
versions:
- "> 1.7.6"
- dependency-name: com.massivecraft:Factions
versions:
- 1.6.9.5-2.6.8-STABLE
- dependency-name: com.github.angeschossen:LandsAPI
versions:
- 5.2.1
- 5.2.2
- 5.3.2
- 5.3.3
- 5.5.5
- dependency-name: com.github.seeseemelk:MockBukkit-v1.16
versions:
- 0.25.0
- 0.27.0
- 0.28.0
- 0.32.1
- 0.32.2
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

-23
View File
@@ -1,23 +0,0 @@
<!--
- This file is a part of project QuickShop, the name is Discord.svg
- Copyright (C) PotatoCraft Studio and contributors
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-->
<svg xmlns="http://www.w3.org/2000/svg" width="71" height="80" fill="none" viewBox="0 0 71 80">
<path fill="#5865F2"
d="M60.1045 13.8978C55.5792 11.8214 50.7265 10.2916 45.6527 9.41542C45.5603 9.39851 45.468 9.44077 45.4204 9.52529C44.7963 10.6353 44.105 12.0834 43.6209 13.2216C38.1637 12.4046 32.7345 12.4046 27.3892 13.2216C26.905 12.0581 26.1886 10.6353 25.5617 9.52529C25.5141 9.44359 25.4218 9.40133 25.3294 9.41542C20.2584 10.2888 15.4057 11.8186 10.8776 13.8978C10.8384 13.9147 10.8048 13.9429 10.7825 13.9795C1.57795 27.7309 -0.943561 41.1443 0.293408 54.3914C0.299005 54.4562 0.335386 54.5182 0.385761 54.5576C6.45866 59.0174 12.3413 61.7249 18.1147 63.5195C18.2071 63.5477 18.305 63.5139 18.3638 63.4378C19.7295 61.5728 20.9469 59.6063 21.9907 57.5383C22.0523 57.4172 21.9935 57.2735 21.8676 57.2256C19.9366 56.4931 18.0979 55.6 16.3292 54.5858C16.1893 54.5041 16.1781 54.304 16.3068 54.2082C16.679 53.9293 17.0513 53.6391 17.4067 53.3461C17.471 53.2926 17.5606 53.2813 17.6362 53.3151C29.2558 58.6202 41.8354 58.6202 53.3179 53.3151C53.3935 53.2785 53.4831 53.2898 53.5502 53.3433C53.9057 53.6363 54.2779 53.9293 54.6529 54.2082C54.7816 54.304 54.7732 54.5041 54.6333 54.5858C52.8646 55.6197 51.0259 56.4931 49.0921 57.2228C48.9662 57.2707 48.9102 57.4172 48.9718 57.5383C50.038 59.6034 51.2554 61.5699 52.5959 63.435C52.6519 63.5139 52.7526 63.5477 52.845 63.5195C58.6464 61.7249 64.529 59.0174 70.6019 54.5576C70.6551 54.5182 70.6887 54.459 70.6943 54.3942C72.1747 39.0791 68.2147 25.7757 60.1968 13.9823C60.1772 13.9429 60.1437 13.9147 60.1045 13.8978ZM23.7259 46.3253C20.2276 46.3253 17.3451 43.1136 17.3451 39.1693C17.3451 35.225 20.1717 32.0133 23.7259 32.0133C27.308 32.0133 30.1626 35.2532 30.1066 39.1693C30.1066 43.1136 27.28 46.3253 23.7259 46.3253ZM47.3178 46.3253C43.8196 46.3253 40.9371 43.1136 40.9371 39.1693C40.9371 35.225 43.7636 32.0133 47.3178 32.0133C50.9 32.0133 53.7545 35.2532 53.6986 39.1693C53.6986 43.1136 50.9 46.3253 47.3178 46.3253Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

-140
View File
@@ -1,140 +0,0 @@
<!--
- This file is a part of project QuickShop, the name is Jenkins.svg
- Copyright (C) PotatoCraft Studio and contributors
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-->
<svg xmlns="http://www.w3.org/2000/svg" id="svg2" width="226" height="312"
version="1.1" xml:space="preserve"><metadata id="metadata8"/>
<defs id="defs6"><clipPath id="clipPath18" clipPathUnits="userSpaceOnUse"><path id="path20" d="M 0,2494.84 0,0 l 1804.34,0 0,2494.84 -1804.34,0 z"/></clipPath></defs>
<g id="g10" transform="matrix(1.25,0,0,-1.25,0,312)"><g id="g3393"><path style="fill:#d33833;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path22" d="m 177.718,129.264 c 0,-49.4288 -39.175,-89.4992 -87.5,-89.4992 -48.3242,0 -87.49925,40.0704 -87.49925,89.4992 0,49.43 39.17505,89.501 87.49925,89.501 48.325,0 87.5,-40.071 87.5,-89.501"/><path
style="fill:#ef3d3a;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path24"
d="m 6.28438,107.098 c 0,0 -6.33438,93.333 79.66602,96 l -5.9996,10 -46.6664,-15.667 -13.3336,-15.333 -11.66642,-22.334 -6.66719,-26 2,-17.333"/><path
style="fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path26"
d="M 30.2883,190.319 C 14.9363,174.611 5.43633,152.923 5.43633,128.93 l 0,0 c 0,-23.988 9.49997,-45.6788 24.85197,-61.3839 l 0,0 C 45.6477,51.841 66.8152,42.15 90.2168,42.15 l 0,0 c 23.4022,0 44.5712,9.691 59.9292,25.3961 l 0,0 c 15.351,15.7051 24.853,37.3959 24.853,61.3839 l 0,0 c 0,23.993 -9.502,45.681 -24.853,61.389 l 0,0 c -15.358,15.702 -36.527,25.393 -59.9292,25.395 l 0,0 C 66.8152,215.712 45.6477,206.021 30.2883,190.319 l 0,0 z M 26.4023,63.7469 C 10.0867,80.4328 0,103.493 0,128.93 l 0,0 c 0,25.441 10.0867,48.499 26.4023,65.186 l 0,0 c 16.3118,16.69 38.8915,27.035 63.8145,27.032 l 0,0 c 24.9232,0.003 47.5052,-10.342 63.8142,-27.032 l 0,0 c 16.317,-16.687 26.405,-39.747 26.403,-65.186 l 0,0 c 0.002,-25.437 -10.086,-48.4972 -26.403,-65.1831 l 0,0 C 137.722,47.0578 115.14,36.7141 90.2168,36.7141 l 0,0 c -24.923,0 -47.5027,10.3437 -63.8145,27.0328 l 0,0"/><path
style="fill:#f0d6b7;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path28"
d="m 127.051,128.768 -13.334,-2 -18.0002,-2 -11.6672,-0.333 -11.3328,0.333 -8.6672,2.667 -7.6668,8.333 -6,17 -1.3332,3.667 -8,2.666 -4.6668,7.667 -3.3332,11 3.6672,9.667 8.666,3 7,-3.334 3.334,-7.333 4,0.667 1.3328,1.666 -1.3328,7.667 -0.334,9.667 2,13.333 -0.0781,7.616 6.0781,9.717 10.6668,7.667 18.6672,8 20.6662,-3 18,-13 8.334,-13.333 5.333,-9.667 1.333,-24 -4,-20.667 -7.333,-18.333 -7,-9.667"/><path
style="fill:#335061;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path30"
d="m 115.717,71.102 -47.6674,-2 0,-8 4,-28 -2,-2.334 -33.3328,11.334 -2.334,4 -3.3332,37.666 -7.6656,22.667 -1.6672,5.333 26.666,18.333 8.334,3.334 7.3328,-9 6.3332,-5.667 7.334,-2.333 3.3328,-1 4,-17.333 3,-3.6668 7.6672,2.6668 -5.334,-10.334 29.0002,-13.666 -3.666,-2"/><path
style="fill:#6d6b6d;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path32"
d="m 36.7168,187.435 8.666,3 7,-3.334 3.334,-7.333 4,0.667 1,4 -2,7.666 2,18.334 -1.6672,10 6,7 13,10.333 -3.6668,5 -18.3332,-9 -7.6668,-6 -4.3332,-9.333 -6.6668,-9 -2,-10.667 1.334,-11.333"/><path
style="fill:#dcd9d8;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path34"
d="m 50.3828,218.768 c 0,0 5,12.333 25,18.333 20,6 1,4.334 1,4.334 l -21.666,-8.334 -8.334,-8.333 -3.666,-6.667 7.666,0.667"/><path
style="fill:#dcd9d8;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path36"
d="m 40.3828,189.768 c 0,0 -7,23.334 19.6668,26.667 l -1,4 -18.3328,-4.334 -5.334,-17.333 1.334,-11.333 3.666,2.333"/><path
style="fill:#f7e4cd;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path38"
d="m 51.0496,158.768 4.3645,4.229 c 0,0 1.9699,-0.229 2.3027,-2.562 0.3328,-2.334 1.3328,-23.334 15.666,-34.668 1.3074,-1.034 -10.666,1.668 -10.666,1.668 l -10.6672,16.666"/><path
style="fill:#f7e4cd;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path40"
d="m 112.385,165.101 c 0,0 0.777,10.104 3.498,9.327 2.721,-0.777 2.721,-3.498 2.721,-3.498 0,0 -6.608,-4.275 -6.219,-5.829"/><path
style="fill:#f7e4cd;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path42"
d="m 140.05,202.101 c 0,0 -5.494,-1.16 -6,-6 -0.506,-4.841 6,-1 7,-0.667"/><path
style="fill:#f7e4cd;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path44"
d="m 99.7168,201.767 c 0,0 -7.334,-1 -7.334,-5.666 0,-4.667 8.3342,-4.334 10.6672,-2.334"/><path
style="fill:#f7e4cd;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path46"
d="m 54.3828,180.101 c 0,0 -12.6672,7.667 -14,0.333 -1.3332,-7.333 -4.334,-12.667 2,-20.333 l -4.3332,1.333 -4,10.333 -1.3328,10 7.666,8.001 8.6668,-0.667 5,-4 0.3332,-5"/><path
style="fill:#f7e4cd;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path48"
d="m 60.3828,201.101 c 0,0 5.6668,29.333 34.334,35 23.6012,4.665 35.9992,-1 40.6662,-6.333 0,0 -21,24.999 -41.0002,17.333 -20,-7.667 -34.666,-21.667 -34.3332,-30.666 0.5676,-15.328 0.3332,-15.334 0.3332,-15.334"/><path
style="fill:#f7e4cd;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path50"
d="m 137.717,226.435 c 0,0 -9.666,0.333 -10,-8.334 0,0 -0.001,-1.333 0.666,-2.666 0,0 7.668,8.667 12.334,4"/><path
style="fill:#f7e4cd;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path52"
d="m 95.3887,214.532 c 0,0 -1.6641,13.303 -13.0059,5.569 -7.3332,-5 -6.666,-12 -5.3332,-13.333 1.3332,-1.334 0.9707,-4.019 1.9856,-2.176 1.0144,1.843 0.6804,7.843 4.3476,9.509 3.6668,1.667 9.6777,3.529 12.0059,0.431"/><path
style="fill:#49728b;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path54"
d="m 64.0496,124.435 -31.3328,-14 c 0,0 13,-51.667 6.3328,-67.667 l -4.6668,1.666 -0.3332,19.6672 -8.6656,37.3328 -3.6672,10.334 32.666,21.999 9.6668,-9.332"/><path
style="fill:#49728b;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path56"
d="m 67.2715,95.8578 4.4453,-5.4238 0,-20 -5.334,0 c 0,0 -0.666,14 -0.666,15.6672 0,1.6668 0.666,7.6668 0.666,7.6668"/><path
style="fill:#49728b;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path58"
d="m 67.3828,67.434 -15,-0.666 4.334,-3 10.666,-1.6668"/><path
style="fill:#335061;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path60"
d="m 118.717,70.768 12.333,0.3332 3,-30.6672 -12.667,-1.666 -2.666,32"/><path
style="fill:#335061;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path62"
d="m 122.05,70.768 18.667,1 c 0,0 7.666,19.3332 7.666,20.3332 0,1 6.667,27.9998 6.667,27.9998 l -15,15.666 -3,2.667 -8,-8 0,-31 -7,-28.666"/><path
style="fill:#49728b;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path64"
d="m 130.383,73.1012 -11.666,-2.3332 1.666,-9.334 c 4.333,-2 11.667,3.334 11.667,3.334"/><path
style="fill:#49728b;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path66"
d="m 130.717,131.434 23.333,-17.333 0.667,8 -17.667,16.333 -6.333,-7"/><path
style="fill:#fff;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path68"
d="M 78.9508,5.09805 72.0496,33.102 68.6172,53.7648 68.0496,69.102 l 31.2348,1.6628 19.4326,0.0032 -1.767,-35.0032 3,-26.99996 -0.333,-5 -25.3326,-2 -15.3336,3.33321"/><path
style="fill:#dcd9d8;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path70"
d="m 114.383,71.1012 c 0,0 -1.666,-34.6672 3.334,-59.3332 0,0 -10,-6.33402 -24.6674,-8.00003 l 28.0004,1 3.333,2 -4,54.66603 -1,11.668"/><path
style="fill:#fff;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path72"
d="m 134.618,43.098 13,3.6668 24.666,1.3332 3.667,11.3329 -6.667,19.6671 -7.666,1 -10.667,-3.3332 -10.234,-4.9968 -5.433,0.9968 -4.234,-1.6636"/><path
style="fill:#dcd9d8;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path74"
d="m 134.383,49.768 c 0,0 8.666,3.9992 10,3.666 l -3.666,18.334 4.333,1.666 c 0,0 3,-17.3328 3,-19.3328 0,0 18.666,-1 20.333,-1 0,0 4,7.6668 3,15.6668 l 3.667,-10.6668 0.333,-6 -5.333,-8 -6,-1.3332 -10,0.3332 -3.333,4.3328 -11.667,-1.666 -3.667,-1.334"/><path
style="fill:#fff;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path76"
d="m 121.284,73.4309 -7.333,18.6671 -7.667,11 c 0,0 1.666,4.667 4,4.667 2.334,0 7.667,0 7.667,0 l 7.333,-2.667 -0.666,-12.3332 -3.334,-19.3339"/><path
style="fill:#dcd9d8;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path78"
d="m 122.717,79.768 c 0,0 -9.334,17.9992 -9.334,20.666 0,0 1.666,4 4,3 2.334,-1 7.334,-3.666 7.334,-3.666 l 0,6.333 -11.334,2.334 -7.666,-1 13,-30.667 2.666,-0.334"/><path
style="fill:#fff;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path80"
d="m 81.9512,123.764 -9.2344,1.004 -8.6672,2.667 0,-3 4.2348,-4.67 13.3332,-6"/><path
style="fill:#dcd9d8;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path82"
d="m 67.0508,122.765 c 0,0 10.334,-4.334 13.6672,-3.334 l 0.3316,-3.996 -9.3316,1.996 -5.6672,4 1,1.334"/><path
style="fill:#d33833;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path84"
d="m 134.582,106.63 c -5.656,0.166 -10.766,0.838 -15.24,2.1 0.304,1.834 -0.265,3.634 0.192,4.955 1.247,0.898 3.337,0.884 5.222,1.095 -1.63,0.801 -3.92,1.118 -5.801,0.655 -0.044,1.273 -0.615,2.062 -0.961,3.058 3.18,1.135 10.687,8.576 14.91,6.112 2.012,-1.172 2.867,-7.866 3.023,-11.121 0.13,-2.7 -0.245,-5.424 -1.345,-6.854"/><path
style="fill:none;stroke:#d33833;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path86"
d="m 134.582,106.63 c -5.656,0.166 -10.766,0.838 -15.24,2.1 0.304,1.834 -0.265,3.634 0.192,4.955 1.247,0.898 3.337,0.884 5.222,1.095 -1.63,0.801 -3.92,1.118 -5.801,0.655 -0.044,1.273 -0.615,2.062 -0.961,3.058 3.18,1.135 10.687,8.576 14.91,6.112 2.012,-1.172 2.867,-7.866 3.023,-11.121 0.13,-2.7 -0.245,-5.424 -1.345,-6.854 z"/><path
style="fill:#d33833;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path88"
d="m 107.535,115.876 c -0.015,-0.428 -0.033,-0.859 -0.05,-1.291 -1.766,-1.16 -4.617,-1.146 -6.555,-2.121 2.857,-0.125 5.106,-0.813 7.052,-1.783 -0.043,-1.078 -0.084,-2.155 -0.126,-3.233 -3.237,-2.216 -6.194,-5.516 -10.0052,-7.5941 -1.802,-0.9828 -8.1262,-3.5117 -10.0434,-3.0648 -1.0847,0.2519 -1.1824,1.598 -1.616,2.8668 -0.9238,2.7171 -3.0508,7.0421 -3.2363,11.1321 -0.2363,5.166 -0.7578,13.824 4.8094,12.76 4.4914,-0.857 9.7152,-2.926 13.1925,-4.826 2.125,-1.162 3.354,-2.598 6.578,-2.846"/><path
style="fill:none;stroke:#d33833;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path90"
d="m 107.535,115.876 c -0.015,-0.428 -0.033,-0.859 -0.05,-1.291 -1.766,-1.16 -4.617,-1.146 -6.555,-2.121 2.857,-0.125 5.106,-0.813 7.052,-1.783 -0.043,-1.078 -0.084,-2.155 -0.126,-3.233 -3.237,-2.216 -6.194,-5.516 -10.0052,-7.5941 -1.802,-0.9828 -8.1262,-3.5117 -10.0434,-3.0648 -1.0847,0.2519 -1.1824,1.598 -1.616,2.8668 -0.9238,2.7171 -3.0508,7.0421 -3.2363,11.1321 -0.2363,5.166 -0.7578,13.824 4.8094,12.76 4.4914,-0.857 9.7152,-2.926 13.1925,-4.826 2.125,-1.162 3.354,-2.598 6.578,-2.846 z"/><path
style="fill:#d33833;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path92"
d="m 110.75,109.712 c -0.494,2.814 -1.065,3.617 -0.844,6.072 7.505,5.004 8.914,-8.595 0.844,-6.072"/><path
style="fill:none;stroke:#d33833;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path94"
d="m 110.75,109.712 c -0.494,2.814 -1.065,3.617 -0.844,6.072 7.505,5.004 8.914,-8.595 0.844,-6.072 z"/><path
style="fill:#ef3d3a;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path96"
d="m 121.617,107.431 c 0,0 -2.334,3.334 -0.667,4.334 1.667,1 3.334,-0.001 4.334,1.666 1,1.667 0,2.667 0.333,4.667 0.333,2 2.001,2.334 3.667,2.667 1.666,0.333 6.334,1 7,-0.667 l -2,6 -4,1.333 -12.667,-7.333 -0.667,-3.667 0,-7.333"/><path
style="fill:#ef3d3a;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path98"
d="m 86.6172,96.4309 c -0.4004,5.2021 -0.8242,10.3971 -1.2957,15.5941 -0.7055,7.76 1.864,6.406 8.5906,6.406 1.0274,0 6.3259,-1.225 6.7049,-2 1.818,-3.713 -3.04,-2.888 2.094,-5.688 4.334,-2.363 11.99,1.435 10.239,6.688 -0.98,1.168 -5.106,0.364 -6.585,1.131 -2.604,1.35 -5.208,2.7 -7.8123,4.05 -3.3132,1.719 -10.9707,4.225 -14.5031,1.823 -8.9504,-6.087 0.5649,-21.296 3.7578,-27.6459"/><path
style="fill:#231f20;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path100"
d="m 95.3887,214.532 c -9.0852,2.116 -13.5996,-3.802 -16.3535,-9.94 -2.459,0.596 -1.4805,3.94 -0.8594,5.644 1.6262,4.472 8.1797,10.425 13.5344,9.618 2.3043,-0.347 5.4226,-2.454 3.6785,-5.322"/><path
style="fill:#231f20;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path102"
d="m 139.655,204.186 c 0.143,-0.006 0.288,-0.011 0.431,-0.017 2.053,-4.265 3.83,-8.783 6.42,-12.548 -1.735,-4.041 -13.138,-7.617 -12.962,-0.361 2.466,1.078 6.723,0.22 8.909,1.597 -1.264,3.469 -3.088,6.422 -2.798,11.329"/><path
style="fill:#231f20;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path104"
d="m 100.04,204.075 c 1.948,-3.571 2.582,-7.323 5.351,-10.022 1.247,-1.215 3.672,-2.696 2.47,-6.075 -0.281,-0.797 -2.334,-2.574 -3.519,-2.923 -4.329,-1.278 -14.4162,-0.264 -11.0002,5.133 3.5801,-0.167 8.3922,-2.325 11.0682,0.274 -2.055,3.285 -5.7186,9.784 -4.37,13.613"/><path
style="fill:#231f20;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path106"
d="m 138.03,167.781 c -6.518,-4.187 -13.786,-8.74 -24.466,-7.684 -2.282,1.984 -3.152,6.399 -0.935,9.315 1.154,-1.984 0.429,-5.633 3.645,-6.182 6.06,-1.037 13.113,3.707 17.472,5.365 2.703,4.557 -0.233,6.233 -2.668,9.166 -4.985,6.009 -11.672,13.457 -11.429,22.453 2.015,1.461 2.189,-2.23 2.478,-2.902 2.603,-6.092 9.154,-13.883 13.935,-19.097 1.174,-1.284 3.107,-2.516 3.322,-3.365 0.62,-2.469 -1.613,-5.427 -1.354,-7.069"/><path
style="fill:#231f20;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path108"
d="m 52.1016,172.189 c -2.043,1.166 -2.5293,6.302 -4.9278,6.448 -3.4277,0.208 -2.8027,-6.663 -2.789,-10.681 -2.3594,2.142 -2.7743,8.737 -1.041,12.124 -1.9754,0.97 -2.8575,-1.07 -3.9532,-1.789 1.4082,10.23 14.9649,4.745 12.711,-6.102"/><path
style="fill:#231f20;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path110"
d="m 142.18,163.521 c -3.034,-5.775 -7.326,-12.135 -16.229,-12.32 -0.181,1.865 -0.32,4.703 0.01,5.826 6.806,0.654 11.008,4.118 16.219,6.494"/><path
style="fill:#231f20;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path112"
d="m 99.5266,159.777 c 5.6784,-2.986 16.1144,-3.307 23.8324,-3.081 0.414,-1.691 0.404,-3.78 0.42,-5.842 -9.921,-0.495 -21.651,1.96 -24.2524,8.923"/><path
style="fill:#231f20;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path114"
d="m 98.4473,154.209 c 3.9267,-9.859 17.4227,-8.724 28.8037,-8.452 -0.501,-1.28 -1.587,-2.792 -2.937,-3.339 -3.647,-1.484 -13.706,-2.61 -18.769,0.079 -3.211,1.707 -5.274,5.564 -7.0333,7.825 -0.8496,1.092 -5.0801,3.881 -0.0644,3.887"/><path
style="fill:#81b0c4;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path116"
d="m 137.556,99.8262 c -4.608,-7.8922 -9.017,-15.9981 -14.484,-22.9594 2.292,6.7391 3.273,18.0184 3.619,26.6172 4.795,2.244 8.901,-0.505 10.865,-3.6578"/><path
style="fill:#231f20;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path118"
d="m 162.352,71.4609 c -5.159,-1.0328 -8.784,-6.0468 -13.817,-5.725 2.766,3.8993 7.613,5.543 13.817,5.725"/><path
style="fill:#231f20;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path120"
d="m 164.628,63.3871 c -4.205,-0.4441 -9.144,-1.125 -13.409,-0.7742 2.019,3.084 9.798,2.0199 13.409,0.7742"/><path
style="fill:#231f20;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path122"
d="m 166.085,56.4262 c -4.726,-0.1024 -10.6,-0.0082 -15.092,0.3687 2.657,2.8539 12.027,1.059 15.092,-0.3687"/><path
style="fill:#dcd9d8;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path124"
d="m 128.664,37.377 c 0.678,-5.9352 3.031,-11.9489 2.736,-18.4489 -2.613,-0.8812 -4.114,-1.6519 -7.615,-1.6472 -0.247,5.5242 -0.986,13.9691 -0.765,19.2351 1.722,-0.114 4.261,1.2301 5.644,0.861"/><path
style="fill:#f0d6b7;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path126"
d="m 121.045,124.849 c -2.373,-1.549 -4.394,-3.483 -6.673,-5.137 -5.054,-0.25 -7.812,0.35 -11.525,3.252 0.061,0.233 0.434,0.129 0.448,0.415 5.41,-2.411 12.287,0.982 17.75,1.47"/><path
style="fill:#81b0c4;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path128"
d="m 92.6445,87.9711 c 1.4864,6.441 7.3106,9.7769 12.5995,13.3239 5.459,-6.9282 8.779,-15.838 12.435,-24.436 -8.638,2.6039 -17.464,6.8289 -25.0345,11.1121"/><path
style="fill:#231f20;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path130"
d="m 123.02,36.516 c -0.221,-5.266 0.518,-13.7109 0.765,-19.2351 3.501,-0.0047 5.002,0.766 7.615,1.6472 0.295,6.5 -2.058,12.5137 -2.736,18.4489 -1.383,0.3691 -3.922,-0.975 -5.644,-0.861 z M 68.5059,66.4648 C 70.8145,45.2418 74.1582,27.4012 80.291,8.60781 93.9023,4.475 110.311,4.11484 122.342,7.84414 120.133,18.4512 121.098,31.3648 119.807,42.684 c -0.973,8.5078 -0.477,17.068 -1.811,25.748 -14.578,3.0328 -35.1835,0.709 -49.4901,-1.9672 z m 52.9371,1.834 c -0.123,-9.1148 0.408,-18.1058 1.104,-27.232 3.5,0.5254 5.875,0.8762 9.127,1.5891 -1.056,8.7859 -0.926,18.6722 -3.077,26.4441 -2.486,-0.0238 -4.675,0.0289 -7.154,-0.8012 z m 17.755,1.4692 c -1.661,0.3808 -3.595,0.0148 -5.182,-0.016 0.746,-7.4301 2.556,-15.629 3.193,-23.4282 2.497,-0.0777 3.831,1.1 5.885,1.4961 0.11,6.8461 -0.598,16.2781 -3.896,21.9481 z m 26.884,-24.5629 c 5.205,1.264 8.478,7.639 7.022,14.1859 -0.977,4.4 -2.717,12.6852 -4.579,15.5 -1.376,2.082 -5.107,4.8078 -8.086,2.9 -4.846,-3.1031 -13.383,-4.0039 -16.917,-7.7601 1.772,-5.9 2.322,-14.0039 3.053,-21.4797 6.054,-0.3774 13.503,1.666 18.538,-0.5024 -3.515,-1.1386 -8.076,-1.1476 -11.113,-2.807 2.482,-1.1988 8.293,-0.9566 12.082,-0.0367 z M 117.679,76.859 c -3.656,8.598 -6.976,17.5078 -12.435,24.436 C 99.9551,97.748 94.1309,94.4121 92.6445,87.9711 100.215,83.6879 109.041,79.4629 117.679,76.859 z m 9.012,26.625 c -0.346,-8.5988 -1.327,-19.8781 -3.619,-26.6172 5.467,6.9613 9.876,15.0672 14.484,22.9594 -1.964,3.1528 -6.07,5.9018 -10.865,3.6578 z m -10.216,3.63 c -2.071,0.223 -3.829,-2.381 -6.522,-1.255 -0.617,-0.682 -1.178,-1.421 -1.807,-2.087 5.948,-7.1681 8.651,-17.338 13.245,-25.7618 2.465,8.0918 2.181,16.957 2.724,25.7888 -3.387,-0.215 -5.266,3.063 -7.64,3.315 z m -6.569,8.67 c -0.221,-2.455 0.35,-3.258 0.844,-6.072 8.07,-2.523 6.661,11.076 -0.844,6.072 z m -8.949,2.938 c -3.4773,1.9 -8.7011,3.969 -13.1925,4.826 -5.5672,1.065 -5.0457,-7.594 -4.8094,-12.76 0.1855,-4.09 2.3125,-8.415 3.2363,-11.1321 0.4336,-1.2688 0.5313,-2.6149 1.616,-2.8668 1.9172,-0.4469 8.2414,2.082 10.0434,3.0648 3.8112,2.0781 6.7682,5.3781 10.0052,7.5941 0.042,1.078 0.083,2.155 0.126,3.233 -1.946,0.97 -4.195,1.658 -7.052,1.783 1.938,0.975 4.789,0.961 6.555,2.121 0.017,0.432 0.035,0.863 0.05,1.291 -3.224,0.248 -4.453,1.684 -6.578,2.846 z m -33.2136,6.033 c -2.886,-2.93 8.0945,-6.924 11.5906,-7.139 -0.0195,1.854 1.0566,3.602 0.8398,4.932 -4.1523,0.729 -9.6093,0.248 -12.4304,2.207 z m 35.5516,-1.376 c -0.014,-0.286 -0.387,-0.182 -0.448,-0.415 3.713,-2.902 6.471,-3.502 11.525,-3.252 2.279,1.654 4.3,3.588 6.673,5.137 -5.463,-0.488 -12.34,-3.881 -17.75,-1.47 z m 32.632,-9.895 c -0.156,3.255 -1.011,9.949 -3.023,11.121 -4.223,2.465 -11.73,-4.977 -14.91,-6.112 0.346,-0.996 0.917,-1.785 0.961,-3.058 1.881,0.463 4.171,0.146 5.801,-0.655 -1.885,-0.211 -3.975,-0.197 -5.222,-1.095 -0.457,-1.321 0.112,-3.121 -0.192,-4.955 4.474,-1.262 9.584,-1.934 15.24,-2.1 1.1,1.43 1.475,4.154 1.345,6.854 z m -73.0422,8.437 c -0.9063,0.646 -7.0371,8.623 -7.877,8.292 C 43.9141,125.838 33.541,118.273 24.2715,111.118 33.1094,92.1539 36.677,68.9199 37.3074,46.5262 47.4316,41.791 56.3242,34.9648 70.0625,34.252 68.4727,45.5 67.0215,55.5352 66.1191,66.125 c -3.4519,1.4551 -8.4043,-0.066 -11.6347,0.4512 -0.0274,3.8929 4.9336,1.7047 5.3468,4.3226 0.3114,1.9801 -2.7296,2.1301 -1.7394,5.2481 2.5254,-0.918 3.8516,-2.9457 6.5449,-3.7071 2.461,5.384 -0.0344,14.9102 0.3203,19.4102 0.0672,0.8449 0.4219,4.6809 2.3145,4.0078 1.675,-0.5957 -0.0957,-10.2019 0.0879,-14.4609 0.1672,-3.9239 -0.4739,-7.7207 1.1152,-10.184 13.2754,1.807 26.7656,2.975 41.1294,3.3691 -3.16,1.3559 -6.914,2.6391 -11.0298,4.959 -2.2312,1.2578 -9.2644,3.875 -9.9082,5.9942 -1.0273,3.3769 2.6953,5.1757 3.332,8.0707 -6.7011,-3.6547 -8.0085,3.5031 -9.5937,8.5741 -1.4363,4.593 -2.2539,8.024 -2.6063,10.673 -5.7726,2.752 -11.9445,5.539 -16.9132,9.068 z m 67.1792,7.327 c 9.243,4.482 10.909,-16.751 7.286,-23.591 0.56,-2.04 2.486,-2.821 3.272,-4.655 -5.158,-9.2399 -10.887,-17.8649 -16.15,-26.9961 3.915,2.4371 9.507,0.4359 14.114,2.2601 1.684,0.666 2.903,4.5211 4.178,7.6051 3.507,8.4848 7.189,19.1819 8.827,27.2789 0.37,1.845 1.378,5.865 1.152,7.507 -0.403,2.94 -4.392,5.12 -6.421,6.938 -3.738,3.358 -6.092,6.313 -9.991,9.453 -1.581,-2.334 -4.974,-3.902 -6.267,-5.8 z m -88.3179,81.968 c -4.4043,-4.846 -3.4824,-13.926 -2.9492,-20.386 7.9609,5.008 18.5273,-0.396 18.4277,-8.914 3.8008,0.101 1.4199,4.747 0.7324,7.74 -2.2468,9.776 3.7852,20.397 0.2735,29.337 -6.8184,-0.517 -12.42,-3.302 -16.4844,-7.777 z m 31.5137,28.126 c -9.9707,-2.826 -22.7493,-10.071 -26.8465,-19.028 3.1726,0.461 5.375,2.061 8.5047,2.259 1.1828,0.077 2.7324,-0.496 4.0918,-0.158 2.709,0.672 4.9953,6.746 7.039,9.006 1.9922,2.207 4.3867,3.15 6.0254,5.162 1.0528,0.508 2.6094,0.473 2.6692,2.054 -0.4563,0.488 -0.9368,0.86 -1.4836,0.705 z m 51.9032,-2.658 c -10.349,5.839 -27.8661,10.231 -38.8747,4.743 -8.8828,-4.429 -20.8899,-11.757 -24.9836,-21.043 3.8242,-8.961 -1.1328,-17.172 -1.4492,-26.27 -0.168,-4.841 2.2793,-9.067 2.4668,-14.337 -1.3086Line truncated
style="fill:#f7e4cd;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path132"
d="m 90.491,157.255 c 0.4387,0.584 2.8508,1.471 6.2258,-0.154 0,0 -4,-0.667 -3.6672,-7.336 l -1.6668,0.334 c 0,0 -1.7226,6.047 -0.8918,7.156"/><path
style="fill:#1d1919;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path134"
d="m 119.717,99.934 c 0,-1.0121 -0.821,-1.8328 -1.834,-1.8328 -1.012,0 -1.833,0.8207 -1.833,1.8328 0,1.012 0.821,1.834 1.833,1.834 1.013,0 1.834,-0.822 1.834,-1.834"/><path
style="fill:#1d1919;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path136"
d="m 121.55,91.434 c 0,-1.0121 -0.821,-1.8328 -1.834,-1.8328 -1.012,0 -1.833,0.8207 -1.833,1.8328 0,1.0121 0.821,1.834 1.833,1.834 1.013,0 1.834,-0.8219 1.834,-1.834"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

-4
View File
@@ -1,4 +0,0 @@
label-alias:
bug: 'Bug'
feature_request: 'Enhancement'
question: 'Question'
-5
View File
@@ -1,5 +0,0 @@
# Number of labels to fetch (optional). Defaults to 20
numLabels: 40
# These labels will not be used even if the issue contains them
excludeLabels:
- pinned
-17
View File
@@ -1,17 +0,0 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
-15
View File
@@ -1,15 +0,0 @@
name: conflibot
on: pull_request
jobs:
conflibot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Warn potential conflicts
uses: wktk/conflibot@v1.1.0
with:
github-token: ${{ github.token }}
exclude: |
yarn.lock
**/*.bin
-34
View File
@@ -1,34 +0,0 @@
name: Crowdin Action
on:
workflow_dispatch:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 */6 * * *'
jobs:
synchronize-with-crowdin:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3.0.1
- name: crowdin action
uses: crowdin/github-action@1.5.0
with:
upload_translations: false
download_translations: true
upload_sources: true
localization_branch_name: l10n_crowdin
create_pull_request: true
pull_request_title: 'New Crowdin translations'
pull_request_body: 'New Crowdin pull request with translations'
pull_request_labels: 'enhancement'
config: 'crowdin.yml'
crowdin_branch_name: master
download_translations_args: '--all'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
-18
View File
@@ -1,18 +0,0 @@
name: 'issue-translator'
on:
issue_comment:
types: [created]
issues:
types: [opened]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: tomsun28/issues-translate-action@v2.6
with:
IS_MODIFY_TITLE: false
# not require, default false, . Decide whether to modify the issue title
# if true, the robot account @Issues-translate-bot must have modification permissions, invite @Issues-translate-bot to your project or use your custom bot.
CUSTOM_BOT_NOTE: Bot detected the issue body's language is not English, translate it automatically. Please use English next time.
# not require. Customize the translation robot prefix message.
-31
View File
@@ -1,31 +0,0 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Maven Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
# - name: Build JsonConfiguration
# run: |
# git clone https://github.com/sandtechnology/JsonConfiguration.git
# mvn -B install --file JsonConfiguration/pom.xml
# - name: Build Integration
# run: mvn -B install --file src/integration/plotsquared/5/pom.xml
- name: Build with Maven
run: mvn -B test --file pom.xml -Pdebug
-44
View File
@@ -1,44 +0,0 @@
name: ota-distribution
on:
workflow_dispatch:
pull_request:
types:
- closed
branches:
- master
paths:
- 'crowdin/lang/**'
jobs:
build:
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
# - uses: actions/checkout@v3
# - name: Set up JDK 17
# uses: actions/setup-java@v3
# with:
# java-version: '17'
# distribution: 'temurin'
- name: Build Translations
uses: Ghost-chu/CrowdinCopyDeploy-action@master
with:
args: uploads3
env:
CROWDIN_ACCESS_TOKEN: ${{ secrets.CROWDIN_ACCESS_TOKEN }}
CROWDIN_PROJECT_BRANCH_ID: ${{ secrets.CROWDIN_BRANCH_ID }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
#DEPLOY_PATH: './deploy-prod'
AWS_S3_ENDPOINT: ${{ secrets.AWS_S3_ENDPOINT }}
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: auto
- name: Purge CloudFlare cache
uses: jakejarvis/cloudflare-purge-action@master
env:
# Zone is required by both authentication methods
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
CLOUDFLARE_EMAIL: ${{ secrets.CLOUDFLARE_EMAIL }}
+3 -12
View File
@@ -1,16 +1,7 @@
# Created by .ignore support plugin (hsz.mobi)
### Maven template
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar
### Gradle template
.gradle/
build/
### Java template
# Compiled class file
-72
View File
@@ -1,72 +0,0 @@
language: java
sudo: required
cache:
directories:
- "$HOME/.m2/repository"
jdk:
- openjdk8
install: skip
#script:
# - export PROJECT_NAME=QuickShop-Reremake #Set project name
# - git clone --depth=1 https://github.com/Ghost-chu/$PROJECT_NAME.git $PROJECT_NAME #Clone project
# - cd $PROJECT_NAME #Cd into project
# - mvn clean #Clean up
# - mvn -T 4 install #Install
after_success:
- rm -rf push # GITHUB - CLEANUP
#Script to release to Github Release
- mkdir push
- cp -r ./target/*.jar ./push/
- rm -f ./push/original-*.jar
- rm -f ./push/*-shaded.jar
- rm -f ./push/*-sources.jar
- mv -f ./push/*-javadoc.jar ./push/JavaDocument.zip
# #Script to release to Bukkit Dev
# - mkdir devbukkit
# - cp -r ./target/*.jar ./devbukkit/
# - rm -f ./devbukkit/original-*.jar
# - rm -f ./devbukkit/*-javadoc.jar
# - rm -f ./devbukkit/*-shaded.jar
# - rm -f ./devbukkit/*-sources.jar
# - rm -f ./target/original-*.jar
# - ls ./devbukkit -1 | grep ".jar$" > jarname.txt
deploy:
skip_cleanup: true
provider: releases
api_key:
secure: xsJTi70QvH4lqKDhpJvqpfBBKSlxrTxkLofeJND58ZYPFhVk4egTalBYz/fT54s4G8YQHflSUNocl+W9zn/4lpdsdI1acMhCpBz014TJOMeEuwXN7yMslGO8eUKaZUiVjhygzrCp0RKwmY3TcpcFI98lbDAsVgFegzBdQpGk3gtlF3O/PAFEcHnhkEdohNJHlBrPFIdahnM8/saYbyzSzcjGRLkIOt75yzY/+AE0pQh24yI1K6xGA2FzO9LVBmNE15HvoqQhmZ8amKMbbsOJNe9OLJYHZRmWViudtaQibZtKWLLH+S+kjJ280PA96NtqCQ4xI/bDTfgxg34VWwKh3NtuAAS1mcnLpSTIQddI2D+R2pfG5igq69qXkK/Xedgv06H9y8dHw+ygBUm5J+cooktASw3WCgwncesU5oO5G2vd/NxbcpDSm5LookdpWtxHL36dg1gafPKJI2sthileN4LfIp9cBMgIN4bDdp9CLjzayzbVeRAqFrvbCV+qW5Eub5cMun0BEZpIEcAFnugMLrkMGm5wtLkFKwhE8Qy7ZmsArGOVFjaQloTWHhrae0avqbBbJPglbWeYT0Bm4M1fqNU80e8bwPaC24yJpTN+MoUZ4cvJ7c09++4b0Q4VK5ordyqipK0/2jalclGNRZAXkDr+dQO6vBCLYZPEjShW3nY=
file:
- ./push/*
file_glob: true
on:
tags: true
overwrite: true
#after_deploy:
# #Confirm release to Bukkit Dev
# - chmod +x deploy.sh
# - "./deploy.sh $Curse_token"
# #Deploy to the mvn-repo
# - echo "Deploying to the Github..."
# - git clone --depth=1 https://$Github_token@github.com/Ghost-chu/maven-repo.git maven-repo
# - mvn deploy -DaltDeploymentRepository=mvn-repo::default::file:./maven-repo
# - cd maven-repo
# - git add .
# - git commit -m "Auto update by Travis-CI bot"
# - git push --force
# - cd ..
# - echo "Finish upload to Maven Repository"
#after_script:
# #Upload data to BinaryRepository
# - git clone --depth=1 https://$Github_token@github.com/Ghost-chu/BinaryRepository.git BinaryRepository
# - mkdir -p ./BinaryRepository/$PROJECT_NAME/$TRAVIS_BUILD_NUMBER
# - mkdir -p ./BinaryRepository/$PROJECT_NAME/$TRAVIS_BUILD_NUMBER/target
# - cp -r ./target/* ./BinaryRepository/$PROJECT_NAME/$TRAVIS_BUILD_NUMBER/target
# - echo -e "== Built by Travis-CI ==\nBuild Number [$TRAVIS_BUILD_NUMBER]\nBuild Type
# [$TRAVIS_EVENT_TYPE]\nTag [$TRAVIS_TAG]\nCommit [$TRAVIS_COMMIT] - [$TRAVIS_COMMIT_MESSAGE]"
# > ./BinaryRepository/$PROJECT_NAME/$TRAVIS_BUILD_NUMBER/BUILDINFO
# - cd BinaryRepository
# - git add .
# - git commit -m "Auto update by Bot"
# - git push --force
# - cd .. #Back root
# - echo "Finish upload to BinaryRepository"
-12
View File
@@ -1,12 +0,0 @@
{
"scanSettings": {
"baseBranches": []
},
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure",
"displayMode": "diff"
},
"issueSettings": {
"minSeverityLevel": "LOW"
}
}
Binary file not shown.
+16 -91
View File
@@ -1,104 +1,29 @@
# QuickShop-Reremake
# QuickShop-OG
**Credit to nfish2021 for their command changes. Licensed under GPLv3.
QuickShop-OG is a GPLv3-only shop plugin fork focused on keeping a non-AGPL QuickShop codebase available.
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/e33e2fafe3ac4d4eb9048d154bbd874e)](https://www.codacy.com/gh/PotatoCraft-Studio/QuickShop-Reremake/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=PotatoCraft-Studio/QuickShop-Reremake&amp;utm_campaign=Badge_Grade)
[![CodeFactor](https://www.codefactor.io/repository/github/potatocraft-studio/quickshop-reremake/badge)](https://www.codefactor.io/repository/github/potatocraft-studio/quickshop-reremake)
![BuildStatus](https://ci.codemc.io/job/PotatoCraft-Studio/job/QuickShop-Reremake/21/badge/icon)
![TestsPassed](https://img.shields.io/jenkins/tests?compact_message&jobUrl=https://ci.codemc.io/job/PotatoCraft-Studio/job/QuickShop-Reremake)
![Contributors](https://img.shields.io/github/contributors/potatocraft-studio/QuickShop-Reremake)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FPotatoCraft-Studio%2FQuickShop-Reremake.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FPotatoCraft-Studio%2FQuickShop-Reremake?ref=badge_shield)
---
This repository is named `QuickShop-OG-Alt`, because its a backup branch based on ReRemake, while the main [QuickShop-OG](https://git.trueog.net/trueog/QuickShop-OG) is based on pre-AGPL Hikari.
![Java](https://img.shields.io/badge/java-version%208%2B%20(currently%20is%208--16)-orange)
![MC](https://img.shields.io/badge/minecraft-java%20edition%201.15%2B-blueviolet)
![Ver](https://img.shields.io/spiget/version/62575?label=version)
![Downloads](https://img.shields.io/spiget/downloads/62575?label=downloads)
![Rating](https://img.shields.io/spiget/rating/62575?label=rating)
---
## Goals
QuickShop is a **FREE** shop plugin that allows players to easily sell/buy any items from a chest without any commands. In fact,
none of the commands that QuickShop provides are ever needed by a player. QuickShop-Reremake is a **FREE** fork of QuickShop
NotLikeMe with more features, bug fixes and other improvements.
QuickShop-Reremake is made by PotatoCraft Studio
from [KaiKikuchi's QuickShop upstream repository](https://github.com/KaiKikuchi/QuickShop).
- Keep the codebase GPLv3-only
- Maintain a QuickShop-OG identity instead of QuickShop-Reremake branding
- Target Purpur `1.19.4` as the primary server runtime
- Preserve broad client compatibility in mixed-version setups such as `1.8` through `1.21.11`
## Support
## Build
| <a href="https://discord.gg/bfefw2E"/> <img src="/.github/icons/Discord.svg" width="100" height="100" />| <a href="https://github.com/PotatoCraft-Studio/QuickShop-Reremake/issues"><img src="/.github/icons/Github.png" width="100" height="100" />|
| :---: | :---: |
| [**Discord**](https://discord.gg/bfefw2E) | [**Github Issues**](https://github.com/PotatoCraft-Studio/QuickShop-Reremake/issues) |
Use Java 17 and Gradle:
## Features
- Easy to use
- Toggleable Display Item on top of the chest
- NBT Data, Enchantment, Tool Damage, Potion, and Mob Egg support
- Unlimited chest support
- Blacklist support & bypass permissions
- Shops that buy and sell items at the same time (Using double chests)
- Customisable permission checks
- UUID support
- Better shop protection [Reremake]
- Item display name i18n [Reremake]
- Enchantment display name i18n [Reremake]
- A cool item preview [Reremake]
- World/region protection plugins support [Reremake]
- ProtocolLib based Virtual DisplayItem support [Reremake]
- Powerful API [Reremake]
- Optimized performance [Reremake]
## Downloads
| <a href="https://www.spigotmc.org/resources/62575/"><img src="/.github/icons/Spigot.png" width="100" height="90" /></a> | <a href="https://dev.bukkit.org/projects/quickshop-reremake"><img src="/.github/icons/Bukkit.png" width="100" height="100" /></a></a> | <a href="https://www.mcbbs.net/thread-1426607-1-1.html"><img src="/.github/icons/MCBBS.png" width="100" height="100" /></a> | <a href="https://ci.codemc.io/job/PotatoCraft-Studio/job/QuickShop-Reremake-SNAPSHOT/"><img src="/.github/icons/Jenkins.svg" width="85" height="100" /></a>
| :---: | :---: | :---: | :---: |
| **Spigot** | **BukkitDev** | **MCBBS** | **Jenkins** |
## Contribute
If you're a developer, you can contribute to the QuickShop code! Just make a fork and install the Lombok plugin,
then make a pull request when you're done! Please try to
follow [Google Java Style](https://google.github.io/styleguide/javaguide.html). Also do not increase the plugin version
number. Thank you very much!
To compile the QuickShop and debug it by yourself, please follow these steps:
0. Make sure you're using Java16 JDK in your PATH.
1. Compile main-project without signature by using debug profile: `mvn install -Pdebug`
2. Start your server with extra flag to skip the QuickShop signature
checks: `-Dorg.maxgamer.quickshop.util.envcheck.skip.SIGNATURE_VERIFY`
## Maven
```XML
<repository>
<id>quickshop-repo</id>
<url>https://repo.codemc.io/repository/maven-public/</url>
</repository>
<dependency>
<groupId>org.maxgamer</groupId>
<artifactId>QuickShop</artifactId>
<version>{VERSION}</version>
<scope>provided</scope>
</dependency>
```bash
./gradlew build
```
## Bstats
## Runtime Notes
[![BigImage](https://bstats.org/signatures/bukkit/QuickShop-Reremake.svg)](https://bstats.org/plugin/bukkit/QuickShop-Reremake/3320)
- `plugin.yml` keeps Folia support enabled because the codebase already contains region-scheduler handling
- Actual mixed-version client support depends on the proxy or protocol translation stack used by the server
## License
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FPotatoCraft-Studio%2FQuickShop-Reremake.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FPotatoCraft-Studio%2FQuickShop-Reremake?ref=badge_large)
## Developer API
```java
Plugin plugin = Bukkit.getPluginManager().getPlugin("QuickShop");
if(plugin != null){
QuickShopAPI api = (QuickShopAPI)plugin;
api.xxxx;
}
```
This project is licensed under GPLv3.
+187
View File
@@ -0,0 +1,187 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.api.tasks.bundling.AbstractArchiveTask
import org.gradle.api.tasks.compile.JavaCompile
import org.gradle.jvm.tasks.Jar
plugins {
id("java")
id("java-library")
id("com.diffplug.spotless") version "8.1.0"
id("com.gradleup.shadow") version "8.3.9"
id("checkstyle")
eclipse
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
toolchain { languageVersion.set(JavaLanguageVersion.of(17)) }
}
group = "org.maxgamer"
version = "5.1.2.5-SNAPSHOT"
val apiVersion = "1.19"
repositories {
mavenCentral()
gradlePluginPortal()
mavenLocal()
maven(url = "https://repo.purpurmc.org/snapshots")
maven(url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven(url = "https://repo.dmulloy2.net/repository/public/")
maven(url = "https://repo.codemc.io/repository/maven-public/")
maven(url = "https://oss.sonatype.org/content/groups/public/")
maven(url = "https://repo.md-5.net/content/repositories/snapshots/")
maven(url = "https://repo.md-5.net/content/repositories/releases/")
maven(url = "https://repo.extendedclip.com/content/repositories/placeholderapi/")
maven(url = "https://ci.ender.zone/plugin/repository/everything/")
maven(url = "https://jitpack.io")
maven(url = "https://mvn.intellectualsites.com/content/groups/public/")
maven(url = "https://repo.onarandombox.com/content/groups/public")
maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots/")
maven(url = "https://repo.papermc.io/repository/maven-public/")
maven(url = "https://repo.bg-software.com/repository/api/")
maven(url = "https://maven.enginehub.org/repo/")
maven(url = "https://repo.minebench.de/")
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")
compileOnly("com.griefcraft.lwc:LWCX:2.2.7")
compileOnly("com.github.TechFortress:GriefPrevention:16.18.1")
compileOnly("com.github.dmulloy2:ProtocolLib:5.0.0")
implementation("com.dumptruckman.minecraft:JsonConfiguration:1.1")
compileOnly("com.github.MilkBowl:VaultAPI:1.7.1")
compileOnly("com.github.true-og.OpenInv:openinvapi:a85e8ebc28")
compileOnly("fr.neatmonster:nocheatplus:3.17-SNAPSHOT")
compileOnly(files("lib/Clearlag-3.2.2.jar"))
compileOnly("me.clip:placeholderapi:2.11.6")
compileOnly("com.github.angeschossen:LandsAPI:6.35.0")
implementation("org.apache.commons:commons-compress:1.22")
implementation("org.apache.commons:commons-lang3:3.12.0")
compileOnly("com.github.TownyAdvanced:Towny:0.97.0.5")
compileOnly("com.sk89q.worldguard:worldguard-bukkit:7.0.9")
compileOnly("com.plotsquared:PlotSquared-Core:6.11.1") { isTransitive = false }
compileOnly(files("lib/Residence5.0.1.0.jar"))
compileOnly("com.massivecraft:Factions:1.6.9.5-U0.6.0")
compileOnly(files("lib/BlocksHub-3.2.1.jar"))
implementation("com.github.PotatoCraft-Studio:MineDown:1.7.1-modified")
compileOnly(files("lib/GemsEconomy-4.9.2.jar"))
compileOnly(files("lib/TNE-0.1.1.17-PRE-2.jar"))
implementation("commons-codec:commons-codec:1.15")
implementation("org.slf4j:slf4j-nop:1.7.32")
implementation("io.papermc:paperlib:1.0.7")
compileOnly("com.bgsoftware:SuperiorSkyblockAPI:1.11.1")
implementation("me.lucko:helper:5.6.13")
implementation("me.lucko:helper-profiles:1.2.0")
compileOnly("com.github.alex9849:advanced-region-market:3.5.4")
compileOnly(files("lib/IridiumSkyblock-3.2.3.jar"))
implementation("com.squareup.okhttp3:okhttp:4.10.0")
implementation("commons-io:commons-io:2.11.0")
implementation("org.maxgamer.storage:simplixstorage:3.2.3.3")
compileOnly("de.tr7zw:item-nbt-api-plugin:2.12.0")
compileOnly("net.tnemc:Reserve:0.1.5.4")
compileOnly("org.projectlombok:lombok:1.18.30")
annotationProcessor("org.projectlombok:lombok:1.18.30")
compileOnly("org.jetbrains:annotations:24.0.1")
}
tasks.named<ProcessResources>("processResources") {
val props = mapOf("version" to project.version.toString(), "apiVersion" to apiVersion)
inputs.properties(props)
filesMatching("plugin.yml") { expand(props) }
from("crowdin/lang") { into("crowdin/lang") }
from("LICENSE") { into("/") }
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
tasks.withType<AbstractArchiveTask>().configureEach {
isPreserveFileTimestamps = false
isReproducibleFileOrder = true
}
tasks.withType<JavaCompile>().configureEach {
options.compilerArgs.add("-parameters")
options.compilerArgs.add("-Xlint:deprecation")
options.encoding = "UTF-8"
options.isFork = true
}
spotless {
java {
eclipse().configFile("config/formatter/eclipse-java-formatter.xml")
leadingTabsToSpaces()
removeUnusedImports()
}
kotlinGradle {
ktfmt().kotlinlangStyle().configure { it.setMaxWidth(120) }
target("build.gradle.kts", "settings.gradle.kts", "eclipse.gradle.kts")
}
}
checkstyle {
toolVersion = "10.18.1"
configFile = file("config/checkstyle/checkstyle.xml")
isIgnoreFailures = true
isShowViolations = true
}
tasks.named("compileJava") { dependsOn("spotlessApply") }
tasks.named("spotlessCheck") { dependsOn("spotlessApply") }
tasks.named<Jar>("jar") { archiveClassifier.set("part") }
tasks.named<ShadowJar>("shadowJar") {
archiveClassifier.set("")
minimize()
relocate("com.google.errorprone", "org.maxgamer.quickshop.shade.com.google.errorprone")
relocate("org.checkerframework", "org.maxgamer.quickshop.shade.org.checkerframework")
relocate("org.apache.commons.lang3", "org.maxgamer.quickshop.shade.org.apache.commons.lang3")
relocate("org.objectweb.asm", "org.maxgamer.quickshop.shade.org.objectweb.asm")
relocate("org.slf4j", "org.maxgamer.quickshop.shade.org.slf4j")
relocate("net.minidev.json", "org.maxgamer.quickshop.shade.net.minidev.json.minidev.json")
relocate("com.fasterxml.jackson.core", "org.maxgamer.quickshop.shade.com.fasterxml.jackson.jackson.core")
relocate("me.lucko", "org.maxgamer.quickshop.shade.me.lucko")
relocate(
"com.dumptruckman.bukkit.configuration",
"org.maxgamer.quickshop.shade.com.dumptruckman.bukkit.configuration",
)
relocate("org.apache.commons.compress", "org.maxgamer.quickshop.shade.org.apache.commons.compress")
relocate("org.apache.commons.codec", "org.maxgamer.quickshop.shade.org.apache.commons.codec")
relocate("me.lucko.helper", "org.maxgamer.quickshop.shade.me.lucko.helper")
relocate("com.github.SparklingComet", "org.maxgamer.quickshop.shade.com.github.SparklingComet")
relocate("de.themoep", "org.maxgamer.quickshop.shade.de.themoep")
relocate("io.papermc.lib", "org.maxgamer.quickshop.shade.io.papermc.lib")
relocate("com.github.ben-manes.caffeine", "org.maxgamer.quickshop.shade.com.github.ben-manes.caffeine")
relocate("org.enginehub.squirrelid", "org.maxgamer.quickshop.shade.org.enginehub.squirrelid")
relocate("kotlin", "org.maxgamer.quickshop.shade.org.kotlin")
relocate("javax.annotation", "org.maxgamer.quickshop.shade.org.javax.annotation")
relocate("com.flowpowered.math", "org.maxgamer.quickshop.shade.com.flowpowered.math")
relocate("okio", "org.maxgamer.quickshop.shade.okio")
relocate("okhttp3", "org.maxgamer.quickshop.shade.okhttp3")
relocate("net.kyori.minecraft", "org.maxgamer.quickshop.shade.net.kyori.minecraft")
relocate("net.minidev.asm", "org.maxgamer.quickshop.shade.net.minidev.asm")
relocate("com.squareup", "org.maxgamer.quickshop.shade.org.com.squareup")
relocate("de.leonhard.storage", "org.maxgamer.quickshop.shade.de.leonhard.storage")
exclude("META-INF/*.SF")
exclude("META-INF/*.DSA")
exclude("META-INF/*.RSA")
exclude("META-INF/*.kotlin_module")
exclude("META-INF/*.txt")
exclude("META-INF/proguard/*")
exclude("META-INF/services/*")
exclude("META-INF/versions/9/*")
exclude("*License*")
exclude("*LICENSE*")
}
tasks.named("build") { dependsOn("spotlessApply", "shadowJar") }
apply(from = "eclipse.gradle.kts")
+34
View File
@@ -0,0 +1,34 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="Checker">
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
<property name="severity" value="error"/>
</module>
<module name="TreeWalker">
<module name="FinalLocalVariable"/>
<module name="AvoidStarImport"/>
<module name="Indentation">
<property name="severity" value="ignore"/>
</module>
</module>
<module name="RegexpSingleline">
<property name="format" value="\borg\.junit\.jupiter\.api\.Assertions\.fail\s*\(\s*&quot;Not yet implemented&quot;\s*\)\s*;"/>
<property name="message" value="Remove placeholder fail() and implement the test."/>
<property name="ignoreCase" value="true"/>
<property name="severity" value="warning"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="(?&lt;!\w)fail\s*\(\s*&quot;Not yet implemented&quot;\s*\)\s*;"/>
<property name="message" value="Remove placeholder fail() and implement the test."/>
<property name="severity" value="warning"/>
</module>
</module>
+404
View File
@@ -0,0 +1,404 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="23">
<profile kind="CodeFormatterProfile" name="TrueOG Network Formatting" version="23">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.align_with_spaces" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
<setting id="org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_record_components" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_logical_operator" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line" value="one_line_never"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_record_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line" value="one_line_never"/>
<setting id="org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line" value="one_line_never"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_shift_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_parameters" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_loops" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_switch_case_arrow_operator" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_enum_constant" value="49"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.text_block_indentation" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_module_statements" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line" value="one_line_never"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_permitted_types" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_annotations" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines" value="2147483647"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_not_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_arguments" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package" value="49"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_permitted_types_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_record_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.comment.javadoc_do_not_separate_block_tags" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_tag_description" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_record_constructor" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_string_concatenation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_shift_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_shift_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_additive_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case_after_arrow" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_record_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_relational_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_logical_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.keep_switch_body_block_on_one_line" value="one_line_never"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_arrow" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.keep_method_body_on_one_line" value="one_line_never"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line" value="one_line_never"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line" value="one_line_never"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_additive_operator" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_relational_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line" value="one_line_never"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_relational_operator" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.align_arrows_in_switch_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_additive_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.align_selector_in_method_invocation_on_expression_first_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_record_declaration" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_switch_case_with_arrow_on_one_line" value="one_line_never"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_colon" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type" value="49"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable" value="49"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_additive_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field" value="49"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_conditional_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.join_line_comments" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_shift_operator" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.keep_code_block_on_one_line" value="one_line_never"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_record_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_assignment_operator" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_switch_case_with_arrow" value="20"/>
<setting id="org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line" value="one_line_never"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method" value="49"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line" value="one_line_never"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assertion_message" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_logical_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_relational_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_logical_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_permitted_types" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line" value="one_line_never"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_string_concatenation" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="120"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
</profile>
</profiles>
-6
View File
@@ -1,6 +0,0 @@
project_id_env: CROWDIN_PROJECT_ID
api_token_env: CROWDIN_PERSONAL_TOKEN
preserve_hierarchy: true
files:
- source: /src/main/resources/lang/*.json
translation: /crowdin/lang/%locale%/%original_file_name%
-28
View File
@@ -1,28 +0,0 @@
#!/bin/sh
#
# This file is a part of project QuickShop, the name is deploy.sh
# Copyright (C) PotatoCraft Studio and contributors
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#
echo "Deploy jar to dev.bukkit.org"
xToken=$1
curl -X POST -H "X-Api-Token: $xToken" -F 'metadata={"changelog":"Auto upload by Jenkins CI, see update details at https://www.spigotmc.org/resources/62575/updates","gameVersions":[8503,7915,7667,7330,7105,8849,8897,9016,9189,9261,9560,9561],"releaseType":"release"}' -F "file=@./target/QuickShop.jar" -s "https://dev.bukkit.org/api/projects/320536/upload-file" >fileid.json
cat fileid.json
echo "Finished upload to dev.bukkit.org."
exit 0
+155
View File
@@ -0,0 +1,155 @@
/* This is free and unencumbered software released into the public domain */
import java.nio.file.Files
import javax.xml.parsers.DocumentBuilderFactory
import javax.xml.transform.OutputKeys
import javax.xml.transform.TransformerFactory
import javax.xml.transform.dom.DOMSource
import javax.xml.transform.stream.StreamResult
import org.gradle.api.tasks.bundling.Jar
import org.gradle.plugins.ide.eclipse.model.EclipseModel
val sourcePluginProjects =
configurations
.getByName("compileClasspath")
.allDependencies
.filterIsInstance<ProjectDependency>()
.map { it.path }
.filter { it.startsWith(":libs:") }
.distinct()
val sourcePluginProjectNames = sourcePluginProjects.map { it.substringAfterLast(":") }.toSet()
sourcePluginProjects.forEach { evaluationDependsOn(it) }
val ideLibs: Configuration by
configurations.creating {
isCanBeResolved = true
isCanBeConsumed = false
}
configure<EclipseModel> {
project { name = "${rootProject.name}-Plugin" }
classpath { plusConfigurations.add(ideLibs) }
}
val ideLibDir = layout.buildDirectory.dir("ide-libs")
val hashRegex = Regex("-[0-9a-fA-F]{10}(?=\\.jar$)") // Black magic.
val copyTasks = mutableListOf<TaskProvider<Copy>>()
sourcePluginProjects.forEach { path ->
val sub = project(path)
val archiveTaskName = if ("shadowJar" in sub.tasks.names) "shadowJar" else "jar"
val archiveTask = sub.tasks.named<Jar>(archiveTaskName)
val copyTask =
tasks.register<Copy>("ideCopy${sub.name.replaceFirstChar(Char::titlecase)}") {
dependsOn(archiveTask)
from(archiveTask.flatMap { it.archiveFile })
into(ideLibDir)
rename { it.replace(hashRegex, "") } // Remove git commit hash from jarfile.
}
copyTasks += copyTask
}
/* Ensure the jars exist before .classpath is generated */
tasks.named("eclipseClasspath").configure { dependsOn(copyTasks) }
/* Supply those jars to the ideLibs configuration (after evaluation) */
afterEvaluate { dependencies { add("ideLibs", fileTree(ideLibDir) { include("*.jar") }) } }
val injectIdeLibs =
tasks.register("injectIdeLibs") {
dependsOn("eclipse") // run after all eclipse files are generated
doLast {
val cpFile = file(".classpath")
if (!cpFile.exists()) return@doLast
val jars = fileTree(ideLibDir.get()) { include("*.jar") }.files.sortedBy { it.name }
if (jars.isEmpty()) return@doLast
// Parse DOM
val dbf = DocumentBuilderFactory.newInstance()
val doc = dbf.newDocumentBuilder().parse(cpFile)
val root = doc.documentElement
// Helper to see if an entry already exists
fun exists(path: String): Boolean =
root.getElementsByTagName("classpathentry").let { list ->
(0 until list.length).any { i ->
val n = list.item(i)
val kind = n.attributes?.getNamedItem("kind")?.nodeValue
val p = n.attributes?.getNamedItem("path")?.nodeValue
kind == "lib" && p == path
}
}
// Remove any entry that points to ide-libs dir or unresolved :libs: project refs.
val toRemove = mutableListOf<org.w3c.dom.Node>()
val list = root.getElementsByTagName("classpathentry")
val dirPath = ideLibDir.get().asFile.absolutePath
for (i in 0 until list.length) {
val n = list.item(i)
val kind = n.attributes?.getNamedItem("kind")?.nodeValue
val p = n.attributes?.getNamedItem("path")?.nodeValue ?: ""
val isIdeLibEntry = kind == "lib" && (p == dirPath || p.startsWith("$dirPath/"))
val sourceProjectPath = p.removePrefix("/")
val isHalfImportedSourceModule = kind == "src" && p.startsWith("/libs:")
val isSourcePluginModule = kind == "src" && sourceProjectPath in sourcePluginProjectNames
if (isIdeLibEntry || isHalfImportedSourceModule || isSourcePluginModule) {
toRemove += n
}
}
toRemove.forEach { root.removeChild(it) }
// Append our jar entries LAST
jars.forEach { f ->
val abs = f.absolutePath
if (!exists(abs)) {
val entry = doc.createElement("classpathentry")
entry.setAttribute("kind", "lib")
entry.setAttribute("path", abs)
root.appendChild(entry)
}
}
// Write back pretty
val tf =
TransformerFactory.newInstance().newTransformer().apply {
setOutputProperty(OutputKeys.INDENT, "yes")
setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "1")
setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no")
setOutputProperty(OutputKeys.ENCODING, "UTF-8")
}
Files.newBufferedWriter(cpFile.toPath()).use { w -> tf.transform(DOMSource(doc), StreamResult(w)) }
}
}
tasks.named("eclipse").configure { finalizedBy(injectIdeLibs) }
val eclipseModel = extensions.getByType<EclipseModel>()
fun Project.addResolvableEclipseConfigs() {
val jarAttr =
objects.named(org.gradle.api.attributes.LibraryElements::class, org.gradle.api.attributes.LibraryElements.JAR)
val apiAttr = objects.named(org.gradle.api.attributes.Usage::class, org.gradle.api.attributes.Usage.JAVA_API)
val compileOnlyRes =
configurations.create("eclipseCompileOnly") {
extendsFrom(configurations.getByName("compileOnly"))
isCanBeResolved = true
isCanBeConsumed = false
attributes.attribute(org.gradle.api.attributes.Usage.USAGE_ATTRIBUTE, apiAttr)
attributes.attribute(org.gradle.api.attributes.LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, jarAttr)
}
val compileOnlyApiRes =
configurations.create("eclipseCompileOnlyApi") {
extendsFrom(configurations.getByName("compileOnlyApi"))
isCanBeResolved = true
isCanBeConsumed = false
attributes.attribute(org.gradle.api.attributes.Usage.USAGE_ATTRIBUTE, apiAttr)
attributes.attribute(org.gradle.api.attributes.LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, jarAttr)
}
eclipseModel.classpath.plusConfigurations.addAll(listOf(compileOnlyRes, compileOnlyApiRes))
}
addResolvableEclipseConfigs()
+7
View File
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Vendored Executable
+251
View File
@@ -0,0 +1,251 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# 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
#
# https://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.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"
Vendored
+94
View File
@@ -0,0 +1,94 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:execute
@rem Setup the command line
set CLASSPATH=
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
BIN
View File
Binary file not shown.
Binary file not shown.
-899
View File
@@ -1,899 +0,0 @@
<!--
~ This file is a part of project QuickShop, the name is pom.xml
~ Copyright (C) PotatoCraft Studio and contributors
~
~ This program is free software: you can redistribute it and/or modify it
~ under the terms of the GNU General Public License as published by the
~ Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful, but WITHOUT
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
~ for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
~
-->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.maxgamer</groupId>
<artifactId>QuickShop</artifactId>
<properties>
<pluginver>5.1.2.5</pluginver>
<package>org.maxgamer.quickshop</package>
<developer>Ghost-chu</developer>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<version>${mvn.build.ver}</version>
<licenses>
<license>
<name>GPL v3 License</name>
<url>https://www.gnu.org/licenses/</url>
<distribution>repo</distribution>
</license>
</licenses>
<issueManagement>
<url>https://github.com/${developer}/${name}/issues</url>
<system>GitHub Issues</system>
</issueManagement>
<distributionManagement>
<repository>
<id>codemc-releases</id>
<url>https://repo.codemc.io/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>codemc-snapshots</id>
<url>https://repo.codemc.io/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
<profiles>
<profile>
<id>debug</id>
<properties>
<mvn.build.ver>${pluginver}-SNAPSHOT</mvn.build.ver>
<!-- Disable signature in local env, deploy phrase never will running in local env -->
<mvn.sign.phrase>deploy</mvn.sign.phrase>
</properties>
</profile>
<profile>
<id>master</id>
<properties>
<mvn.build.ver>${pluginver}-SNAPSHOT</mvn.build.ver>
<mvn.sign.phrase>install</mvn.sign.phrase>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<profile>
<id>release</id>
<properties>
<mvn.build.ver>${pluginver}</mvn.build.ver>
<mvn.sign.phrase>install</mvn.sign.phrase>
</properties>
</profile>
</profiles>
<scm>
<url>https://github.com/${developer}/${project.version}</url>
<connection>scm:git:git://github.com/${developer}/${project.version}.git</connection>
<developerConnection>scm:git:git@github.com:${developer}/${project.version}.git</developerConnection>
</scm>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<source>17</source>
<target>17</target>
<release>17</release>
<encoding>UTF-8</encoding>
<!--Use this comments args when compiler is NullPointerException-->
<!--<forceJavacCompilerUse>true</forceJavacCompilerUse>-->
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<finalName>QuickShop</finalName>
<minimizeJar>true</minimizeJar>
<createDependencyReducedPom>false</createDependencyReducedPom>
<createSourcesJar>false</createSourcesJar>
<createTestSourcesJar>false</createTestSourcesJar>
<relocations>
<relocation>
<pattern>com.google.errorprone.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.com.google.errorprone.</shadedPattern>
</relocation>
<relocation>
<pattern>org.checkerframework.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.org.checkerframework.</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.commons.lang3.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.org.apache.commons.lang3.</shadedPattern>
</relocation>
<relocation>
<pattern>org.objectweb.asm.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.org.objectweb.asm.</shadedPattern>
</relocation>
<relocation>
<pattern>org.slf4j.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.org.slf4j.slf4j.</shadedPattern>
</relocation>
<relocation>
<pattern>net.minidev.json.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.net.minidev.json.minidev.json.</shadedPattern>
</relocation>
<relocation>
<pattern>com.fasterxml.jackson.core.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.com.fasterxml.jackson.jackson.core.
</shadedPattern>
</relocation>
<relocation>
<pattern>me.lucko.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.me.lucko.</shadedPattern>
</relocation>
<relocation>
<pattern>com.rollbar.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.com.rollbar.</shadedPattern>
</relocation>
<relocation>
<pattern>com.dumptruckman.bukkit.configuration.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.com.dumptruckman.bukkit.configuration.
</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.commons.compress.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.org.apache.commons.compress.</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.commons.codec.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.org.apache.commons.codec.</shadedPattern>
</relocation>
<relocation>
<pattern>me.lucko.helper.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.me.lucko.helper.</shadedPattern>
</relocation>
<relocation>
<pattern>org.slf4j.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.org.slf4j.</shadedPattern>
</relocation>
<relocation>
<pattern>com.github.SparklingComet.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.com.github.SparklingComet.</shadedPattern>
</relocation>
<relocation>
<pattern>de.themoep.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.de.themoep.</shadedPattern>
</relocation>
<relocation>
<pattern>io.papermc.lib.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.io.papermc.lib.</shadedPattern>
</relocation>
<relocation>
<pattern>com.github.ben-manes.caffeine.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.com.github.ben-manes.caffeine.</shadedPattern>
</relocation>
<relocation>
<pattern>org.enginehub.squirrelid.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.org.enginehub.squirrelid.</shadedPattern>
</relocation>
<relocation>
<pattern>kotlin.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.org.kotlin.</shadedPattern>
</relocation>
<relocation>
<pattern>javax.annotation.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.org.javax.annotation.</shadedPattern>
</relocation>
<relocation>
<pattern>com.flowpowered.math.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.com.flowpowered.math.</shadedPattern>
</relocation>
<relocation>
<pattern>okio.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.okio.</shadedPattern>
</relocation>
<relocation>
<pattern>okhttp3.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.okhttp3.</shadedPattern>
</relocation>
<relocation>
<pattern>net.kyori.minecraft.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.net.kyori.minecraft.</shadedPattern>
</relocation>
<relocation>
<pattern>net.minidev.asm.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.net.minidev.asm.</shadedPattern>
</relocation>
<relocation>
<pattern>com.squareup.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.org.com.squareup.</shadedPattern>
</relocation>
<relocation>
<pattern>de.leonhard.storage.</pattern>
<shadedPattern>org.maxgamer.quickshop.shade.de.leonhard.storage.</shadedPattern>
</relocation>
</relocations>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.maxgamer.quickshop.javaw.bootstrap.Bootstrap</mainClass>
</transformer>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
<exclude>META-INF/*.kotlin_module</exclude>
<exclude>META-INF/*.txt</exclude>
<exclude>META-INF/proguard/*</exclude>
<exclude>META-INF/services/*</exclude>
<exclude>META-INF/versions/9/*</exclude>
<exclude>*License*</exclude>
<exclude>*LICENSE*</exclude>
</excludes>
</filter>
</filters>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.1</version>
<configuration>
<encoding>UTF-8</encoding>
<excludePackageNames>org.maxgamer.quickshop.nonquickshopstuff.*</excludePackageNames>
<!--<aggregate>true</aggregate>
<charmvnset>UTF-8</charmvnset>
<docencoding>UTF-8</docencoding>-->
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<failOnError>false</failOnError>
<additionalJOption>-Xdoclint:none</additionalJOption>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<phase>${mvn.sign.phrase}</phase>
<id>sign</id>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<archive>${project.basedir}/target/QuickShop.jar</archive>
<keystore>${project.basedir}/keystore.jks</keystore>
<alias>selfsigned</alias>
<arguments>
<argument>-signedjar</argument>
<argument>target/QuickShop-signed.jar</argument>
</arguments>
<!--suppress UnresolvedMavenProperty -->
<storepass>${env.quickshop-signer-pwd}</storepass>
<!--suppress UnresolvedMavenProperty -->
<keypass>${env.quickshop-signer-pwd}</keypass>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<targetPath>.</targetPath>
<filtering>true</filtering>
<directory>src/main/resources</directory>
<excludes>
<exclude>src/main/resources/bin</exclude>
<exclude>src/main/resources/lang</exclude>
</excludes>
</resource>
<resource>
<targetPath>bin</targetPath>
<filtering>false</filtering>
<directory>src/main/resources/bin</directory>
</resource>
<resource>
<targetPath>lang</targetPath>
<filtering>false</filtering>
<directory>src/main/resources/lang</directory>
</resource>
<resource>
<targetPath>crowdin/lang</targetPath>
<filtering>false</filtering>
<directory>crowdin/lang</directory>
</resource>
</resources>
</build>
<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<!--Disable for 503
<repository>
<id>sk89q-repo</id>
<url>https://maven.sk89q.com/repo/</url>
</repository>-->
<repository>
<id>dmulloy2-repo</id>
<url>https://repo.dmulloy2.net/repository/public/</url>
</repository>
<repository>
<id>CodeMC</id>
<url>https://repo.codemc.io/repository/maven-public/</url>
</repository>
<repository>
<id>Sonatype-public</id>
<name>SnakeYAML repository</name>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
<repository>
<id>md_5-snapshots</id>
<url>https://repo.md-5.net/content/repositories/snapshots/</url>
</repository>
<repository>
<id>md_5-releases</id>
<url>https://repo.md-5.net/content/repositories/releases/</url>
</repository>
<repository>
<id>placeholderapi</id>
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
</repository>
<repository>
<id>EnderZone</id>
<url>https://ci.ender.zone/plugin/repository/everything/</url>
</repository>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<!-- JsonConfiguration -->
<repository>
<id>onarandombox</id>
<url>https://repo.onarandombox.com/content/groups/public</url>
</repository>
<!-- for development builds -->
<repository>
<id>sonatype-oss</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
<repository>
<id>papermc</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
<repository>
<id>bg-repo</id>
<url>https://repo.bg-software.com/repository/api/</url>
</repository>
<repository>
<id>enginehub-repo</id>
<url>https://maven.enginehub.org/repo/</url>
</repository>
<!-- IridiumSkyblock -->
<!-- Temporary disable for downed website
<repository>
<id>IridiumDevelopment</id>
<url>https://nexus.iridiumdevelopment.net/repository/maven-releases/</url>
</repository>-->
<!--
<repository>
<id>Sparky</id>
<url>https://nexus.sparky.ac/repository/Sparky/</url>
</repository>-->
<repository>
<id>songoda</id>
<url>https://repo.craftaro.com/repository/public/</url>
</repository>
<!--MineDown -->
<repository>
<id>minebench-repo</id>
<url>https://repo.minebench.de/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.22</version>
</dependency>
<dependency>
<groupId>com.griefcraft.lwc</groupId>
<artifactId>LWCX</artifactId>
<version>2.2.7</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>guava</artifactId>
<groupId>com.google.guava</groupId>
</exclusion>
<exclusion>
<artifactId>jsr305</artifactId>
<groupId>com.google.code.findbugs</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.github.TechFortress</groupId>
<artifactId>GriefPrevention</artifactId>
<version>16.18.1</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>com.sk89q.worldedit</groupId>
<artifactId>worldedit-bukkit</artifactId>
</exclusion>
<exclusion>
<groupId>com.sk89q</groupId>
<artifactId>worldguard</artifactId>
</exclusion>
<exclusion>
<groupId>net.milkbowl.vault</groupId>
<artifactId>VaultAPI</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.comphenix.protocol</groupId>
<artifactId>ProtocolLib</artifactId>
<version>5.1.0</version>
<scope>provided</scope>
</dependency>
<!--JsonConfiguration Dependency Start-->
<dependency>
<groupId>com.dumptruckman.minecraft</groupId>
<artifactId>JsonConfiguration</artifactId>
<version>1.1</version>
</dependency>
<!--JsonConfiguration Dependency End-->
<dependency>
<groupId>com.github.MilkBowl</groupId>
<artifactId>VaultAPI</artifactId>
<version>1.7.1</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>guava</artifactId>
<groupId>com.google.guava</groupId>
</exclusion>
<exclusion>
<artifactId>snakeyaml</artifactId>
<groupId>org.yaml</groupId>
</exclusion>
<exclusion>
<artifactId>junit</artifactId>
<groupId>junit</groupId>
</exclusion>
<exclusion>
<artifactId>bukkit</artifactId>
<groupId>org.bukkit</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- <dependency>-->
<!-- <groupId>net.tnemc</groupId>-->
<!-- <artifactId>Reserve</artifactId>-->
<!-- <version>0.1.3.0</version>-->
<!-- <scope>provided</scope>-->
<!-- <exclusions>-->
<!-- <exclusion>-->
<!-- <groupId>com.github</groupId>-->
<!-- <artifactId>TNELib</artifactId>-->
<!-- </exclusion>-->
<!-- </exclusions>-->
<!-- </dependency>-->
<dependency>
<groupId>com.github.jikoo.OpenInv</groupId>
<artifactId>openinvapi</artifactId>
<version>4.3.1</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.30</version>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jetbrains/annotations -->
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>24.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>fr.neatmonster</groupId>
<artifactId>nocheatplus</artifactId>
<version>3.17-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>me.minebuilders</groupId>
<artifactId>clearlag</artifactId>
<version>3.2.2</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/Clearlag-3.2.2.jar</systemPath>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.clerezza.ext/org.json.simple -->
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.11.4</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>annotations</artifactId>
<groupId>org.jetbrains</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.github.angeschossen</groupId>
<artifactId>LandsAPI</artifactId>
<version>6.35.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.10.2</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.10.0</version>
<scope>test</scope>
</dependency>
<!-- Documentation of MockBukkit: https://github.com/MockBukkit/MockBukkit -->
<dependency>
<groupId>com.github.seeseemelk</groupId>
<artifactId>MockBukkit-v1.20</artifactId>
<version>3.87.0</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>spigot-api</artifactId>
<groupId>org.spigotmc</groupId>
</exclusion>
<exclusion>
<artifactId>annotations</artifactId>
<groupId>org.jetbrains</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- Database lib for testing-->
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.40.1.0</version>
<scope>test</scope>
</dependency>
<!-- Database lib for testing-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.33</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.20.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>me.vagdedes.spartan</groupId>
<artifactId>SpartanAPI</artifactId>
<version>9.1</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/SpartanAPI-9.1.jar</systemPath>
</dependency>
<!--New towny version, As we support 1.13+, so we choose 0.96.2.0 according their README-->
<dependency>
<groupId>com.github.TownyAdvanced</groupId>
<artifactId>Towny</artifactId>
<version>0.97.0.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sk89q.worldguard</groupId>
<artifactId>worldguard-bukkit</artifactId>
<version>7.0.9</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>annotations</artifactId>
<groupId>com.google.code.findbugs</groupId>
</exclusion>
<exclusion>
<artifactId>truecommons-logging</artifactId>
<groupId>net.java.truecommons</groupId>
</exclusion>
<exclusion>
<artifactId>jcl-over-slf4j</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
<exclusion>
<artifactId>bstats-bukkit</artifactId>
<groupId>org.bstats</groupId>
</exclusion>
<exclusion>
<artifactId>bukkit</artifactId>
<groupId>org.bukkit</groupId>
</exclusion>
<exclusion>
<artifactId>guava</artifactId>
<groupId>com.google.guava</groupId>
</exclusion>
<exclusion>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
<exclusion>
<artifactId>snakeyaml</artifactId>
<groupId>org.yaml</groupId>
</exclusion>
<exclusion>
<artifactId>jsr305</artifactId>
<groupId>com.google.code.findbugs</groupId>
</exclusion>
<exclusion>
<artifactId>spigot-api</artifactId>
<groupId>org.spigotmc</groupId>
</exclusion>
<exclusion>
<artifactId>httpclient</artifactId>
<groupId>org.apache.httpcomponents</groupId>
</exclusion>
<exclusion>
<artifactId>truevfs-comp-zip</artifactId>
<groupId>net.java.truevfs</groupId>
</exclusion>
<exclusion>
<artifactId>truevfs-comp-tardriver</artifactId>
<groupId>net.java.truevfs</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.plotsquared</groupId>
<artifactId>PlotSquared-Core</artifactId>
<version>6.11.1</version>
<scope>provided</scope>
<!--We just need the core jar-->
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.bekvon.bukkit.residence</groupId>
<artifactId>Residence</artifactId>
<version>5.0.1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/Residence5.0.1.0.jar</systemPath>
</dependency>
<dependency>
<groupId>com.massivecraft</groupId>
<artifactId>Factions</artifactId>
<version>1.6.9.5-U0.6.0</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
<groupId>*</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.primesoft.blockshub</groupId>
<artifactId>BlocksHub</artifactId>
<version>3.2.1</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/BlocksHub-3.2.1.jar</systemPath>
</dependency>
<dependency>
<groupId>com.rollbar</groupId>
<version>1.10.0</version>
<artifactId>rollbar-java</artifactId>
</dependency>
<dependency>
<groupId>com.github.PotatoCraft-Studio</groupId>
<artifactId>MineDown</artifactId>
<version>1.7.1-modified</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>me.xanium</groupId>
<artifactId>GemsEconomy</artifactId>
<scope>system</scope>
<version>4.9.3-GCRemake-1.6</version>
<systemPath>${project.basedir}/lib/GemsEconomy-4.9.2.jar</systemPath>
</dependency>
<dependency>
<groupId>tne.tne</groupId>
<artifactId>TheNewEconomy</artifactId>
<scope>system</scope>
<version>0.1.1.17-PRE-2</version>
<systemPath>${project.basedir}/lib/TNE-0.1.1.17-PRE-2.jar</systemPath>
</dependency>
<dependency>
<groupId>com.songoda</groupId>
<artifactId>skyblock</artifactId>
<version>2.3.30</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>MVdWPlaceholderAPI</artifactId>
<groupId>be.maximvdw</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore</artifactId>
<version>2.6.18</version>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-codec/commons-codec -->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.15</version>
<scope>compile</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-nop -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<version>1.7.32</version>
<scope>compile</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.github.simplix-softworks</groupId>-->
<!-- <artifactId>SimplixStorage</artifactId>-->
<!-- <version>3.1.9</version>-->
<!-- <scope>provided</scope>-->
<!-- </dependency>-->
<dependency>
<groupId>io.papermc</groupId>
<artifactId>paperlib</artifactId>
<version>1.0.7</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.bgsoftware</groupId>
<artifactId>SuperiorSkyblockAPI</artifactId>
<version>1.11.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>me.lucko</groupId>
<artifactId>helper</artifactId>
<version>5.6.13</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>me.lucko</groupId>
<artifactId>helper-profiles</artifactId>
<version>1.2.0</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>com.destroystokyo.paper</groupId>
<artifactId>paper-api</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.github.alex9849.arm-shopbridge</groupId>-->
<!-- <artifactId>armshopbridge</artifactId>-->
<!-- <version>1.2.5</version>-->
<!-- <scope>provided</scope>-->
<!-- </dependency>-->
<dependency>
<groupId>com.github.alex9849</groupId>
<artifactId>advanced-region-market</artifactId>
<version>3.5.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.iridium</groupId>
<artifactId>IridiumSkyblock</artifactId>
<version>3.2.3</version>
<systemPath>${project.basedir}/lib/IridiumSkyblock-3.2.3.jar</systemPath>
<scope>system</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.10.0</version>
<scope>compile</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.maxgamer.storage</groupId>
<artifactId>simplixstorage</artifactId>
<version>3.2.3.3</version>
</dependency>
<dependency>
<groupId>de.tr7zw</groupId>
<artifactId>item-nbt-api-plugin</artifactId>
<version>2.12.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.tnemc</groupId>
<artifactId>Reserve</artifactId>
<version>0.1.5.4</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
+1
View File
@@ -0,0 +1 @@
rootProject.name = "QuickShop-OG"
@@ -29,7 +29,8 @@ import java.util.Arrays;
import java.util.logging.Logger;
/**
* BootError class contains print errors on /qs command when plugin failed launched.
* BootError class contains print errors on /qs command when plugin failed
* launched.
*
* @author Ghost_chu
*/
@@ -40,29 +41,42 @@ public class BootError {
private final String[] errors;
public BootError(@NotNull Logger logger, @NotNull String... errors) {
this.errors = errors;
for (String err : errors) {
logger.severe(err);
}
}
/**
* Print the errors. ##################################################### QuickShop is disabled,
* Please fix errors and restart ..........................
* Print the errors. #####################################################
* QuickShop is disabled, Please fix errors and restart
* ..........................
* #################################################### This one.
*
* @param sender The sender you want output the errors.
*/
public void printErrors(CommandSender sender) { //Do not use any method that not in CraftBukkit
public void printErrors(CommandSender sender) { // Do not use any method that not in CraftBukkit
sender.sendMessage(ChatColor.RED + "#####################################################");
sender.sendMessage(ChatColor.RED + " QuickShop is disabled, Please fix any errors and restart");
for (String issue : errors) {
sender.sendMessage(ChatColor.WHITE + "- " + ChatColor.YELLOW + issue);
}
sender.sendMessage(ChatColor.RED + "#####################################################");
}
public String[] getErrors() {
return Arrays.copyOf(errors, errors.length);
}
}
@@ -29,12 +29,14 @@ import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
/**
* BuildInfo is utilities to help read BUILDINFO file that generated by CodeMC Jenkins.
* BuildInfo is utilities to help read BUILDINFO file that generated by CodeMC
* Jenkins.
*
* @author Ghost_chu
*/
@Data
public class BuildInfo {
private final int buildId;
private final String buildTag;
private final String buildUrl;
@@ -50,7 +52,9 @@ public class BuildInfo {
private static final String UNKNOWN = "Unknown";
public BuildInfo(@Nullable InputStream inputStream) {
if (inputStream == null) {
buildId = 0;
buildTag = UNKNOWN;
buildUrl = UNKNOWN;
@@ -62,8 +66,11 @@ public class BuildInfo {
pomBuildNumber = UNKNOWN;
jobUrl = null;
return;
}
YamlConfiguration buildInfo = YamlConfiguration.loadConfiguration(new InputStreamReader(inputStream, StandardCharsets.UTF_8));
YamlConfiguration buildInfo = YamlConfiguration
.loadConfiguration(new InputStreamReader(inputStream, StandardCharsets.UTF_8));
buildId = buildInfo.getInt("build-id", 0);
buildTag = buildInfo.getString("build-tag", "Unknown");
buildUrl = buildInfo.getString("build-url", "Unknown");
@@ -75,8 +82,13 @@ public class BuildInfo {
jobName = buildInfo.getString("job-name", "Unknown");
pomBuildNumber = buildInfo.getString("pom-buildnumber", "1");
try {
inputStream.close();
} catch (IOException ignored) {
}
}
}
@@ -32,10 +32,10 @@ public class BuiltInSolution {
* @return The error reason.
*/
public static BootError databaseError() {
return new BootError(QuickShop.getInstance().getLogger(),
"Error connecting to the database!",
"Please make sure your database service is running.",
"and check the configuration in your config.yml");
return new BootError(QuickShop.getInstance().getLogger(), "Error connecting to the database!",
"Please make sure your database service is running.", "and check the configuration in your config.yml");
}
/**
@@ -44,26 +44,32 @@ public class BuiltInSolution {
* @return The error reason.
*/
public static BootError econError() {
// Check if Vault is installed
if (QuickShop.getInstance().getServer().getPluginManager().getPlugin("Vault") == null) {
// Vault is not installed
return new BootError(QuickShop.getInstance().getLogger(),
"Vault is not installed or loaded!",
return new BootError(QuickShop.getInstance().getLogger(), "Vault is not installed or loaded!",
"Please make sure Vault is installed.");
}
// Vault is installed
if (QuickShop.getInstance().getServer().getPluginManager().getPlugin("CMI") != null) {
// Found possible incompatible plugin
return new BootError(QuickShop.getInstance().getLogger(),
"No Economy plugin detected! Please make sure that you have a compatible economy",
"plugin installed that is hooked into Vault and loads before QuickShop.",
ChatColor.YELLOW + "Incompatibility detected: CMI Installed",
"The use of the CMI Edition of Vault might fix this.");
}
return new BootError(QuickShop.getInstance().getLogger(),
"No Economy plugin detected! Please make sure that you have a",
"compatible economy plugin installed to get Vault working.");
}
}
+45 -12
View File
@@ -31,27 +31,28 @@ import java.lang.ref.WeakReference;
import java.util.concurrent.TimeUnit;
/**
* Cache is a utilities to quick access shops on large network with Caffeine Cache Library
* Cache is a utilities to quick access shops on large network with Caffeine
* Cache Library
*
* @author Ghost_chu
*/
public class Cache {
private final QuickShop plugin;
private final com.google.common.cache.Cache<Location, BoxedShop> accessCaching = CacheBuilder
.newBuilder()
.initialCapacity(5000)
.expireAfterAccess(120, TimeUnit.MINUTES)
.recordStats()
.build();
private final com.google.common.cache.Cache<Location, BoxedShop> accessCaching = CacheBuilder.newBuilder()
.initialCapacity(5000).expireAfterAccess(120, TimeUnit.MINUTES).recordStats().build();
public Cache(QuickShop plugin) {
this.plugin = plugin;
}
public @NotNull CacheStats getStats() {
return accessCaching.stats();
}
return accessCaching.stats();
}
/**
* Gets shop from plugin caching
@@ -62,21 +63,32 @@ public class Cache {
*/
@Nullable
public Shop find(@NotNull Location location, boolean attached) {
BoxedShop boxedShop = accessCaching.getIfPresent(location);
//Cache is invalid, generated a new one
// Cache is invalid, generated a new one
if (boxedShop == null || !boxedShop.isValid()) {
Shop shop;
if (attached) {
shop = ((SimpleShopManager) plugin.getShopManager()).findShopIncludeAttached(location, false);
} else {
shop = plugin.getShopManager().getShop(location);
}
setCache(location, shop);
return shop;
} else {
//Cache is valid
// Cache is valid
return boxedShop.getShop();
}
}
/**
@@ -86,39 +98,60 @@ public class Cache {
* @param shop null for invalidate and Shop object for update
*/
public void setCache(@NotNull Location location, @Nullable Shop shop) {
accessCaching.put(location, new BoxedShop(shop));
}
public void invalidate(@NotNull Location location) {
accessCaching.invalidate(location);
}
private static class BoxedShop {
@Nullable
private final WeakReference<Shop> shopWeakRef;
public BoxedShop(Shop shop) {
if (shop != null) {
this.shopWeakRef = new WeakReference<>(shop);
} else {
shopWeakRef = null;
}
}
@Nullable
public Shop getShop() {
return shopWeakRef == null ? null : shopWeakRef.get();
}
public boolean isValid() {
if (shopWeakRef != null) {
Shop shop = shopWeakRef.get();
if (shop != null) {
return shop.isValid();
}
}
return false;
}
}
}
@@ -1,795 +0,0 @@
/*
* This file is a part of project QuickShop, the name is Metrics.java
* Copyright (C) PotatoCraft Studio and contributors
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package org.maxgamer.quickshop;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
import io.papermc.paper.threadedregions.scheduler.AsyncScheduler;
import io.papermc.paper.threadedregions.scheduler.ScheduledTask;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.ServicePriority;
import org.maxgamer.quickshop.util.JsonUtil;
import javax.net.ssl.HttpsURLConnection;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.Callable;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import java.util.logging.Level;
import java.util.zip.GZIPOutputStream;
/**
* bStats collects some data for plugin authors.
*
* <p>Check out https://bStats.org/ to learn more about bStats!
*/
@SuppressWarnings({"WeakerAccess"})
public class Metrics {
// The version of this bStats class
public static final int B_STATS_VERSION = 1;
// The url to which the data is sent
private static final String URL = "https://bStats.org/submitData/bukkit";
// Should failed requests be logged?
private static boolean logFailedRequests;
// Should the sent data be logged?
private static boolean logSentData;
// Should the response text be logged?
private static boolean logResponseStatusText;
// The uuid of the server
private static String serverUUID;
static {
// You can use the property to disable the check in your test environment
if (System.getProperty("bstats.relocatecheck") == null
|| !"false".equals(System.getProperty("bstats.relocatecheck"))) {
// Maven's Relocate is clever and changes strings, too. So we have to use this little "trick"
// ... :D
final String defaultPackage =
new String(
new byte[]{
'o', 'r', 'g', '.', 'b', 's', 't', 'a', 't', 's', '.', 'b', 'u', 'k', 'k', 'i', 't'
});
final String examplePackage =
new String(new byte[]{'y', 'o', 'u', 'r', '.', 'p', 'a', 'c', 'k', 'a', 'g', 'e'});
// We want to make sure nobody just copy & pastes the example and use the wrong package names
if (Metrics.class.getPackage().getName().equals(defaultPackage)
|| Metrics.class.getPackage().getName().equals(examplePackage)) {
throw new IllegalStateException("bStats Metrics class has not been relocated correctly!");
}
}
}
// The plugin
private final Plugin plugin;
// The plugin id
private final int pluginId;
// A list with all custom charts
private final List<CustomChart> charts = new ArrayList<>();
// Is bStats enabled on this server?
private final boolean enabled;
private QuickShop quickShop;
/**
* Class constructor.
*
* @param plugin The plugin which stats should be submitted.
* @param pluginId The id of the plugin. It can be found at <a
* href="https://bstats.org/what-is-my-plugin-id">What is my plugin id?</a>
*/
public Metrics(Plugin plugin, int pluginId) {
if (plugin == null) {
throw new IllegalArgumentException("Plugin cannot be null!");
}
this.plugin = plugin;
this.pluginId = pluginId;
// Get the config file
File bStatsFolder = new File(plugin.getDataFolder().getParentFile(), "bStats");
File configFile = new File(bStatsFolder, "config.yml");
YamlConfiguration config = YamlConfiguration.loadConfiguration(configFile);
// Check if the config file exists
if (!config.isSet("serverUuid")) {
// Add default values
config.addDefault("enabled", true);
// Every server gets it's unique random id.
config.addDefault("serverUuid", UUID.randomUUID().toString());
// Should failed request be logged?
config.addDefault("logFailedRequests", false);
// Should the sent data be logged?
config.addDefault("logSentData", false);
// Should the response text be logged?
config.addDefault("logResponseStatusText", false);
// Inform the server owners about bStats
config
.options()
.header(
"bStats collects some data for plugin authors like how many servers are using their plugins.\n"
+ "To honor their work, you should not disable it.\n"
+ "This has nearly no effect on the server performance!\n"
+ "Check out https://bStats.org/ to learn more :)")
.copyDefaults(true);
try {
config.save(configFile);
} catch (IOException ignored) {
}
}
// Load the data
enabled = config.getBoolean("enabled", true);
serverUUID = config.getString("serverUuid");
logFailedRequests = config.getBoolean("logFailedRequests", false);
logSentData = config.getBoolean("logSentData", false);
logResponseStatusText = config.getBoolean("logResponseStatusText", false);
if (enabled) {
boolean found = false;
// Search for all other bStats Metrics classes to see if we are the first one
for (Class<?> service : plugin.getServer().getServicesManager().getKnownServices()) {
try {
service.getField("B_STATS_VERSION"); // Our identifier :)
found = true; // We aren't the first
break;
} catch (NoSuchFieldException ignored) {
}
}
// Register our service
plugin.getServer().getServicesManager().register(Metrics.class, this, plugin, ServicePriority.Normal);
if (!found) {
// We are the first!
startSubmitting();
}
}
}
/**
* Sends the data to the bStats server.
*
* @param plugin Any plugin. It's just used to get a logger instance.
* @param data The data to send.
* @throws IllegalAccessException If the method called from main thread
* @throws IOException If the request failed.
*/
private static void sendData(Plugin plugin, JsonObject data) throws IllegalAccessException, IOException {
if (data == null) {
throw new IllegalArgumentException("Data cannot be null!");
}
if (plugin.getServer().isPrimaryThread()) {
throw new IllegalAccessException("This method must not be called from the main thread!");
}
if (logSentData) {
plugin.getLogger().info("Sending data to bStats: " + data);
}
HttpsURLConnection connection = (HttpsURLConnection) new URL(URL).openConnection();
// Compress the data to save bandwidth
byte[] compressedData = compress(data.toString());
// Add headers
connection.setRequestMethod("POST");
connection.addRequestProperty("Accept", "application/json");
connection.addRequestProperty("Connection", "close");
connection.addRequestProperty("Content-Encoding", "gzip"); // We gzip our request
connection.addRequestProperty("Content-Length", String.valueOf(compressedData.length));
connection.setRequestProperty(
"Content-Type", "application/json"); // We send our data in JSON format
connection.setRequestProperty("User-Agent", "MC-Server/" + B_STATS_VERSION);
// Send data
connection.setDoOutput(true);
try (DataOutputStream outputStream = new DataOutputStream(connection.getOutputStream())) {
outputStream.write(compressedData);
}
StringBuilder builder = new StringBuilder();
try (BufferedReader bufferedReader =
new BufferedReader(new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
String line;
while ((line = bufferedReader.readLine()) != null) {
builder.append(line);
}
}
if (logResponseStatusText) {
plugin.getLogger().info("Sent data to bStats and received response: " + builder);
}
}
/**
* Gzips the given String.
*
* @param str The string to gzip.
* @return The gzipped String.
* @throws IOException If the compression failed.
*/
private static byte[] compress(final String str) throws IOException {
if (str == null) {
return null;
}
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
try (GZIPOutputStream gzip = new GZIPOutputStream(outputStream)) {
gzip.write(str.getBytes(StandardCharsets.UTF_8));
}
return outputStream.toByteArray();
}
// This ThreadFactory enforces the naming convention for our Threads
private final ThreadFactory threadFactory = task -> new Thread(task, "bStats-Metrics");
// Executor service for requests
// We use an executor service because the Bukkit scheduler is affected by server lags
//private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1, threadFactory);
/**
* Starts the Scheduler which submits our data every 30 minutes.
*/
private void startSubmitting() {
final Consumer<ScheduledTask> submitTask = task -> {
if (!plugin.isEnabled()) { // Plugin was disabled
task.cancel();
return;
}
// Nevertheless we want our code to run in the Bukkit main thread, so we have to use the Bukkit scheduler
// Don't be afraid! The connection to the bStats server is still async, only the stats collection is sync ;)
// global region is the closest thing we have to a main thread
plugin.getServer().getGlobalRegionScheduler().run(plugin, t -> submitData());
};
// Many servers tend to restart at a fixed time at xx:00 which causes an uneven distribution of requests on the
// bStats backend. To circumvent this problem, we introduce some randomness into the initial and second delay.
// WARNING: You must not modify and part of this Metrics class, including the submit delay or frequency!
// WARNING: Modifying this code will get your plugin banned on bStats. Just don't do it!
long initialDelay = (long) (1000 * 60 * (3 + Math.random() * 3));
long secondDelay = (long) (1000 * 60 * (Math.random() * 30));
AsyncScheduler scheduler = plugin.getServer().getAsyncScheduler();
scheduler.runDelayed(plugin, submitTask, initialDelay, TimeUnit.MILLISECONDS);
scheduler.runAtFixedRate(plugin, submitTask, initialDelay + secondDelay, 1000 * 60 * 30, TimeUnit.MILLISECONDS);
}
/**
* Collects the data and sends it afterwards.
*/
private void submitData() {
final JsonObject data = getServerData();
JsonArray pluginData = new JsonArray();
// Search for all other bStats Metrics classes to get their plugin data
for (Class<?> service : plugin.getServer().getServicesManager().getKnownServices()) {
try {
service.getField("B_STATS_VERSION"); // Our identifier :)
for (RegisteredServiceProvider<?> provider :
plugin.getServer().getServicesManager().getRegistrations(service)) {
try {
Object plugin =
provider.getService().getMethod("getPluginData").invoke(provider.getProvider());
if (plugin instanceof JsonObject) {
pluginData.add((JsonObject) plugin);
} else { // old bstats version compatibility
try {
Class<?> jsonObjectJsonSimple = Class.forName("org.json.simple.JSONObject");
if (plugin.getClass().isAssignableFrom(jsonObjectJsonSimple)) {
Method jsonStringGetter = jsonObjectJsonSimple.getDeclaredMethod("toJSONString");
jsonStringGetter.setAccessible(true);
String jsonString = (String) jsonStringGetter.invoke(plugin);
JsonObject object = JsonUtil.readObject(jsonString).getAsJsonObject();
pluginData.add(object);
}
} catch (ClassNotFoundException e) {
// minecraft version 1.14+
if (logFailedRequests) {
this.plugin.getLogger().log(Level.SEVERE, "Encountered unexpected exception", e);
}
}
}
} catch (NullPointerException
| NoSuchMethodException
| IllegalAccessException
| InvocationTargetException ignored) {
}
}
} catch (NoSuchFieldException ignored) {
}
}
data.add("plugins", pluginData);
// Create a new thread for the connection to the bStats server
plugin.getServer().getAsyncScheduler().runNow(plugin, task -> {
try {
// Send the data
sendData(plugin, data);
} catch (Exception e) {
// Something went wrong! :(
if (logFailedRequests) {
plugin.getLogger().log(Level.WARNING, "Could not submit plugin stats of " + plugin.getName(), e);
}
}
});
}
/**
* Gets the server specific data.
*
* @return The server specific data.
*/
private JsonObject getServerData() {
// Minecraft specific data
int playerAmount;
try {
// Around MC 1.8 the return type was changed to a collection from an array,
// This fixes java.lang.NoSuchMethodError:
// org.bukkit.Bukkit.getOnlinePlayers()Ljava/util/Collection;
Method onlinePlayersMethod = Class.forName("org.bukkit.Server").getMethod("getOnlinePlayers");
playerAmount =
onlinePlayersMethod.getReturnType().equals(Collection.class)
? ((Collection<?>) onlinePlayersMethod.invoke(plugin.getServer())).size()
: ((Player[]) onlinePlayersMethod.invoke(plugin.getServer())).length;
} catch (Exception e) {
playerAmount = plugin.getServer().getOnlinePlayers().size(); // Just use the new method if the Reflection failed
}
int onlineMode = plugin.getServer().getOnlineMode() ? 1 : 0;
String bukkitVersion = plugin.getServer().getVersion();
String bukkitName = plugin.getServer().getName();
// OS/Java specific data
String javaVersion = System.getProperty("java.version");
String osName = System.getProperty("os.name");
String osArch = System.getProperty("os.arch");
String osVersion = System.getProperty("os.version");
int coreCount = Runtime.getRuntime().availableProcessors();
JsonObject data = new JsonObject();
data.addProperty("serverUUID", serverUUID);
data.addProperty("playerAmount", playerAmount);
data.addProperty("onlineMode", onlineMode);
data.addProperty("bukkitVersion", bukkitVersion);
data.addProperty("bukkitName", bukkitName);
data.addProperty("javaVersion", javaVersion);
data.addProperty("osName", osName);
data.addProperty("osArch", osArch);
data.addProperty("osVersion", osVersion);
data.addProperty("coreCount", coreCount);
return data;
}
/**
* Checks if bStats is enabled.
*
* @return Whether bStats is enabled or not.
*/
public boolean isEnabled() {
return enabled;
}
/**
* Adds a custom chart.
*
* @param chart The chart to add.
*/
public void addCustomChart(CustomChart chart) {
if (chart == null) {
throw new IllegalArgumentException("Chart cannot be null!");
}
charts.add(chart);
}
/**
* Gets the plugin specific data. This method is called using Reflection.
*
* @return The plugin specific data.
*/
public JsonObject getPluginData() {
JsonObject data = new JsonObject();
String pluginName = "QuickShop-" + QuickShop.getFork();
String pluginVersion = plugin.getDescription().getVersion();
data.addProperty("pluginName", pluginName); // Append the name of the plugin
data.addProperty("id", pluginId); // Append the id of the plugin
data.addProperty("pluginVersion", pluginVersion); // Append the version of the plugin
JsonArray customCharts = new JsonArray();
for (CustomChart customChart : charts) {
// Add the data of the custom charts
JsonObject chart = customChart.getRequestJsonObject();
if (chart == null) { // If the chart is null, we skip it
continue;
}
customCharts.add(chart);
}
data.add("customCharts", customCharts);
return data;
}
/**
* Represents a custom chart.
*/
public abstract static class CustomChart {
// The id of the chart
protected final String chartId;
/**
* Class constructor.
*
* @param chartId The id of the chart.
*/
CustomChart(String chartId) {
if (chartId == null || chartId.isEmpty()) {
throw new IllegalArgumentException("ChartId cannot be null or empty!");
}
this.chartId = chartId;
}
private JsonObject getRequestJsonObject() {
JsonObject chart = new JsonObject();
chart.addProperty("chartId", chartId);
try {
JsonObject data = getChartData();
if (data == null) {
// If the data is null we don't send the chart.
return null;
}
chart.add("data", data);
} catch (Exception t) {
if (logFailedRequests) {
QuickShop.getInstance().getLogger()
.log(Level.WARNING, "Failed to get data for custom chart with id " + chartId, t);
}
return null;
}
return chart;
}
protected abstract JsonObject getChartData() throws Exception;
}
/**
* Represents a custom simple pie.
*/
public static class SimplePie extends CustomChart {
private final Callable<String> callable;
/**
* Class constructor.
*
* @param chartId The id of the chart.
* @param callable The callable which is used to request the chart data.
*/
public SimplePie(String chartId, Callable<String> callable) {
super(chartId);
this.callable = callable;
}
@Override
protected JsonObject getChartData() throws Exception {
JsonObject data = new JsonObject();
String value = callable.call();
if (value == null || value.isEmpty()) {
// Null = skip the chart
return null;
}
data.addProperty("value", value);
return data;
}
}
/**
* Represents a custom advanced pie.
*/
public static class AdvancedPie extends CustomChart {
private final Callable<Map<String, Integer>> callable;
/**
* Class constructor.
*
* @param chartId The id of the chart.
* @param callable The callable which is used to request the chart data.
*/
public AdvancedPie(String chartId, Callable<Map<String, Integer>> callable) {
super(chartId);
this.callable = callable;
}
@Override
protected JsonObject getChartData() throws Exception {
JsonObject data = new JsonObject();
JsonObject values = new JsonObject();
Map<String, Integer> map = callable.call();
if (map == null || map.isEmpty()) {
// Null = skip the chart
return null;
}
boolean allSkipped = true;
for (Map.Entry<String, Integer> entry : map.entrySet()) {
if (entry.getValue() == 0) {
continue; // Skip this invalid
}
allSkipped = false;
values.addProperty(entry.getKey(), entry.getValue());
}
if (allSkipped) {
// Null = skip the chart
return null;
}
data.add("values", values);
return data;
}
}
/**
* Represents a custom drilldown pie.
*/
public static class DrilldownPie extends CustomChart {
private final Callable<Map<String, Map<String, Integer>>> callable;
/**
* Class constructor.
*
* @param chartId The id of the chart.
* @param callable The callable which is used to request the chart data.
*/
public DrilldownPie(String chartId, Callable<Map<String, Map<String, Integer>>> callable) {
super(chartId);
this.callable = callable;
}
@Override
public JsonObject getChartData() throws Exception {
JsonObject data = new JsonObject();
JsonObject values = new JsonObject();
Map<String, Map<String, Integer>> map = callable.call();
if (map == null || map.isEmpty()) {
// Null = skip the chart
return null;
}
boolean reallyAllSkipped = true;
for (Map.Entry<String, Map<String, Integer>> entryValues : map.entrySet()) {
JsonObject value = new JsonObject();
boolean allSkipped = true;
for (Map.Entry<String, Integer> valueEntry : map.get(entryValues.getKey()).entrySet()) {
value.addProperty(valueEntry.getKey(), valueEntry.getValue());
allSkipped = false;
}
if (!allSkipped) {
reallyAllSkipped = false;
values.add(entryValues.getKey(), value);
}
}
if (reallyAllSkipped) {
// Null = skip the chart
return null;
}
data.add("values", values);
return data;
}
}
/**
* Represents a custom single line chart.
*/
public static class SingleLineChart extends CustomChart {
private final Callable<Integer> callable;
/**
* Class constructor.
*
* @param chartId The id of the chart.
* @param callable The callable which is used to request the chart data.
*/
public SingleLineChart(String chartId, Callable<Integer> callable) {
super(chartId);
this.callable = callable;
}
@Override
protected JsonObject getChartData() throws Exception {
JsonObject data = new JsonObject();
int value = callable.call();
if (value == 0) {
// Null = skip the chart
return null;
}
data.addProperty("value", value);
return data;
}
}
/**
* Represents a custom multi line chart.
*/
public static class MultiLineChart extends CustomChart {
private final Callable<Map<String, Integer>> callable;
/**
* Class constructor.
*
* @param chartId The id of the chart.
* @param callable The callable which is used to request the chart data.
*/
public MultiLineChart(String chartId, Callable<Map<String, Integer>> callable) {
super(chartId);
this.callable = callable;
}
@Override
protected JsonObject getChartData() throws Exception {
JsonObject data = new JsonObject();
JsonObject values = new JsonObject();
Map<String, Integer> map = callable.call();
if (map == null || map.isEmpty()) {
// Null = skip the chart
return null;
}
boolean allSkipped = true;
for (Map.Entry<String, Integer> entry : map.entrySet()) {
if (entry.getValue() == 0) {
continue; // Skip this invalid
}
allSkipped = false;
values.addProperty(entry.getKey(), entry.getValue());
}
if (allSkipped) {
// Null = skip the chart
return null;
}
data.add("values", values);
return data;
}
}
/**
* Represents a custom simple bar chart.
*/
public static class SimpleBarChart extends CustomChart {
private final Callable<Map<String, Integer>> callable;
/**
* Class constructor.
*
* @param chartId The id of the chart.
* @param callable The callable which is used to request the chart data.
*/
public SimpleBarChart(String chartId, Callable<Map<String, Integer>> callable) {
super(chartId);
this.callable = callable;
}
@Override
protected JsonObject getChartData() throws Exception {
JsonObject data = new JsonObject();
JsonObject values = new JsonObject();
Map<String, Integer> map = callable.call();
if (map == null || map.isEmpty()) {
// Null = skip the chart
return null;
}
for (Map.Entry<String, Integer> entry : map.entrySet()) {
JsonArray categoryValues = new JsonArray();
categoryValues.add(new JsonPrimitive(entry.getValue()));
values.add(entry.getKey(), categoryValues);
}
data.add("values", values);
return data;
}
}
/**
* Represents a custom advanced bar chart.
*/
public static class AdvancedBarChart extends CustomChart {
private final Callable<Map<String, int[]>> callable;
/**
* Class constructor.
*
* @param chartId The id of the chart.
* @param callable The callable which is used to request the chart data.
*/
public AdvancedBarChart(String chartId, Callable<Map<String, int[]>> callable) {
super(chartId);
this.callable = callable;
}
@Override
protected JsonObject getChartData() throws Exception {
JsonObject data = new JsonObject();
JsonObject values = new JsonObject();
Map<String, int[]> map = callable.call();
if (map == null || map.isEmpty()) {
// Null = skip the chart
return null;
}
boolean allSkipped = true;
for (Map.Entry<String, int[]> entry : map.entrySet()) {
if (entry.getValue().length == 0) {
continue; // Skip this invalid
}
allSkipped = false;
JsonArray categoryValues = new JsonArray();
for (int categoryValue : entry.getValue()) {
categoryValues.add(new JsonPrimitive(categoryValue));
}
values.add(entry.getKey(), categoryValues);
}
if (allSkipped) {
// Null = skip the chart
return null;
}
data.add("values", values);
return data;
}
}
}
File diff suppressed because it is too large. Load diff
@@ -29,49 +29,80 @@ import org.maxgamer.quickshop.database.AbstractDatabaseCore;
import org.maxgamer.quickshop.localization.game.game.GameLanguage;
/**
* ServiceInjector used for "Replaceable Modules" features that allow 3rd party QuickShop addon
* replace some modules used in QuickShop internal by register as service.
* ServiceInjector used for "Replaceable Modules" features that allow 3rd party
* QuickShop addon replace some modules used in QuickShop internal by register
* as service.
*
* @author Ghost_chu
*/
public class ServiceInjector {
public static @NotNull AbstractEconomy getEconomy(@NotNull AbstractEconomy def) {
@Nullable RegisteredServiceProvider<? extends AbstractEconomy> registeredServiceProvider =
Bukkit.getServicesManager().getRegistration(AbstractEconomy.class);
@Nullable
RegisteredServiceProvider<? extends AbstractEconomy> registeredServiceProvider = Bukkit.getServicesManager()
.getRegistration(AbstractEconomy.class);
if (registeredServiceProvider == null) {
return def;
} else {
return registeredServiceProvider.getProvider();
}
}
public static @NotNull ItemMatcher getItemMatcher(@NotNull ItemMatcher def) {
@Nullable RegisteredServiceProvider<? extends ItemMatcher> registeredServiceProvider =
Bukkit.getServicesManager().getRegistration(ItemMatcher.class);
@Nullable
RegisteredServiceProvider<? extends ItemMatcher> registeredServiceProvider = Bukkit.getServicesManager()
.getRegistration(ItemMatcher.class);
if (registeredServiceProvider == null) {
return def;
} else {
return registeredServiceProvider.getProvider();
}
}
public static @Nullable GameLanguage getGameLanguage() {
@Nullable RegisteredServiceProvider<? extends GameLanguage> registeredServiceProvider =
Bukkit.getServicesManager().getRegistration(GameLanguage.class);
@Nullable
RegisteredServiceProvider<? extends GameLanguage> registeredServiceProvider = Bukkit.getServicesManager()
.getRegistration(GameLanguage.class);
if (registeredServiceProvider == null) {
return null;
} else {
return registeredServiceProvider.getProvider();
}
}
public static @NotNull AbstractDatabaseCore getDatabaseCore(@NotNull AbstractDatabaseCore def) {
@Nullable RegisteredServiceProvider<? extends AbstractDatabaseCore> registeredServiceProvider =
Bukkit.getServicesManager().getRegistration(AbstractDatabaseCore.class);
@Nullable
RegisteredServiceProvider<? extends AbstractDatabaseCore> registeredServiceProvider = Bukkit
.getServicesManager().getRegistration(AbstractDatabaseCore.class);
if (registeredServiceProvider == null) {
return def;
} else {
return registeredServiceProvider.getProvider();
}
}
}
@@ -33,6 +33,7 @@ import java.util.Map;
* The unique entry point to allow you to access most features of QuickShop
*/
public interface QuickShopAPI {
/**
* Getting Compatibility Manager (usually used for anti-cheat)
*
@@ -62,8 +63,7 @@ public interface QuickShopAPI {
boolean isDisplayEnabled();
/**
* Getting shop limit system status
* false if limit system is disabled
* Getting shop limit system status false if limit system is disabled
*
* @return Limit enabled
*/
@@ -84,7 +84,8 @@ public interface QuickShopAPI {
DatabaseHelper getDatabaseHelper();
/**
* Getting text manager that allow addon to create a user language locale based message
* Getting text manager that allow addon to create a user language locale based
* message
*
* @return The text maanger
*/
@@ -105,7 +106,8 @@ public interface QuickShopAPI {
boolean isPriceChangeRequiresFee();
/**
* Getting command manager that allow addon direct access QuickShop sub-command system
* Getting command manager that allow addon direct access QuickShop sub-command
* system
*
* @return The command manager
*/
@@ -3,13 +3,19 @@ package org.maxgamer.quickshop.api.chat;
import net.md_5.bungee.api.chat.BaseComponent;
public class ComponentPackage {
private final BaseComponent[] components;
public ComponentPackage(BaseComponent... components) {
this.components = components;
}
public BaseComponent[] getComponents() {
return components;
}
}
@@ -32,6 +32,7 @@ import java.util.Map;
* QuickChat is a system to allow us to process complex messages
*/
public interface QuickChat {
/**
* Send plain text to specified receiver
*
@@ -55,10 +56,7 @@ public interface QuickChat {
* @param text The text will sent
* @param itemStack The ItemStack will append to text in message
*/
void sendItemHologramChat(
@NotNull Player player,
@NotNull String text,
@NotNull ItemStack itemStack);
void sendItemHologramChat(@NotNull Player player, @NotNull String text, @NotNull ItemStack itemStack);
/**
* Generate the chat component with preview item hover event
@@ -69,7 +67,9 @@ public interface QuickChat {
* @param message The message with hover event
* @return The component
*/
@NotNull QuickComponent getItemHologramChat(@NotNull Shop shop, @NotNull ItemStack itemStack, @NotNull Player player, @NotNull String message);
@NotNull
QuickComponent getItemHologramChat(@NotNull Shop shop, @NotNull ItemStack itemStack, @NotNull Player player,
@NotNull String message);
/**
* Create chat with hover-item to specified receiver
@@ -79,16 +79,19 @@ public interface QuickChat {
* @param itemStack The ItemStack will append to text in message
* @return The QuickComponent created by this method
*/
@NotNull QuickComponent getItemTextComponent(@NotNull Player player, @NotNull ItemStack itemStack, @NotNull String text);
@NotNull
QuickComponent getItemTextComponent(@NotNull Player player, @NotNull ItemStack itemStack, @NotNull String text);
/**
* Send click-run-command chat to specified receiver
*
* @param receiver The PLAYER will receive this message
* @param message The text will sent
* @param textToCommandMapping The hover text associated with command, will be applied to placeholder (like {0} {1} {2}...)
* @param textToCommandMapping The hover text associated with command, will be
* applied to placeholder (like {0} {1} {2}...)
*/
void sendExecutableChat(@NotNull CommandSender receiver, @NotNull String message, Map.Entry<String, String>... textToCommandMapping);
void sendExecutableChat(@NotNull CommandSender receiver, @NotNull String message,
Map.Entry<String, String>... textToCommandMapping);
/**
* Send click-run-command chat to specified receiver
@@ -98,7 +101,8 @@ public interface QuickChat {
* @param hoverText The hover text will show when hover on chat
* @param command The command when click to be run
*/
void sendExecutableChat(@NotNull CommandSender receiver, @NotNull String message, @NotNull String hoverText, @NotNull String command);
void sendExecutableChat(@NotNull CommandSender receiver, @NotNull String message, @NotNull String hoverText,
@NotNull String command);
/**
* Send click-suggest-command chat to specified receiver
@@ -108,6 +112,7 @@ public interface QuickChat {
* @param command The command when click to be suggested
* @param hoverText The text while player hover on the text
*/
void sendSuggestedChat(@NotNull CommandSender receiver, @NotNull String message, @NotNull String hoverText, @NotNull String command);
void sendSuggestedChat(@NotNull CommandSender receiver, @NotNull String message, @NotNull String hoverText,
@NotNull String command);
}
@@ -25,12 +25,14 @@ import org.jetbrains.annotations.NotNull;
* Pack the MineDown
*/
public interface QuickComponent {
/**
* Gets QuickComponent object (BungeeChatComponent or AdventureChatComponent)
*
* @return The component
*/
@NotNull Object get();
@NotNull
Object get();
/**
* Sets QuickComponent object (BungeeChatComponent or AdventureChatComponent)
@@ -38,4 +40,5 @@ public interface QuickComponent {
* @param component The component
*/
void set(@NotNull Object component);
}
@@ -36,13 +36,15 @@ import java.util.function.Supplier;
@Data
@Builder
public class CommandContainer {
@NotNull
private CommandHandler<?> executor;
private boolean hidden; // Hide from help, tabcomplete
/*
E.g you can use the command when having quickshop.removeall.self or quickshop.removeall.others permission
*/
* E.g you can use the command when having quickshop.removeall.self or
* quickshop.removeall.others permission
*/
@Singular
private List<String> selectivePermissions;
@Singular
@@ -52,44 +54,71 @@ public class CommandContainer {
@Nullable
private String description; // Will show in the /qs help
private boolean disabled; //Set command is disabled or not.
private boolean disabled; // Set command is disabled or not.
@Nullable
private Supplier<Boolean> disabledSupplier; //Set command is disabled or not.
private Supplier<Boolean> disabledSupplier; // Set command is disabled or not.
@Nullable
private String disablePlaceholder; //Set the text shown if command disabled
private String disablePlaceholder; // Set the text shown if command disabled
@Nullable
private Function<@Nullable CommandSender, @NotNull String> disableCallback; //Set the callback that should return a text to shown
private Function<@Nullable CommandSender, @NotNull String> disableCallback; // Set the callback that should return a
// text to shown
private Class<?> executorType;
@NotNull
public Class<?> getExecutorType() {
if (executorType == null) {
bakeExecutorType();
}
return executorType;
}
public void bakeExecutorType() {
for (Method declaredMethod : getExecutor().getClass().getMethods()) {
if ("onCommand".equals(declaredMethod.getName()) || "onTabComplete".equals(declaredMethod.getName())) {
if (declaredMethod.getParameterCount() != 3 || declaredMethod.isSynthetic() || declaredMethod.isBridge()) {
if (declaredMethod.getParameterCount() != 3 || declaredMethod.isSynthetic()
|| declaredMethod.isBridge())
{
continue;
}
executorType = declaredMethod.getParameterTypes()[0];
return;
}
}
executorType = Object.class;
}
public final @NotNull String getDisableText(@NotNull CommandSender sender) {
if (this.getDisableCallback() != null) {
return this.getDisableCallback().apply(sender);
} else if (StringUtils.isNotEmpty(this.getDisablePlaceholder())) {
return this.getDisablePlaceholder();
} else {
return QuickShop.getInstance().text().of(sender, "command.feature-not-enabled").forLocale();
}
}
}
@@ -29,13 +29,16 @@ import java.util.List;
/**
* The command handler that processing sub commands under QS main command
*
* @param <T> The required sender class you want, must is the sub type of CommandSender
* @param <T> The required sender class you want, must is the sub type of
* CommandSender
*/
public interface CommandHandler<T extends CommandSender> {
/**
* Calling while command executed by specified sender
*
* @param sender The command sender but will automatically convert to specified instance
* @param sender The command sender but will automatically convert to
* specified instance
* @param commandLabel The command prefix (/qs = qs, /shop = shop)
* @param cmdArg The arguments (/qs create stone will receive stone)
*/
@@ -44,13 +47,17 @@ public interface CommandHandler<T extends CommandSender> {
/**
* Calling while sender trying to tab-complete
*
* @param sender The command sender but will automatically convert to specified instance
* @param sender The command sender but will automatically convert to
* specified instance
* @param commandLabel The command prefix (/qs = qs, /shop = shop)
* @param cmdArg The arguments (/qs create stone [TAB] will receive stone)
* @return Candidate list
*/
@Nullable
default List<String> onTabComplete(@NotNull T sender, @NotNull String commandLabel, @NotNull String[] cmdArg) {
return Collections.emptyList();
}
}
@@ -27,12 +27,14 @@ import org.jetbrains.annotations.Nullable;
import java.util.List;
/**
* The manager that managing all sub-commands that registered
* Also performing permission checks in there.
* The manager that managing all sub-commands that registered Also performing
* permission checks in there.
*/
public interface CommandManager {
/**
* This is a interface to allow addons to register the subcommand into quickshop command manager.
* This is a interface to allow addons to register the subcommand into quickshop
* command manager.
*
* @param container The command container to register
* @throws IllegalStateException Will throw the error if register conflict.
@@ -40,7 +42,8 @@ public interface CommandManager {
void registerCmd(@NotNull CommandContainer container);
/**
* This is a interface to allow addons to unregister the registered/butil-in subcommand from command manager.
* This is a interface to allow addons to unregister the registered/butil-in
* subcommand from command manager.
*
* @param container The command container to unregister
*/
@@ -51,17 +54,14 @@ public interface CommandManager {
*
* @return All registered commands.
*/
@NotNull List<CommandContainer> getRegisteredCommands();
@NotNull
List<CommandContainer> getRegisteredCommands();
boolean onCommand(
@NotNull CommandSender sender,
@NotNull Command command,
@NotNull String commandLabel,
boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String commandLabel,
@NotNull String[] cmdArg);
@Nullable List<String> onTabComplete(
@NotNull CommandSender sender,
@NotNull Command command,
@NotNull String commandLabel,
@Nullable
List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String commandLabel,
@NotNull String[] cmdArg);
}
@@ -35,9 +35,12 @@ public interface CommandProcesser extends CommandHandler<CommandSender> {
@Override
@Nullable
default List<String> onTabComplete(
@NotNull CommandSender sender, @NotNull String commandLabel, @NotNull String[] cmdArg) {
default List<String> onTabComplete(@NotNull CommandSender sender, @NotNull String commandLabel,
@NotNull String[] cmdArg)
{
return Collections.emptyList();
}
}
@@ -25,12 +25,18 @@ import org.maxgamer.quickshop.QuickShop;
import org.maxgamer.quickshop.util.holder.QuickShopInstanceHolder;
public abstract class AbstractQSCompatibilityModule extends QuickShopInstanceHolder implements CompatibilityModule {
public AbstractQSCompatibilityModule(QuickShop plugin) {
super(plugin);
}
@Override
public @NotNull Plugin getPlugin() {
return plugin;
}
}
@@ -26,6 +26,7 @@ import org.jetbrains.annotations.NotNull;
* Manager that managing all registered compatibility for anti-cheat modules
*/
public interface CompatibilityManager {
/**
* Check a module registered
*
@@ -35,10 +36,12 @@ public interface CompatibilityManager {
boolean isRegistered(String moduleName);
/**
* Switch the compatibility mode on or off, set false to disable all we known incompatiable plugin
* listener, set true to enable back all disabled plugin liseners. WIP
* Switch the compatibility mode on or off, set false to disable all we known
* incompatiable plugin listener, set true to enable back all disabled plugin
* liseners. WIP
*
* @param status true=turn on closed listeners, false=turn off all turned on listeners.
* @param status true=turn on closed listeners, false=turn off all turned on
* listeners.
* @param player The player to check the listeners
*/
void toggleProtectionListeners(boolean status, @NotNull Player player);
@@ -68,4 +71,5 @@ public interface CompatibilityManager {
* @param module Compatibility module
*/
void unregister(@NotNull CompatibilityModule module);
}
@@ -24,12 +24,14 @@ import org.bukkit.plugin.Plugin;
import org.jetbrains.annotations.NotNull;
public interface CompatibilityModule {
/**
* Gets the CompatibilityModule provider name
*
* @return Provider name
*/
@NotNull String getName();
@NotNull
String getName();
/***
* Call on registering module
@@ -50,13 +52,16 @@ public interface CompatibilityModule {
*
* @return Provider Plugin instance
*/
@NotNull Plugin getPlugin();
@NotNull
Plugin getPlugin();
/**
* Calls CompatibilityModule to toggle the detection status for player between on and off
* Calls CompatibilityModule to toggle the detection status for player between
* on and off
*
* @param player The player
* @param status On or Off
*/
void toggle(@NotNull Player player, boolean status);
}
@@ -30,6 +30,7 @@ import java.util.UUID;
import java.util.function.Consumer;
public interface DatabaseHelper {
/**
* Creates a column with specific name and data type
*
@@ -48,7 +49,8 @@ public interface DatabaseHelper {
void cleanMessage(long weekAgo);
/**
* Purge and clean all saved transaction message in data that should send to specific player
* Purge and clean all saved transaction message in data that should send to
* specific player
*
* @param player The player
*/
@@ -113,7 +115,6 @@ public interface DatabaseHelper {
*/
void saveOfflineTransactionMessage(@NotNull UUID player, @NotNull String message, long time);
/**
* Upgrade legacy name based data record to uniqueId based record
*
@@ -126,8 +127,7 @@ public interface DatabaseHelper {
void updateOwner2UUID(@NotNull String ownerUUID, int x, int y, int z, @NotNull String worldName);
/**
* Update external cache data
* (Used for Web UI or other something like that)
* Update external cache data (Used for Web UI or other something like that)
*
* @param shop The shop
* @param space The shop remaining space
@@ -152,9 +152,9 @@ public interface DatabaseHelper {
* @param disableDisplay Shop display disabled status
* @param taxAccount Shop specific tax account
*/
void updateShop(@NotNull String owner, @NotNull ItemStack item, int unlimited, int shopType,
double price, int x, int y, int z, @NotNull String world, @NotNull String extra,
@Nullable String currency, boolean disableDisplay, @Nullable String taxAccount);
void updateShop(@NotNull String owner, @NotNull ItemStack item, int unlimited, int shopType, double price, int x,
int y, int z, @NotNull String world, @NotNull String extra, @Nullable String currency,
boolean disableDisplay, @Nullable String taxAccount);
/**
* Insert a history record into logs table
@@ -23,8 +23,10 @@ import java.sql.ResultSet;
import java.sql.SQLException;
public interface WarpedResultSet extends AutoCloseable {
@Override
void close() throws SQLException;
ResultSet getResultSet();
}
@@ -35,6 +35,7 @@ import java.util.UUID;
public abstract class AbstractEconomy implements EconomyCore, Reloadable {
public AbstractEconomy() {
}
/**
@@ -43,15 +44,17 @@ public abstract class AbstractEconomy implements EconomyCore, Reloadable {
* @return Economy type that QuickShop now using
*/
public static EconomyType getNowUsing() {
return EconomyType.fromID(QuickShop.getInstance().getConfig().getInt("economy-type"));
}
@Override
public abstract String toString();
/**
* Transfer specific amount of currency from A to B
* (Developer: This is low layer of Economy System, use EconomyTransaction if possible)
* Transfer specific amount of currency from A to B (Developer: This is low
* layer of Economy System, use EconomyTransaction if possible)
*
* @param from The player who is paying money
* @param to The player who is receiving money
@@ -61,26 +64,44 @@ public abstract class AbstractEconomy implements EconomyCore, Reloadable {
* @return successed
*/
@Override
public boolean transfer(@NotNull UUID from, @NotNull UUID to, double amount, @NotNull World world, @Nullable String currency) {
public boolean transfer(@NotNull UUID from, @NotNull UUID to, double amount, @NotNull World world,
@Nullable String currency)
{
if (!isValid()) {
return false;
}
if (this.getBalance(from, world, currency) >= amount) {
if (this.withdraw(from, amount, world, currency)) {
if (this.deposit(to, amount, world, currency)) {
this.deposit(from, amount, world, currency);
return false;
}
return true;
}
return false;
}
return false;
}
@Override
public @NotNull String getName() {
return "BuiltIn-Economy Processor";
}
/**
@@ -90,6 +111,9 @@ public abstract class AbstractEconomy implements EconomyCore, Reloadable {
*/
@Override
public ReloadResult reloadModule() {
return ReloadResult.builder().status(ReloadStatus.SUCCESS).build();
}
}
@@ -31,6 +31,7 @@ import java.util.UUID;
* @author netherfoam Represents an economy.
*/
public interface EconomyCore {
/**
* Deposits a given amount of money from thin air to the given username.
*
@@ -54,7 +55,8 @@ public interface EconomyCore {
boolean deposit(@NotNull OfflinePlayer trader, double amount, @NotNull World world, @Nullable String currency);
/**
* Formats the given number... E.g. 50.5 becomes $50.5 Dollars, or 50 Dollars 5 Cents
* Formats the given number... E.g. 50.5 becomes $50.5 Dollars, or 50 Dollars 5
* Cents
*
* @param balance The given number
* @param currency The currency name
@@ -91,12 +93,15 @@ public interface EconomyCore {
* @param amount The amount to transfer
* @param currency The currency name
* @param world The transaction world
* @return true if success (Payer had enough cash, receiver was able to receive the funds)
* @return true if success (Payer had enough cash, receiver was able to receive
* the funds)
*/
boolean transfer(@NotNull UUID from, @NotNull UUID to, double amount, @NotNull World world, @Nullable String currency);
boolean transfer(@NotNull UUID from, @NotNull UUID to, double amount, @NotNull World world,
@Nullable String currency);
/**
* Withdraws a given amount of money from the given username and turns it to thin air.
* Withdraws a given amount of money from the given username and turns it to
* thin air.
*
* @param name The exact (case insensitive) username to take money from
* @param amount The amount to take from them
@@ -107,7 +112,8 @@ public interface EconomyCore {
boolean withdraw(@NotNull UUID name, double amount, @NotNull World world, @Nullable String currency);
/**
* Withdraws a given amount of money from the given username and turns it to thin air.
* Withdraws a given amount of money from the given username and turns it to
* thin air.
*
* @param trader The player to take money from
* @param amount The amount to take from them
@@ -135,12 +141,12 @@ public interface EconomyCore {
/**
* Gets the economy processor last error message
*
* @return Error message or null if never happens
*/
@Nullable
String getLastError();
/**
* Checks that this economy is valid. Returns false if it is not valid.
*
@@ -153,13 +159,15 @@ public interface EconomyCore {
*
* @return Impl name
*/
@NotNull String getName();
@NotNull
String getName();
/**
* Getting Economy impl owned by
*
* @return Owned by
*/
@NotNull Plugin getPlugin();
@NotNull
Plugin getPlugin();
}
@@ -38,6 +38,7 @@ import java.util.UUID;
@Getter
public class EconomyTransaction {
@Nullable
private final UUID from;
@Nullable
@@ -60,12 +61,11 @@ public class EconomyTransaction {
@JsonUtil.Hidden
private final QuickShop plugin = QuickShop.getInstance();
@Getter
private TransactionSteps steps; //For rollback
private TransactionSteps steps; // For rollback
@Nullable
@Getter
private String lastError = null;
/**
* Create a transaction
*
@@ -79,7 +79,11 @@ public class EconomyTransaction {
*/
@Builder
public EconomyTransaction(@Nullable UUID from, @Nullable UUID to, double amount, double taxModifier, @Nullable Trader taxAccount, EconomyCore core, boolean allowLoan, @NotNull World world, @Nullable String currency) {
public EconomyTransaction(@Nullable UUID from, @Nullable UUID to, double amount, double taxModifier,
@Nullable Trader taxAccount, EconomyCore core, boolean allowLoan, @NotNull World world,
@Nullable String currency)
{
this.from = from;
this.to = to;
this.core = core == null ? QuickShop.getInstance().getEconomy() : core;
@@ -90,47 +94,75 @@ public class EconomyTransaction {
this.world = world;
this.currency = currency;
if (Double.doubleToLongBits(taxModifier) != Double.doubleToLongBits(0.0d)) { //Calc total money and apply tax
if (Double.doubleToLongBits(taxModifier) != Double.doubleToLongBits(0.0d)) { // Calc total money and apply tax
this.actualAmount = CalculateUtil.multiply(CalculateUtil.subtract(1, taxModifier), amount);
} else {
this.actualAmount = amount;
}
this.tax = CalculateUtil.subtract(amount, actualAmount); //Calc total tax
this.tax = CalculateUtil.subtract(amount, actualAmount); // Calc total tax
if (from == null && to == null) {
lastError = "From and To cannot be null in same time.";
throw new IllegalArgumentException("From and To cannot be null in same time.");
}
//For passing Test
//noinspection ConstantConditions
// For passing Test
// noinspection ConstantConditions
if (QuickShop.getInstance() != null) {
this.tryingFixBalanceInsufficient = QuickShop.getInstance().getConfig().getBoolean("trying-fix-banlance-insuffient");
this.tryingFixBalanceInsufficient = QuickShop.getInstance().getConfig()
.getBoolean("trying-fix-banlance-insuffient");
} else {
this.tryingFixBalanceInsufficient = false;
}
if (tryingFixBalanceInsufficient) {
//Fetch some stupid plugin caching
// Fetch some stupid plugin caching
if (from != null) {
this.core.getBalance(from, world, currency);
}
if (to != null) {
this.core.getBalance(to, world, currency);
}
}
}
/**
* Commit the transaction by the Fail-Safe way
* Automatic rollback when commit failed
* Commit the transaction by the Fail-Safe way Automatic rollback when commit
* failed
*
* @return The transaction success.
*/
public boolean failSafeCommit() {
Util.debugLog("Transaction begin: FailSafe Commit --> " + from + " => " + to + "; Amount: " + amount + ", EconomyCore: " + core.getName());
Util.debugLog("Transaction begin: FailSafe Commit --> " + from + " => " + to + "; Amount: " + amount
+ ", EconomyCore: " + core.getName());
boolean result = commit();
if (!result) {
rollback(true);
}
return result;
}
/**
@@ -139,20 +171,33 @@ public class EconomyTransaction {
* @return The transaction success.
*/
public boolean commit() {
return this.commit(new TransactionCallback() {
@Override
public void onSuccess(@NotNull EconomyTransaction economyTransaction) {
if (tryingFixBalanceInsufficient) {
//Fetch some stupid plugin caching
// Fetch some stupid plugin caching
if (from != null) {
core.getBalance(from, world, currency);
}
if (to != null) {
core.getBalance(to, world, currency);
}
}
}
});
}
/**
@@ -162,95 +207,129 @@ public class EconomyTransaction {
* @return The transaction success.
*/
public boolean commit(@NotNull TransactionCallback callback) {
Util.debugLog("Transaction begin: Regular Commit --> " + from + " => " + to + "; Amount: " + amount + " Total(include tax): " + actualAmount + " Tax: " + tax + ", EconomyCore: " + core.getName());
Util.debugLog("Transaction begin: Regular Commit --> " + from + " => " + to + "; Amount: " + amount
+ " Total(include tax): " + actualAmount + " Tax: " + tax + ", EconomyCore: " + core.getName());
steps = TransactionSteps.CHECK;
if (!callback.onCommit(this)) {
this.lastError = "Plugin cancelled this transaction.";
return false;
}
if (from != null && core.getBalance(from, world, currency) < amount && !allowLoan) {
this.lastError = "From hadn't enough money";
callback.onFailed(this);
return false;
}
steps = TransactionSteps.WITHDRAW;
if (from != null && !core.withdraw(from, amount, world, currency)) {
this.lastError = "Failed to withdraw " + amount + " from player " + from + " account. LastError: " + core.getLastError();
this.lastError = "Failed to withdraw " + amount + " from player " + from + " account. LastError: "
+ core.getLastError();
callback.onFailed(this);
return false;
}
steps = TransactionSteps.DEPOSIT;
if (to != null && !core.deposit(to, actualAmount, world, currency)) {
this.lastError = "Failed to deposit " + actualAmount + " to player " + to + " account. LastError: " + core.getLastError();
this.lastError = "Failed to deposit " + actualAmount + " to player " + to + " account. LastError: "
+ core.getLastError();
callback.onFailed(this);
return false;
}
steps = TransactionSteps.TAX;
if (tax > 0 && taxer != null && !core.deposit(taxer, tax, world, currency)) {
this.lastError = "Failed to deposit tax account: " + tax + ". LastError: " + core.getLastError();
callback.onTaxFailed(this);
//Tax never should failed.
// Tax never should failed.
}
steps = TransactionSteps.DONE;
callback.onSuccess(this);
return true;
}
/**
* Rolling back the transaction
*
* @param continueWhenFailed Continue when some parts of the rollback fails.
* @return A list contains all steps executed. If "continueWhenFailed" is false, it only contains all success steps before hit the error. Else all.
* @return A list contains all steps executed. If "continueWhenFailed" is false,
* it only contains all success steps before hit the error. Else all.
*/
@SuppressWarnings("UnusedReturnValue")
@NotNull
public List<RollbackSteps> rollback(boolean continueWhenFailed) {
List<RollbackSteps> rollbackSteps = new ArrayList<>(3);
if (steps == TransactionSteps.CHECK) {
return rollbackSteps; //We did nothing, just checks balance
return rollbackSteps; // We did nothing, just checks balance
}
if (steps == TransactionSteps.WITHDRAW) {
return rollbackSteps; //We did nothing, because the trade failed so no anybody money changes.
return rollbackSteps; // We did nothing, because the trade failed so no anybody money changes.
}
if (steps == TransactionSteps.DEPOSIT || steps == TransactionSteps.TAX) {
if (from != null && !core.deposit(from, amount, world, currency)) { //Rollback withdraw
if (from != null && !core.deposit(from, amount, world, currency)) { // Rollback withdraw
if (!continueWhenFailed) {
rollbackSteps.add(RollbackSteps.ROLLBACK_WITHDRAW);
return rollbackSteps;
}
}
}
if (steps == TransactionSteps.TAX) {
if (to != null && !core.withdraw(to, actualAmount, world, currency)) { //Rollback deposit
if (to != null && !core.withdraw(to, actualAmount, world, currency)) { // Rollback deposit
if (!continueWhenFailed) {
rollbackSteps.add(RollbackSteps.ROLLBACK_DEPOSIT);
return rollbackSteps;
}
}
}
rollbackSteps.add(RollbackSteps.ROLLBACK_DONE);
return rollbackSteps;
}
private enum RollbackSteps {
ROLLBACK_WITHDRAW,
ROLLBACK_DEPOSIT,
ROLLBACK_TAX,
ROLLBACK_DONE
ROLLBACK_WITHDRAW, ROLLBACK_DEPOSIT, ROLLBACK_TAX, ROLLBACK_DONE
}
public enum TransactionSteps {
WAIT,
CHECK,
WITHDRAW,
DEPOSIT,
TAX,
DONE
WAIT, CHECK, WITHDRAW, DEPOSIT, TAX, DONE
}
public interface TransactionCallback {
/**
* Calling while Transaction commit
*
@@ -258,7 +337,9 @@ public class EconomyTransaction {
* @return Does commit event has been cancelled
*/
default boolean onCommit(@NotNull EconomyTransaction economyTransaction) {
return !Util.fireCancellableEvent(new EconomyCommitEvent(economyTransaction));
}
/**
@@ -267,32 +348,51 @@ public class EconomyTransaction {
* @param economyTransaction Transaction
*/
default void onSuccess(@NotNull EconomyTransaction economyTransaction) {
Util.debugLog("Transaction succeed.");
QuickShop.getInstance().logEvent(new EconomyTransactionLog(true, economyTransaction.getFrom(), economyTransaction.getTo(), economyTransaction.getCurrency(), economyTransaction.getTax(), economyTransaction.getTaxer() == null ? Util.getNilUniqueId() : economyTransaction.getTaxer().getUniqueId(), economyTransaction.getAmount(), economyTransaction.getLastError()));
QuickShop.getInstance()
.logEvent(new EconomyTransactionLog(true, economyTransaction.getFrom(), economyTransaction.getTo(),
economyTransaction.getCurrency(), economyTransaction.getTax(),
economyTransaction.getTaxer() == null ? Util.getNilUniqueId()
: economyTransaction.getTaxer().getUniqueId(),
economyTransaction.getAmount(), economyTransaction.getLastError()));
}
/**
* Calling while Transaction commit failed
* Use EconomyTransaction#getLastError() to getting reason
* Use EconomyTransaction#getSteps() to getting the fail step
* Calling while Transaction commit failed Use EconomyTransaction#getLastError()
* to getting reason Use EconomyTransaction#getSteps() to getting the fail step
*
* @param economyTransaction Transaction
*/
default void onFailed(@NotNull EconomyTransaction economyTransaction) {
Util.debugLog("Transaction failed: " + economyTransaction.getLastError() + ".");
QuickShop.getInstance().logEvent(new EconomyTransactionLog(false, economyTransaction.getFrom(), economyTransaction.getTo(), economyTransaction.getCurrency(), economyTransaction.getTax(), economyTransaction.getTaxer() == null ? Util.getNilUniqueId() : economyTransaction.getTaxer().getUniqueId(), economyTransaction.getAmount(), economyTransaction.getLastError()));
QuickShop.getInstance()
.logEvent(new EconomyTransactionLog(false, economyTransaction.getFrom(), economyTransaction.getTo(),
economyTransaction.getCurrency(), economyTransaction.getTax(),
economyTransaction.getTaxer() == null ? Util.getNilUniqueId()
: economyTransaction.getTaxer().getUniqueId(),
economyTransaction.getAmount(), economyTransaction.getLastError()));
}
/**
* Calling while Tax processing failed
* Use EconomyTransaction#getLastError() to getting reason
* Use EconomyTransaction#getSteps() to getting the fail step
* Calling while Tax processing failed Use EconomyTransaction#getLastError() to
* getting reason Use EconomyTransaction#getSteps() to getting the fail step
*
* @param economyTransaction Transaction
*/
default void onTaxFailed(@NotNull EconomyTransaction economyTransaction) {
Util.debugLog("Tax Transaction failed: " + economyTransaction.getLastError() + ".");
QuickShop.getInstance().logEvent(new EconomyTransactionLog(false, economyTransaction.getFrom(), economyTransaction.getTo(), economyTransaction.getCurrency(), economyTransaction.getTax(), economyTransaction.getTaxer() == null ? Util.getNilUniqueId() : economyTransaction.getTaxer().getUniqueId(), economyTransaction.getAmount(), economyTransaction.getLastError()));
QuickShop.getInstance()
.logEvent(new EconomyTransactionLog(false, economyTransaction.getFrom(), economyTransaction.getTo(),
economyTransaction.getCurrency(), economyTransaction.getTax(),
economyTransaction.getTaxer() == null ? Util.getNilUniqueId()
: economyTransaction.getTaxer().getUniqueId(),
economyTransaction.getAmount(), economyTransaction.getLastError()));
}
}
@@ -22,39 +22,50 @@ package org.maxgamer.quickshop.api.economy;
import org.jetbrains.annotations.NotNull;
public enum EconomyType {
/*
* UNKNOWN = FALLBACK TO VAULT
* VAULT = USE VAULT API
* RESERVE = USE RESERVE API
* */
UNKNOWN(-1),
VAULT(0),
//RESERVE(1),
//MIXED(2),
GEMS_ECONOMY(3),
TNE(4);
* UNKNOWN = FALLBACK TO VAULT VAULT = USE VAULT API RESERVE = USE RESERVE API
*/
UNKNOWN(-1), VAULT(0),
// RESERVE(1),
// MIXED(2),
GEMS_ECONOMY(3), TNE(4);
private final int id;
EconomyType(int id) {
this.id = id;
}
@NotNull
public static EconomyType fromID(int id) {
for (EconomyType type : EconomyType.values()) {
if (type.id == id) {
return type;
}
}
return UNKNOWN;
}
public static int toID(@NotNull EconomyType economyType) {
return economyType.id;
}
public int toID() {
return id;
}
}
@@ -31,21 +31,29 @@ public abstract class AbstractQSEvent extends Event {
private static final HandlerList HANDLERS = new HandlerList();
public AbstractQSEvent() {
super(!Bukkit.isPrimaryThread());
}
public AbstractQSEvent(boolean async) {
super(async);
}
public static HandlerList getHandlerList() {
return HANDLERS;
}
@NotNull
@Override
public HandlerList getHandlers() {
return getHandlerList();
}
/**
@@ -54,11 +62,16 @@ public abstract class AbstractQSEvent extends Event {
* @return Returns true if cancelled, and false if didn't cancel
*/
public boolean callCancellableEvent() {
QuickShop.getInstance().getServer().getPluginManager().callEvent(this);
if (this instanceof Cancellable) {
return ((Cancellable) this).isCancelled();
}
return false;
}
}
@@ -27,9 +27,11 @@ import lombok.EqualsAndHashCode;
@AllArgsConstructor
@Data
public class CalendarEvent extends AbstractQSEvent {
private CalendarTriggerType calendarTriggerType;
public enum CalendarTriggerType {
NOTHING_CHANGED, SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, YEAR
}
}
@@ -27,6 +27,7 @@ import org.maxgamer.quickshop.api.economy.EconomyTransaction;
* Calling when transaction will commit
*/
public class EconomyCommitEvent extends AbstractQSEvent implements Cancellable {
private final EconomyTransaction transaction;
private boolean cancelled;
@@ -36,7 +37,9 @@ public class EconomyCommitEvent extends AbstractQSEvent implements Cancellable {
* @param transaction transaction
*/
public EconomyCommitEvent(@NotNull EconomyTransaction transaction) {
this.transaction = transaction;
}
/**
@@ -45,28 +48,35 @@ public class EconomyCommitEvent extends AbstractQSEvent implements Cancellable {
* @return transaction
*/
public EconomyTransaction getTransaction() {
return transaction;
}
/**
* Gets the cancellation state of this event. A cancelled event will not
* be executed in the server, but will still pass to other plugins
* Gets the cancellation state of this event. A cancelled event will not be
* executed in the server, but will still pass to other plugins
*
* @return true if this event is cancelled
*/
@Override
public boolean isCancelled() {
return cancelled;
}
/**
* Sets the cancellation state of this event. A cancelled event will not
* be executed in the server, but will still pass to other plugins.
* Sets the cancellation state of this event. A cancelled event will not be
* executed in the server, but will still pass to other plugins.
*
* @param cancel true if you wish to cancel this event
*/
@Override
public void setCancelled(boolean cancel) {
this.cancelled = cancel;
}
}
@@ -28,11 +28,10 @@ import org.maxgamer.quickshop.api.shop.Shop;
/**
* A click event which have player variable
* <p>
* Since 5.1.2.0
* Since 5.1.2.0
*/
public class PlayerShopClickEvent extends AbstractQSEvent implements Cancellable {
@Getter
private final Player player;
@@ -48,18 +47,24 @@ public class PlayerShopClickEvent extends AbstractQSEvent implements Cancellable
* @param player the player clicking shop
*/
public PlayerShopClickEvent(@NotNull Shop shop, Player player) {
this.shop = shop;
this.player = player;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
}
/**
@@ -68,6 +73,9 @@ public class PlayerShopClickEvent extends AbstractQSEvent implements Cancellable
* @return Clicked shop
*/
public @NotNull Shop getShop() {
return this.shop;
}
}
@@ -20,12 +20,15 @@
package org.maxgamer.quickshop.api.event;
public enum ProtectionCheckStatus {
BEGIN(0),
END(1);
BEGIN(0), END(1);
final int statusCode;
ProtectionCheckStatus(int statusCode) {
this.statusCode = statusCode;
}
}
@@ -31,10 +31,15 @@ public class QSConfigurationReloadEvent extends AbstractQSEvent {
* @param instance Quickshop instance
*/
public QSConfigurationReloadEvent(QuickShop instance) {
this.instance = instance;
}
public QuickShop getInstance() {
return instance;
}
}
@@ -9,6 +9,7 @@ import org.bukkit.entity.Player;
@AllArgsConstructor
@Data
public class QSHandleChatEvent extends AbstractQSEvent {
private final Player sender;
private String message;
@@ -18,7 +19,9 @@ public class QSHandleChatEvent extends AbstractQSEvent {
* @return The chat sender
*/
public Player getSender() {
return sender;
}
/**
@@ -27,7 +30,9 @@ public class QSHandleChatEvent extends AbstractQSEvent {
* @return The chat content
*/
public String getMessage() {
return message;
}
/**
@@ -36,6 +41,9 @@ public class QSHandleChatEvent extends AbstractQSEvent {
* @param message The new chat content
*/
public void setMessage(String message) {
this.message = message;
}
}
@@ -44,17 +44,23 @@ public class ShopClickEvent extends AbstractQSEvent implements Cancellable {
* @param shop The shop bought from
*/
public ShopClickEvent(@NotNull Shop shop) {
this.shop = shop;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
}
/**
@@ -63,6 +69,9 @@ public class ShopClickEvent extends AbstractQSEvent implements Cancellable {
* @return Clicked shop
*/
public @NotNull Shop getShop() {
return this.shop;
}
}
@@ -28,6 +28,7 @@ import org.maxgamer.quickshop.api.shop.Shop;
* Calling when control panel opened for
*/
public class ShopControlPanelOpenEvent extends AbstractQSEvent implements Cancellable {
private final Shop shop;
private final CommandSender sender;
private boolean cancelled = false;
@@ -39,18 +40,24 @@ public class ShopControlPanelOpenEvent extends AbstractQSEvent implements Cancel
* @param sender The player which receiving shop control panel message
*/
public ShopControlPanelOpenEvent(@NotNull Shop shop, @NotNull CommandSender sender) {
this.shop = shop;
this.sender = sender;
}
@Override
public boolean isCancelled() {
return cancelled;
}
@Override
public void setCancelled(boolean b) {
this.cancelled = b;
}
/**
@@ -59,7 +66,9 @@ public class ShopControlPanelOpenEvent extends AbstractQSEvent implements Cancel
* @return The shop
*/
public Shop getShop() {
return this.shop;
}
/**
@@ -68,6 +77,9 @@ public class ShopControlPanelOpenEvent extends AbstractQSEvent implements Cancel
* @return The sender
*/
public CommandSender getSender() {
return this.sender;
}
}
@@ -49,22 +49,29 @@ public class ShopCreateEvent extends AbstractQSEvent implements Cancellable {
* Call when have a new shop was creating.
*
* @param shop Target shop
* @param creator The player creating the shop, the player might offline/not exist if creating by a plugin.
* @param creator The player creating the shop, the player might offline/not
* exist if creating by a plugin.
*/
public ShopCreateEvent(@NotNull Shop shop, @NotNull UUID creator) {
this.shop = shop;
this.creator = creator;
this.player = QuickShop.getInstance().getServer().getPlayer(creator);
}
@Override
public boolean isCancelled() {
return cancelled;
}
@Override
public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
}
/**
@@ -73,7 +80,9 @@ public class ShopCreateEvent extends AbstractQSEvent implements Cancellable {
* @return The creator, may be a online/offline/virtual player
*/
public @NotNull UUID getCreator() {
return this.creator;
}
/**
@@ -84,7 +93,9 @@ public class ShopCreateEvent extends AbstractQSEvent implements Cancellable {
*/
@Deprecated
public @Nullable Player getPlayer() {
return this.player;
}
/**
@@ -93,6 +104,9 @@ public class ShopCreateEvent extends AbstractQSEvent implements Cancellable {
* @return The shop that created
*/
public @NotNull Shop getShop() {
return this.shop;
}
}
@@ -36,24 +36,32 @@ public class ShopDeleteEvent extends AbstractQSEvent implements Cancellable {
private boolean cancelled;
/**
* Call the event when shop is deleting. The ShopUnloadEvent will call after ShopDeleteEvent
* Call the event when shop is deleting. The ShopUnloadEvent will call after
* ShopDeleteEvent
*
* @param shop Target shop
* @param fromMemory Only delete from the memory? false = delete both in memory and database
* @param fromMemory Only delete from the memory? false = delete both in memory
* and database
*/
public ShopDeleteEvent(@NotNull Shop shop, boolean fromMemory) {
this.shop = shop;
this.fromMemory = fromMemory;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
}
/**
@@ -62,7 +70,9 @@ public class ShopDeleteEvent extends AbstractQSEvent implements Cancellable {
* @return only from memory
*/
public boolean isFromMemory() {
return this.fromMemory;
}
/**
@@ -71,6 +81,9 @@ public class ShopDeleteEvent extends AbstractQSEvent implements Cancellable {
* @return The shop
*/
public @NotNull Shop getShop() {
return this.shop;
}
}
@@ -50,7 +50,9 @@ public class ShopDisplayItemDespawnEvent extends AbstractQSEvent implements Canc
*/
@Deprecated
public ShopDisplayItemDespawnEvent(@NotNull Shop shop, @NotNull ItemStack itemStack) {
this(shop, itemStack, AbstractDisplayItem.getNowUsing());
}
/**
@@ -60,21 +62,28 @@ public class ShopDisplayItemDespawnEvent extends AbstractQSEvent implements Canc
* @param itemStack Target itemstacck
* @param displayType The displayType
*/
public ShopDisplayItemDespawnEvent(
@NotNull Shop shop, @NotNull ItemStack itemStack, @NotNull DisplayType displayType) {
public ShopDisplayItemDespawnEvent(@NotNull Shop shop, @NotNull ItemStack itemStack,
@NotNull DisplayType displayType)
{
this.shop = shop;
this.itemStack = itemStack;
this.displayType = displayType;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
}
/**
@@ -83,7 +92,9 @@ public class ShopDisplayItemDespawnEvent extends AbstractQSEvent implements Canc
* @return the shop
*/
public @NotNull Shop getShop() {
return this.shop;
}
/**
@@ -92,7 +103,9 @@ public class ShopDisplayItemDespawnEvent extends AbstractQSEvent implements Canc
* @return The ItemStack that display using
*/
public @NotNull ItemStack getItemStack() {
return this.itemStack;
}
/**
@@ -101,6 +114,9 @@ public class ShopDisplayItemDespawnEvent extends AbstractQSEvent implements Canc
* @return Display type that current using
*/
public @NotNull DisplayType getDisplayType() {
return this.displayType;
}
}
@@ -50,7 +50,9 @@ public class ShopDisplayItemSpawnEvent extends AbstractQSEvent implements Cancel
*/
@Deprecated
public ShopDisplayItemSpawnEvent(@NotNull Shop shop, @NotNull ItemStack itemStack) {
this(shop, itemStack, AbstractDisplayItem.getNowUsing());
}
/**
@@ -60,21 +62,28 @@ public class ShopDisplayItemSpawnEvent extends AbstractQSEvent implements Cancel
* @param displayType The displayType
* @param itemStack Target ItemStack
*/
public ShopDisplayItemSpawnEvent(
@NotNull Shop shop, @NotNull ItemStack itemStack, @NotNull DisplayType displayType) {
public ShopDisplayItemSpawnEvent(@NotNull Shop shop, @NotNull ItemStack itemStack,
@NotNull DisplayType displayType)
{
this.shop = shop;
this.itemStack = itemStack;
this.displayType = displayType;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
}
/**
@@ -83,7 +92,9 @@ public class ShopDisplayItemSpawnEvent extends AbstractQSEvent implements Cancel
* @return DisplayType
*/
public @NotNull DisplayType getDisplayType() {
return this.displayType;
}
/**
@@ -92,7 +103,9 @@ public class ShopDisplayItemSpawnEvent extends AbstractQSEvent implements Cancel
* @return The display ItemStack
*/
public @NotNull ItemStack getItemStack() {
return this.itemStack;
}
/**
@@ -101,6 +114,9 @@ public class ShopDisplayItemSpawnEvent extends AbstractQSEvent implements Cancel
* @return the shop
*/
public @NotNull Shop getShop() {
return this.shop;
}
}
@@ -9,6 +9,7 @@ import org.maxgamer.quickshop.api.shop.Shop;
@Data
@AllArgsConstructor
public class ShopInventoryCalculateEvent extends AbstractQSEvent {
private final Shop shop;
private final int space;
private final int stock;
@@ -19,7 +20,9 @@ public class ShopInventoryCalculateEvent extends AbstractQSEvent {
* @return The shop
*/
public Shop getShop() {
return shop;
}
/**
@@ -28,7 +31,9 @@ public class ShopInventoryCalculateEvent extends AbstractQSEvent {
* @return The inventory space (-1 if not get calculated)
*/
public int getSpace() {
return space;
}
/**
@@ -37,6 +42,9 @@ public class ShopInventoryCalculateEvent extends AbstractQSEvent {
* @return The inventory stock (-1 if not get calculated)
*/
public int getStock() {
return stock;
}
}
@@ -39,6 +39,7 @@ public class ShopInventoryEvent extends AbstractQSEvent {
* @param shop The shop bought from
*/
public ShopInventoryEvent(@NotNull Shop shop, @NotNull Inventory inventory) {
this.shop = shop;
this.inventory = inventory;
@@ -51,17 +52,20 @@ public class ShopInventoryEvent extends AbstractQSEvent {
*/
@NotNull
public Inventory getInventory() {
return inventory;
}
/**
* Sets the Inventory
*
* @param inventory new inventory for shop for this time.
* It is not persis.
* @param inventory new inventory for shop for this time. It is not persis.
*/
public void setInventory(@NotNull Inventory inventory) {
this.inventory = inventory;
}
/**
@@ -70,6 +74,9 @@ public class ShopInventoryEvent extends AbstractQSEvent {
* @return Clicked shop
*/
public @NotNull Shop getShop() {
return this.shop;
}
}
@@ -44,18 +44,24 @@ public class ShopInventoryPreviewEvent extends AbstractQSEvent implements Cancel
* @param itemStack The preview item, with preview flag.
*/
public ShopInventoryPreviewEvent(@NotNull Player player, @NotNull ItemStack itemStack) {
this.player = player;
this.itemStack = itemStack;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
}
/**
@@ -64,7 +70,9 @@ public class ShopInventoryPreviewEvent extends AbstractQSEvent implements Cancel
* @return The ItemStack
*/
public @NotNull ItemStack getItemStack() {
return this.itemStack;
}
/**
@@ -73,6 +81,9 @@ public class ShopInventoryPreviewEvent extends AbstractQSEvent implements Cancel
* @return The player
*/
public @NotNull Player getPlayer() {
return this.player;
}
}
@@ -28,6 +28,7 @@ import org.maxgamer.quickshop.api.shop.Shop;
* Calling when shop item was changed
*/
public class ShopItemChangeEvent extends AbstractQSEvent implements Cancellable {
private final ItemStack oldItem;
private final ItemStack newItem;
@@ -38,27 +39,33 @@ public class ShopItemChangeEvent extends AbstractQSEvent implements Cancellable
private boolean cancelled;
/**
* Will call when shop price was changed.
* All the item will be passed with a copy, so you can't change them
* Will call when shop price was changed. All the item will be passed with a
* copy, so you can't change them
*
* @param shop Target shop
* @param oldItem The old shop item
* @param newItem The new shop item
*/
public ShopItemChangeEvent(@NotNull Shop shop, ItemStack oldItem, ItemStack newItem) {
this.shop = shop;
this.oldItem = oldItem.clone();
this.newItem = newItem.clone();
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
}
/**
@@ -67,7 +74,9 @@ public class ShopItemChangeEvent extends AbstractQSEvent implements Cancellable
* @return OldItem
*/
public ItemStack getOldItem() {
return this.oldItem;
}
/**
@@ -76,7 +85,9 @@ public class ShopItemChangeEvent extends AbstractQSEvent implements Cancellable
* @return NewItem
*/
public ItemStack getNewItem() {
return this.newItem;
}
/**
@@ -85,6 +96,9 @@ public class ShopItemChangeEvent extends AbstractQSEvent implements Cancellable
* @return the shop
*/
public @NotNull Shop getShop() {
return this.shop;
}
}
@@ -39,17 +39,23 @@ public class ShopLoadEvent extends AbstractQSEvent implements Cancellable {
* @param shop Target shop
*/
public ShopLoadEvent(@NotNull Shop shop) {
this.shop = shop;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
}
/**
@@ -58,6 +64,9 @@ public class ShopLoadEvent extends AbstractQSEvent implements Cancellable {
* @return the shop
*/
public @NotNull Shop getShop() {
return this.shop;
}
}
@@ -35,15 +35,17 @@ public class ShopModeratorChangedEvent extends AbstractQSEvent {
private final Shop shop;
/**
* Will call when shop moderator was changed.
* Shop moderator included owner itself.
* Will call when shop moderator was changed. Shop moderator included owner
* itself.
*
* @param shop Target shop
* @param shopModerator The shop moderator
*/
public ShopModeratorChangedEvent(@NotNull Shop shop, @NotNull ShopModerator shopModerator) {
this.shop = shop;
this.moderator = shopModerator;
}
/**
@@ -52,7 +54,9 @@ public class ShopModeratorChangedEvent extends AbstractQSEvent {
* @return the shop
*/
public @NotNull ShopModerator getModerator() {
return this.moderator;
}
/**
@@ -61,6 +65,9 @@ public class ShopModeratorChangedEvent extends AbstractQSEvent {
* @return the shop
*/
public @NotNull Shop getShop() {
return this.shop;
}
}
@@ -25,6 +25,7 @@ import org.maxgamer.quickshop.api.shop.Shop;
import java.util.UUID;
public class ShopOngoingFeeEvent extends AbstractQSEvent implements Cancellable {
private final UUID player;
private final Shop shop;
@@ -33,9 +34,11 @@ public class ShopOngoingFeeEvent extends AbstractQSEvent implements Cancellable
private boolean cancelled;
public ShopOngoingFeeEvent(Shop shop, UUID player, double cost) {
this.shop = shop;
this.player = player;
this.cost = cost;
}
/**
@@ -44,7 +47,9 @@ public class ShopOngoingFeeEvent extends AbstractQSEvent implements Cancellable
* @return The ongoing fee
*/
public double getCost() {
return cost;
}
/**
@@ -53,7 +58,9 @@ public class ShopOngoingFeeEvent extends AbstractQSEvent implements Cancellable
* @param cost The ongoing fee
*/
public void setCost(double cost) {
this.cost = cost;
}
/**
@@ -62,7 +69,9 @@ public class ShopOngoingFeeEvent extends AbstractQSEvent implements Cancellable
* @return The shop triggered ongoing fee event
*/
public Shop getShop() {
return shop;
}
/**
@@ -71,16 +80,23 @@ public class ShopOngoingFeeEvent extends AbstractQSEvent implements Cancellable
* @return The player triggered ongoing fee event
*/
public UUID getPlayer() {
return player;
}
@Override
public boolean isCancelled() {
return cancelled;
}
@Override
public void setCancelled(boolean b) {
this.cancelled = b;
}
}
@@ -7,6 +7,7 @@ import java.util.UUID;
@AllArgsConstructor
public class ShopOwnerNameGettingEvent extends AbstractQSEvent {
private final Shop shop;
private final UUID owner;
private String name;
@@ -17,7 +18,9 @@ public class ShopOwnerNameGettingEvent extends AbstractQSEvent {
* @return The shop
*/
public Shop getShop() {
return shop;
}
/**
@@ -26,7 +29,9 @@ public class ShopOwnerNameGettingEvent extends AbstractQSEvent {
* @return The shop owner unique id
*/
public UUID getOwner() {
return owner;
}
/**
@@ -35,15 +40,21 @@ public class ShopOwnerNameGettingEvent extends AbstractQSEvent {
* @return The shop owner display name
*/
public String getName() {
return name;
}
/**
* Sets the shop owner display name
*
* @param name New shop owner display name, just display, won't change actual shop owner
* @param name New shop owner display name, just display, won't change actual
* shop owner
*/
public void setName(String name) {
this.name = name;
}
}
@@ -25,8 +25,9 @@ import org.bukkit.event.Cancellable;
import org.jetbrains.annotations.NotNull;
/**
* This event is called before the shop creation request is sent. E.g. A player clicks a chest, this
* event is thrown, if successful, the player is asked how much they wish to trade for.
* This event is called before the shop creation request is sent. E.g. A player
* clicks a chest, this event is thrown, if successful, the player is asked how
* much they wish to trade for.
*/
public class ShopPreCreateEvent extends AbstractQSEvent implements Cancellable {
@@ -39,25 +40,31 @@ public class ShopPreCreateEvent extends AbstractQSEvent implements Cancellable {
private boolean cancelled;
/**
* Calling when shop pre-creating. Shop won't one-percent will create after this event, if you
* want get the shop created event, please use ShopCreateEvent
* Calling when shop pre-creating. Shop won't one-percent will create after this
* event, if you want get the shop created event, please use ShopCreateEvent
*
* @param player Target player
* @param location The location will create be shop
*/
public ShopPreCreateEvent(@NotNull Player player, @NotNull Location location) {
this.location = location;
this.player = player;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
}
/**
@@ -66,7 +73,9 @@ public class ShopPreCreateEvent extends AbstractQSEvent implements Cancellable {
* @return The shop location
*/
public @NotNull Location getLocation() {
return this.location;
}
/**
@@ -75,6 +84,9 @@ public class ShopPreCreateEvent extends AbstractQSEvent implements Cancellable {
* @return creator
*/
public @NotNull Player getPlayer() {
return this.player;
}
}
@@ -45,19 +45,25 @@ public class ShopPriceChangeEvent extends AbstractQSEvent implements Cancellable
* @param newPrice The new shop price
*/
public ShopPriceChangeEvent(@NotNull Shop shop, double oldPrice, double newPrice) {
this.shop = shop;
this.oldPrice = oldPrice;
this.newPrice = newPrice;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
}
/**
@@ -66,7 +72,9 @@ public class ShopPriceChangeEvent extends AbstractQSEvent implements Cancellable
* @return new price
*/
public double getNewPrice() {
return this.newPrice;
}
/**
@@ -75,7 +83,9 @@ public class ShopPriceChangeEvent extends AbstractQSEvent implements Cancellable
* @return old price
*/
public double getOldPrice() {
return this.oldPrice;
}
/**
@@ -84,6 +94,9 @@ public class ShopPriceChangeEvent extends AbstractQSEvent implements Cancellable
* @return the shop
*/
public @NotNull Shop getShop() {
return this.shop;
}
}
@@ -42,35 +42,37 @@ public class ShopProtectionCheckEvent extends AbstractQSEvent {
private final ProtectionCheckStatus status;
/**
* Will call when checking protection by other plugin,
* This event was used to compatible with QuickShop protection checking
* Which will fire a FAKE BlockBreakEvent
* Will call when checking protection by other plugin, This event was used to
* compatible with QuickShop protection checking Which will fire a FAKE
* BlockBreakEvent
*
* @param location Target location will execute protect check.
* @param status The checking status
* @param event The event will call to check the permissions.
* @param player The player in was mentions in this event
*/
public ShopProtectionCheckEvent(
@NotNull Location location,
@NotNull Player player,
@NotNull ProtectionCheckStatus status,
@NotNull Event event) {
public ShopProtectionCheckEvent(@NotNull Location location, @NotNull Player player,
@NotNull ProtectionCheckStatus status, @NotNull Event event)
{
this.loc = location;
this.player = player;
this.status = status;
this.event = event;
}
/**
* Get the event will used for permission check. WARN: This might not only BlockBreakEvent, you
* should check the event type before casting.
* Get the event will used for permission check. WARN: This might not only
* BlockBreakEvent, you should check the event type before casting.
*
* @return The protection check event.
*/
@NotNull
public Event getEvent() {
return event;
}
/**
@@ -79,7 +81,9 @@ public class ShopProtectionCheckEvent extends AbstractQSEvent {
* @return player
*/
public @NotNull Player getPlayer() {
return this.player;
}
/**
@@ -88,7 +92,9 @@ public class ShopProtectionCheckEvent extends AbstractQSEvent {
* @return location
*/
public @NotNull Location getLocation() {
return this.loc;
}
/**
@@ -97,6 +103,9 @@ public class ShopProtectionCheckEvent extends AbstractQSEvent {
* @return The status
*/
public @NotNull ProtectionCheckStatus getStatus() {
return this.status;
}
}
@@ -53,33 +53,42 @@ public class ShopPurchaseEvent extends AbstractQSEvent implements Cancellable {
private boolean cancelled;
/**
* Builds a new shop purchase event
* Will called when purchase starting
* For recording purchase, please listen to ShopSuccessPurchaseEvent.
* Builds a new shop purchase event Will called when purchase starting For
* recording purchase, please listen to ShopSuccessPurchaseEvent.
*
* @param shop The shop bought from
* @param purchaser The player buying, may offline if purchase by plugin
* @param purchaserInventory The purchaseing target inventory, *MAY NOT A PLAYER INVENTORY IF PLUGIN PURCHASE THIS*
* @param purchaser The player buying, may offline if purchase by
* plugin
* @param purchaserInventory The purchaseing target inventory, *MAY NOT A PLAYER
* INVENTORY IF PLUGIN PURCHASE THIS*
* @param amount The amount they're buying
* @param total The total balance in this purchase
*/
public ShopPurchaseEvent(@NotNull Shop shop, @NotNull UUID purchaser, @NotNull Inventory purchaserInventory, int amount, double total) {
public ShopPurchaseEvent(@NotNull Shop shop, @NotNull UUID purchaser, @NotNull Inventory purchaserInventory,
int amount, double total)
{
this.shop = shop;
this.purchaser = purchaser;
this.purchaserInventory = purchaserInventory;
this.amount = amount * shop.getItem().getAmount();
this.total = total;
this.player = Bukkit.getPlayer(purchaser);
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
}
/**
@@ -88,7 +97,9 @@ public class ShopPurchaseEvent extends AbstractQSEvent implements Cancellable {
* @return the shop
*/
public @NotNull Shop getShop() {
return this.shop;
}
/**
@@ -97,7 +108,9 @@ public class ShopPurchaseEvent extends AbstractQSEvent implements Cancellable {
* @return The purchaser uuid
*/
public @NotNull UUID getPurchaser() {
return this.purchaser;
}
/**
@@ -108,7 +121,9 @@ public class ShopPurchaseEvent extends AbstractQSEvent implements Cancellable {
*/
@Deprecated
public @Nullable Player getPlayer() {
return this.player;
}
/**
@@ -117,7 +132,9 @@ public class ShopPurchaseEvent extends AbstractQSEvent implements Cancellable {
* @return The inventory
*/
public @NotNull Inventory getPurchaserInventory() {
return this.purchaserInventory;
}
/**
@@ -126,7 +143,9 @@ public class ShopPurchaseEvent extends AbstractQSEvent implements Cancellable {
* @return Item stack amounts
*/
public int getAmount() {
return this.amount;
}
/**
@@ -135,7 +154,9 @@ public class ShopPurchaseEvent extends AbstractQSEvent implements Cancellable {
* @return Total money
*/
public double getTotal() {
return this.total;
}
/**
@@ -144,6 +165,9 @@ public class ShopPurchaseEvent extends AbstractQSEvent implements Cancellable {
* @param total Total money
*/
public void setTotal(double total) {
this.total = total;
}
}
@@ -41,8 +41,10 @@ public class ShopSignUpdateEvent extends AbstractQSEvent {
* @param sign Updated sign
*/
public ShopSignUpdateEvent(@NotNull Shop shop, @NotNull Sign sign) {
this.shop = shop;
this.sign = sign;
}
/**
@@ -51,7 +53,9 @@ public class ShopSignUpdateEvent extends AbstractQSEvent {
* @return the shop
*/
public @NotNull Shop getShop() {
return this.shop;
}
/**
@@ -60,6 +64,9 @@ public class ShopSignUpdateEvent extends AbstractQSEvent {
* @return the sign
*/
public @NotNull Sign getSign() {
return this.sign;
}
}
@@ -51,24 +51,26 @@ public class ShopSuccessPurchaseEvent extends AbstractQSEvent implements Cancell
private final double tax;
private final double
total; // Don't use getter, we have important notice need told dev in javadoc.
private final double total; // Don't use getter, we have important notice need told dev in javadoc.
private boolean cancelled;
/**
* Builds a new shop purchase event
* Will called when purchase ended
* Builds a new shop purchase event Will called when purchase ended
*
* @param shop The shop bought from
* @param purchaser The player buying, may offline if purchase by plugin
* @param purchaserInventory The purchaseing target inventory, *MAY NOT A PLAYER INVENTORY IF PLUGIN PURCHASE THIS*
* @param purchaser The player buying, may offline if purchase by
* plugin
* @param purchaserInventory The purchaseing target inventory, *MAY NOT A PLAYER
* INVENTORY IF PLUGIN PURCHASE THIS*
* @param amount The amount they're buying
* @param tax The tax in this purchase
* @param total The money in this purchase
*/
public ShopSuccessPurchaseEvent(
@NotNull Shop shop, @NotNull UUID purchaser, @NotNull Inventory purchaserInventory, int amount, double total, double tax) {
public ShopSuccessPurchaseEvent(@NotNull Shop shop, @NotNull UUID purchaser, @NotNull Inventory purchaserInventory,
int amount, double total, double tax)
{
this.shop = shop;
this.purchaser = purchaser;
this.purchaserInventory = purchaserInventory;
@@ -76,36 +78,45 @@ public class ShopSuccessPurchaseEvent extends AbstractQSEvent implements Cancell
this.tax = tax;
this.total = total;
this.player = Bukkit.getPlayer(purchaser);
}
/**
* The total money changes in this purchase. Calculate tax, if you want get total without tax,
* please use getBalanceWithoutTax()
* The total money changes in this purchase. Calculate tax, if you want get
* total without tax, please use getBalanceWithoutTax()
*
* @return the total money with calculate tax
*/
public double getBalance() {
return this.total * (1 - tax);
}
/**
* The total money changes in this purchase. No calculate tax, if you want get total with tax,
* please use getBalance()
* The total money changes in this purchase. No calculate tax, if you want get
* total with tax, please use getBalance()
*
* @return the total money without calculate tax
*/
public double getBalanceWithoutTax() {
return this.total;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
}
/**
@@ -114,7 +125,9 @@ public class ShopSuccessPurchaseEvent extends AbstractQSEvent implements Cancell
* @return the shop
*/
public @NotNull Shop getShop() {
return this.shop;
}
/**
@@ -123,7 +136,9 @@ public class ShopSuccessPurchaseEvent extends AbstractQSEvent implements Cancell
* @return Item stack amounts
*/
public int getAmount() {
return this.amount;
}
/**
@@ -132,7 +147,9 @@ public class ShopSuccessPurchaseEvent extends AbstractQSEvent implements Cancell
* @return The purchaser uuid
*/
public @NotNull UUID getPurchaser() {
return this.purchaser;
}
/**
@@ -143,7 +160,9 @@ public class ShopSuccessPurchaseEvent extends AbstractQSEvent implements Cancell
*/
@Deprecated
public @Nullable Player getPlayer() {
return this.player;
}
/**
@@ -152,7 +171,9 @@ public class ShopSuccessPurchaseEvent extends AbstractQSEvent implements Cancell
* @return The inventory
*/
public @NotNull Inventory getPurchaserInventory() {
return this.purchaserInventory;
}
/**
@@ -161,6 +182,9 @@ public class ShopSuccessPurchaseEvent extends AbstractQSEvent implements Cancell
* @return The tax
*/
public double getTax() {
return this.tax;
}
}
@@ -27,6 +27,7 @@ import java.util.UUID;
@AllArgsConstructor
public class ShopTaxAccountGettingEvent extends AbstractQSEvent {
private final Shop shop;
@Nullable
private UUID taxAccount;
@@ -38,7 +39,9 @@ public class ShopTaxAccountGettingEvent extends AbstractQSEvent {
*/
@Nullable
public UUID getTaxAccount() {
return taxAccount;
}
/**
@@ -47,7 +50,9 @@ public class ShopTaxAccountGettingEvent extends AbstractQSEvent {
* @param taxAccount The tax account
*/
public void setTaxAccount(@Nullable UUID taxAccount) {
this.taxAccount = taxAccount;
}
/**
@@ -56,6 +61,9 @@ public class ShopTaxAccountGettingEvent extends AbstractQSEvent {
* @return The shop
*/
public Shop getShop() {
return shop;
}
}
@@ -28,21 +28,25 @@ import java.util.UUID;
* Calling when shop tax calcing
*/
public class ShopTaxEvent extends AbstractQSEvent {
private final UUID user;
private final Shop shop;
private double tax;
/**
* Call when shop calc shop tax that will pay to system account and remove from shop owner/player received money
* Call when shop calc shop tax that will pay to system account and remove from
* shop owner/player received money
*
* @param shop The shop
* @param tax The tax
* @param user The user (buyer/seller)
*/
public ShopTaxEvent(@NotNull Shop shop, double tax, @NotNull UUID user) {
this.shop = shop;
this.tax = tax;
this.user = user;
}
/**
@@ -51,7 +55,9 @@ public class ShopTaxEvent extends AbstractQSEvent {
* @return User
*/
public UUID getUser() {
return this.user;
}
/**
@@ -60,7 +66,9 @@ public class ShopTaxEvent extends AbstractQSEvent {
* @return the shop
*/
public Shop getShop() {
return this.shop;
}
/**
@@ -69,7 +77,9 @@ public class ShopTaxEvent extends AbstractQSEvent {
* @return tax
*/
public double getTax() {
return this.tax;
}
/**
@@ -78,6 +88,9 @@ public class ShopTaxEvent extends AbstractQSEvent {
* @param tax New tax
*/
public void setTax(double tax) {
this.tax = tax;
}
}
@@ -28,6 +28,7 @@ import org.maxgamer.quickshop.api.shop.ShopType;
* Calling when shop item was changed
*/
public class ShopTypeChangeEvent extends AbstractQSEvent implements Cancellable {
private final ShopType oldType;
private final ShopType newType;
@@ -45,19 +46,25 @@ public class ShopTypeChangeEvent extends AbstractQSEvent implements Cancellable
* @param newType The new shop type
*/
public ShopTypeChangeEvent(@NotNull Shop shop, ShopType oldType, ShopType newType) {
this.shop = shop;
this.oldType = oldType;
this.newType = newType;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
}
/**
@@ -66,7 +73,9 @@ public class ShopTypeChangeEvent extends AbstractQSEvent implements Cancellable
* @return old type
*/
public ShopType getOldType() {
return this.oldType;
}
/**
@@ -75,7 +84,9 @@ public class ShopTypeChangeEvent extends AbstractQSEvent implements Cancellable
* @return new type
*/
public ShopType getNewType() {
return this.newType;
}
/**
@@ -84,6 +95,9 @@ public class ShopTypeChangeEvent extends AbstractQSEvent implements Cancellable
* @return the shop
*/
public @NotNull Shop getShop() {
return this.shop;
}
}
@@ -36,7 +36,9 @@ public class ShopUnloadEvent extends AbstractQSEvent {
* @param shop The shop to unload
*/
public ShopUnloadEvent(@NotNull Shop shop) {
this.shop = shop;
}
/**
@@ -45,6 +47,9 @@ public class ShopUnloadEvent extends AbstractQSEvent {
* @return the shop
*/
public @NotNull Shop getShop() {
return this.shop;
}
}
@@ -39,18 +39,24 @@ public class ShopUpdateEvent extends AbstractQSEvent implements Cancellable {
* @param shop The shop bought from
*/
public ShopUpdateEvent(@NotNull Shop shop) {
super();
this.shop = shop;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
}
/**
@@ -59,6 +65,9 @@ public class ShopUpdateEvent extends AbstractQSEvent implements Cancellable {
* @return the shop
*/
public @NotNull Shop getShop() {
return this.shop;
}
}
@@ -22,10 +22,11 @@ package org.maxgamer.quickshop.api.eventmanager;
import org.bukkit.event.Event;
/**
* QuickEventManager allow user switch between bukkit and quickshop.
* QuickShop's EventManager can filter the Plugin listeners and skip it when calling events
* QuickEventManager allow user switch between bukkit and quickshop. QuickShop's
* EventManager can filter the Plugin listeners and skip it when calling events
*/
public interface QuickEventManager {
/**
* Calling an event use QuickShopEventManager
*
@@ -33,4 +34,5 @@ public interface QuickEventManager {
* @throws IllegalStateException Just like bukkit
*/
void callEvent(Event event) throws IllegalStateException;
}
@@ -20,10 +20,5 @@
package org.maxgamer.quickshop.api.integration;
public enum IntegrateStage {
onLoadBegin,
onLoadAfter,
onEnableBegin,
onEnableAfter,
onUnloadBegin,
onUnloadAfter
onLoadBegin, onLoadAfter, onEnableBegin, onEnableAfter, onUnloadBegin, onUnloadAfter
}
Loaded 100 of 379 files, more files were not shown because too many files have changed in this diff. Show more