mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
Compare commits
523 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8447233b1e | |||
| eb2e7b3abb | |||
| 7f7f049b7b | |||
| 37e8ca7da9 | |||
| 95d3cf3228 | |||
| 178b372255 | |||
| 106cd53b02 | |||
| 950bad2168 | |||
| bc9cbe0b44 | |||
| 9d616d2fd0 | |||
| f82ccfa07e | |||
| cff94a2c5a | |||
| 4b5133c872 | |||
| 98d359f59f | |||
| 96754fd260 | |||
| b92b762551 | |||
| c064e4b1e1 | |||
| fc33b6fbd5 | |||
| 29e08fe29b | |||
| 151666fd21 | |||
| 593527241a | |||
| 3578322686 | |||
| 12ec4e1f54 | |||
| b0f32fdba2 | |||
| d82bd9b22c | |||
| 380b0de92f | |||
| d91576b0de | |||
| 2f9d25bfe9 | |||
| 49b0054eca | |||
| 2efb6e55e2 | |||
| d679cd73f9 | |||
| 9f06f708f5 | |||
| 31fa3d38b7 | |||
| bf4395ba3f | |||
| 2768c0a0dc | |||
| f0d53a6ffa | |||
| d0078e528d | |||
| edceba879f | |||
| 106bc724a1 | |||
| e6293be1c6 | |||
| 7a705f3bfc | |||
| df92b4bf91 | |||
| bf8144ad06 | |||
| 2d31a7f5a8 | |||
| 3992ce1662 | |||
| 7aac325c70 | |||
| 171a8cad6d | |||
| fb27ad2e55 | |||
| 1b3447d041 | |||
| ac9f492125 | |||
| 1660250ee1 | |||
| 856c1e08bd | |||
| 2c3e43cb84 | |||
| d67380da1a | |||
| b18cf1fd59 | |||
| bf926fb159 | |||
| 21087b89e0 | |||
| a392702df2 | |||
| 5265d81176 | |||
| 91d2cce8cc | |||
| 31f9e7e281 | |||
| 05951d0ace | |||
| 65bf82a239 | |||
| 90cc758e88 | |||
| d926b5001e | |||
| 809dc3488b | |||
| 3594cf72af | |||
| 2070f8fd68 | |||
| 68f63a8ec7 | |||
| c703dc68f9 | |||
| 36030c598b | |||
| a6cdd79750 | |||
| 440b2b2741 | |||
| 41a62d810a | |||
| 459e3351fd | |||
| e00c5e8b47 | |||
| 638df714fd | |||
| 190f334656 | |||
| 8141232c46 | |||
| a1984ad5b9 | |||
| f5343440e4 | |||
| 55f6b94ba9 | |||
| 24db259435 | |||
| d867ca6c85 | |||
| 1b86996317 | |||
| bce43649bc | |||
| 12bfcb75ce | |||
| e30f09120d | |||
| b42fb42d83 | |||
| daa1c6171f | |||
| d4e94872d8 | |||
| 7612eac765 | |||
|
|
1a71086327 | ||
| 45fe037a92 | |||
| d061bfc6f4 | |||
| 889d452466 | |||
| 7fbf68dff3 | |||
| f520d5e3db | |||
| e5167971f4 | |||
| 3d50e0ec82 | |||
| 60ebdbf107 | |||
| f3c6526967 | |||
| 8ded2ae9c6 | |||
| f0d2f07703 | |||
| 26469982b2 | |||
| 882e50e449 | |||
| c96dd7d308 | |||
| f59071f504 | |||
| 6afe51acca | |||
| 6a4c861eab | |||
| ab3e4a32ba | |||
| b532ce7dc6 | |||
| e08a02a84a | |||
| 9b8a2d0f32 | |||
| 7bb0c1523d | |||
| 5caa56be59 | |||
| 77c8494166 | |||
| 0440835013 | |||
| bc7ed5af85 | |||
| 2dd48a8041 | |||
| 621222fc01 | |||
| 7044860267 | |||
| 48f0cab15d | |||
| 3e68af06ea | |||
| d037263e3f | |||
| 5ff096190f | |||
| 39db70d7ad | |||
| ec2384bc7f | |||
| 4e15aab024 | |||
| a66206a52c | |||
| 2cff7bd83c | |||
| 33a86cd3bc | |||
| fbc862a5a3 | |||
| 20509faed4 | |||
| 63f2f16b9f | |||
| 63353c6205 | |||
| 5f707c7397 | |||
| 3eb07a8c09 | |||
| 196392e206 | |||
| f13503f873 | |||
| 49abca2ccf | |||
| d801d85242 | |||
| 9cf06fbb93 | |||
| c57de03442 | |||
| ae8167faec | |||
| 7aeb776ce0 | |||
| 2c30446bc1 | |||
| 9ed43f3def | |||
| 8e3f190bb3 | |||
| c8f1aa65a2 | |||
| 4dd7d6361b | |||
| 58b2910350 | |||
| 76e5059632 | |||
| b7e19355a8 | |||
| 377bc4c1d8 | |||
| ea6c5724fa | |||
| f14fe20faf | |||
| 675a16c9b4 | |||
| 18a0f58e68 | |||
| dc7f3f5e20 | |||
| 73fd79b9da | |||
| 5c32e819fd | |||
| 4a2a9c5b3a | |||
| 203713385a | |||
| 35c67e4207 | |||
| e1c794403c | |||
| 69f0e2936e | |||
| be3a98078f | |||
| 5fe65799c8 | |||
| 9e0e546367 | |||
| d4165df61a | |||
| 4ed9de3d3c | |||
| 474ad0f1b2 | |||
| a373cd76f7 | |||
| a350b7fa69 | |||
| fe2196626a | |||
| 161ef6ba91 | |||
| a6cee2d591 | |||
| be7f4d0bcb | |||
| 89eec84a66 | |||
| 59d3c9a85c | |||
| 6975f29d9d | |||
| 1544cd315b | |||
| 01d7d91d4f | |||
| 87f7ed6538 | |||
| 87c9971626 | |||
| fc94dbe169 | |||
| f5a89fea7c | |||
| ee4936ecf5 | |||
| b8da163e77 | |||
| c166d2a78a | |||
| 9e7a1a963d | |||
| 35fb136a40 | |||
| d096ee7f35 | |||
| 8582038c71 | |||
| eb24fb4be8 | |||
| 0aad19166f | |||
| 905646cdee | |||
| 9c3c2cfd2c | |||
| c94c85a3cf | |||
| ade94bdfca | |||
| bc8107ca44 | |||
| 8afd54c94d | |||
| 0993b007a0 | |||
| 9e772c7c19 | |||
| 0b1e3bc12c | |||
| b7f98b20fa | |||
| fe09a1b2c6 | |||
| e9a2890cfb | |||
| b9aae9e799 | |||
| 517fcf3430 | |||
| 11f7bf8602 | |||
| 2967d500eb | |||
| c9e41aceb6 | |||
| 8411b21d1c | |||
| 9912da869c | |||
| c63482c9df | |||
| 7d9b0f05cd | |||
| 8615ec82e2 | |||
| f907a4b6c4 | |||
| 07f6da525d | |||
| e508f3fdf5 | |||
| 49845f8d6b | |||
| 8b7be2dd1f | |||
| 4da017c9be | |||
| dd2f3204c3 | |||
| 5bdd2f9b4c | |||
| 3ab6dbc155 | |||
| 870f56debf | |||
| 283a65b74a | |||
| 092daa9306 | |||
| e6ff0a5e5f | |||
| 502364e7be | |||
| aa86030f01 | |||
| 54801a07e6 | |||
| 600149c237 | |||
| b1fd64351a | |||
| d92a97781c | |||
| 179b8db090 | |||
| 444e6354c0 | |||
| b8f46365a1 | |||
| e4176404ac | |||
| f4aaeddb25 | |||
| 78ce6a8f42 | |||
| 6e02798459 | |||
| 3b8a8fa590 | |||
| d03d2a0444 | |||
| 65d6af7672 | |||
| b095cd5316 | |||
| a8177c9aba | |||
| 00adf05d2b | |||
| dea86ab9ce | |||
| 3d58bb2565 | |||
| 2436a84272 | |||
| d347d7b766 | |||
| 2c70e41a38 | |||
| a5ccd6f8db | |||
| 56ce36eddf | |||
| 494f48b9fc | |||
| c72372200e | |||
| 05f54a5408 | |||
| 5b03156965 | |||
| 4c0c7a8c3b | |||
| cea6d51470 | |||
| 7ee6ab0376 | |||
| 6c470e9fa8 | |||
| f740248a85 | |||
| db6bd4a998 | |||
| c7787676ac | |||
| 52c5773118 | |||
| a2c0037666 | |||
| 4d956baa56 | |||
| 87e837a4b1 | |||
| 6029193f6e | |||
| 45c5649ee4 | |||
| 2964bbd998 | |||
| 12d37e1f59 | |||
| 6930867e74 | |||
| a40fd14b05 | |||
| 2eed730341 | |||
| e93c2cc121 | |||
| a0fa1e3fe2 | |||
| 6078136a80 | |||
| b6f5c7b7a1 | |||
| 7f19783beb | |||
| 87ec40a7ab | |||
| b3cc234ef3 | |||
| 8914369d38 | |||
| 8f3c721820 | |||
| ec4351e70d | |||
| 0baa1b8b28 | |||
| b2947ff5f7 | |||
| 507e8aa8df | |||
| 7cb7d05cb4 | |||
| 600ae9ac1f | |||
| d2599492a3 | |||
| 3bb109c31b | |||
| 1076e60bf1 | |||
| af2d2c45b6 | |||
| bd17d55346 | |||
| a8ac725ce1 | |||
| 4f27744885 | |||
| 97beb3ebe0 | |||
| 2a36ad945d | |||
| f24d2e227e | |||
| 6e2cc20c9e | |||
| 344b52bc14 | |||
| 119f722494 | |||
| 3d664b9fbd | |||
| a0c243f2dd | |||
| 3df4f4bab7 | |||
| fd1267456c | |||
| cb00ba3978 | |||
| fa5edbf0d6 | |||
| e4ddab0a56 | |||
| b95a906808 | |||
| 70c767b366 | |||
| 4d9f4ff1f2 | |||
| deaaa9b513 | |||
| ce64e0c77e | |||
| 6480c6b4f8 | |||
| 80c6250cc2 | |||
| ff27180e82 | |||
| 4ec8597ca2 | |||
| b4089fa3a3 | |||
| 5a2c493b59 | |||
| d27419ef40 | |||
| 6347db9167 | |||
| 71e0761476 | |||
| 36a2bd23a6 | |||
| d4bb82dc87 | |||
| 3e7b44102c | |||
| 18b3a0421b | |||
| b0d3f25347 | |||
| 1cd2d27814 | |||
| a44827c2a6 | |||
| 4ab55b70b4 | |||
| b53b462151 | |||
| 6b470aa635 | |||
| 4f8d4d6b77 | |||
| b3bccb4d1f | |||
| acc9f1fb1b | |||
| 23adf3b1a4 | |||
| 7e655281cc | |||
| 4bb0cb9a89 | |||
| 27604dbb81 | |||
| a74470bd0d | |||
| d9cf3ef507 | |||
| 566e3471dd | |||
| 55e3034161 | |||
| d4bc6716d3 | |||
| 4fd3f153df | |||
| 1296ebba38 | |||
| ca0f7f8b71 | |||
| a26c51a287 | |||
| eda8de09ed | |||
| e0e71b574a | |||
| 8394cef84c | |||
| 914cd0b949 | |||
| c7cccc906f | |||
| 3427c8f381 | |||
| e25723d921 | |||
| 77802e5c18 | |||
| 368b4b2c84 | |||
| 8f408438dc | |||
| f4ce267e44 | |||
| b67d956e39 | |||
| ee5c31ad40 | |||
| 2df791877b | |||
| 41f785a6f6 | |||
| f9da8ad6ef | |||
| 5f5339a669 | |||
| 1ba5d8d38d | |||
| 431e61b2f2 | |||
| c9d95b69af | |||
| 007f6be7f1 | |||
| 92960ca819 | |||
| 43b4e72c49 | |||
| 0adc84df89 | |||
| 012e6b1368 | |||
| 64d5bafc7a | |||
| d8fbb034e5 | |||
| ea4315f494 | |||
| bf7a158c95 | |||
| 053ab2b943 | |||
| 2d66aa44ba | |||
| 02dea53a69 | |||
| 5d427074a9 | |||
| d145eb1122 | |||
| 8dbfeec2fa | |||
| 1f83b7b4fe | |||
| d283ca0c12 | |||
| cab89b66d9 | |||
| 0a548d1cc9 | |||
| 0e4543769e | |||
| 3a640ca93a | |||
| 7238b37b9e | |||
| a08fb3ac75 | |||
| f02ac69928 | |||
| 7f15e0eb55 | |||
| fd7e7684d9 | |||
| f8555175c1 | |||
| dc5009aff5 | |||
| dba48d6c10 | |||
| 4ae53df238 | |||
| 74788b69af | |||
| b7691bf3ff | |||
| 1b462e8af6 | |||
| 7bde5bcb04 | |||
| 62d32fcd7e | |||
| 90db843417 | |||
| c4ad5ae28e | |||
| 51dbbccc1c | |||
| 4cbfb6eab0 | |||
| 23ff1eb5d3 | |||
| 91346209dd | |||
| 21a3663723 | |||
| 762e7d4e0b | |||
| 2c9b2ef9fa | |||
| 20d8fb6eda | |||
| 2f30e19573 | |||
| d2fdaace80 | |||
| bd917b84b4 | |||
| 3f15143c2b | |||
| 78e4ffd0c6 | |||
| 3217a9e4cc | |||
| b25e3961c2 | |||
| 20f9de084d | |||
| 8d558a62f0 | |||
| 55b4aedb3a | |||
| cf022cf36c | |||
| 253ea5f46b | |||
| 2ef42faf40 | |||
| 086db49c07 | |||
| e245db9eae | |||
| 393653bac6 | |||
| 335bca0335 | |||
| 79f05d0f82 | |||
| 904bdc4868 | |||
| fa6ea6747e | |||
| 482d5eb66d | |||
| c5c32ce386 | |||
| ea19ffc4a1 | |||
| 33474c379a | |||
| 5f557e3d49 | |||
| 4147f018a9 | |||
| fa042411ae | |||
| 8f12d79cb9 | |||
| 6f2b15a0bc | |||
| 70767aefd2 | |||
| 71dd823d3e | |||
| f5d607212d | |||
| 73ec340e34 | |||
| b0ec8028e2 | |||
| ed58c9c107 | |||
| c42140a45a | |||
| 798d6806ff | |||
| 1a8a6b2dc5 | |||
| 5e098c5118 | |||
| d19cd30ad7 | |||
| 366b4e1652 | |||
| c35b3738d8 | |||
| e54a953c96 | |||
| e8c8ad8c7f | |||
| 9ad08343ea | |||
| 6eab8c45ae | |||
| e231f0ad7b | |||
| 50f8a37d8b | |||
| e36f3a1694 | |||
| 36e26d762d | |||
| c0af35fa0b | |||
| 1066508233 | |||
| 3d320b1163 | |||
| 55d3ea8765 | |||
| be53cbf5bd | |||
| 6fa7cc0168 | |||
| 7266d4b0c4 | |||
| 6b667bb26b | |||
| 13b7e73d8c | |||
| 7c283dc7f8 | |||
| 7029254526 | |||
| a00bb919f4 | |||
| a915d5ad80 | |||
| 74a211bc88 | |||
| f4f467f6fe | |||
| 14fd247b0b | |||
| 00e542ec8c | |||
| f4c6e724d4 | |||
| 9aef871241 | |||
| 4772480e59 | |||
| cfe0faf456 | |||
| 3bdb0ce536 | |||
| 694ece5443 | |||
| 1ec4bc27f2 | |||
| 80aeb165cc | |||
| 3f0b432e1a | |||
| ce01702cea | |||
| 519ab1853c | |||
| 98172a11c9 | |||
| c74ea42734 | |||
| cf4cc740e8 | |||
| 6a0baf91ff | |||
| 25ce1ef779 | |||
| bf1956e01f | |||
| 42814237f3 | |||
| 1b25611958 | |||
| 1b7560b1a0 | |||
| 92dcfd87cf | |||
| aa860bdbf0 | |||
| 804c11a7f4 | |||
| 3c8810ed72 | |||
| 849f25f30b | |||
| c1ee85150b | |||
| d472e19499 | |||
| d1cfd7443c | |||
| 1746cdfbde | |||
| 4e1976b6bd | |||
| 2d5e83b87c | |||
| 0f2a295039 | |||
| 6c5eab6fff | |||
| 3cc9c674f3 | |||
| 7d20ea83c3 | |||
| 056892ee1e |
307 changed files with 20406 additions and 2888 deletions
28
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
28
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: If you think you encountered something unexpected
|
||||||
|
title: ''
|
||||||
|
labels: bug
|
||||||
|
assignees: alexcrea
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
**Technical informations**
|
||||||
|
Server version & framework. (/version)
|
||||||
|
Plugin version if applicable (/version CustomAnvil)
|
||||||
|
List of plugin that may interact with CustomAnvil if applicable
|
||||||
|
|
||||||
|
**Errors**
|
||||||
|
If any errors was displayed on the console. please provide it.
|
||||||
|
|
||||||
|
**Configuration**
|
||||||
|
Provide relavent configuration files if no error found or if you think the error is related to your configuration.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
||||||
18
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
18
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest an idea for Custom Anvil
|
||||||
|
title: ''
|
||||||
|
labels: enhancement
|
||||||
|
assignees: alexcrea
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
|
**Idea how to integrate it**
|
||||||
|
How and where do you think the config of your feature should like
|
||||||
|
How and where do you think the config gui for your feature should look like
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the feature request here.
|
||||||
163
.github/workflows/gradle.yml
vendored
Normal file
163
.github/workflows/gradle.yml
vendored
Normal file
|
|
@ -0,0 +1,163 @@
|
||||||
|
# This workflow uses actions that are not certified by GitHub.
|
||||||
|
# They are provided by a third-party and are governed by
|
||||||
|
# separate terms of service, privacy policy, and support
|
||||||
|
# documentation.
|
||||||
|
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
|
||||||
|
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
|
||||||
|
|
||||||
|
name: Java CI with Gradle
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "v1.x.x", "v2.x.x" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "v1.x.x", "v2.x.x" ]
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
env:
|
||||||
|
MODRINTH_VERSIONS: '["1.18.x", "1.19.x", "1.20.x", "1.21.x", "26.1.x", "26.2.x"]'
|
||||||
|
MODRINTH_PLATFORMS: '["spigot", "paper", "purpur", "folia"]'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Set up JDKs
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
java-version: |
|
||||||
|
21
|
||||||
|
distribution: 'temurin'
|
||||||
|
cache: gradle
|
||||||
|
|
||||||
|
- name: Cache Gradle root and wrapper
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.gradle/caches
|
||||||
|
~/.gradle/wrapper
|
||||||
|
key: gradle-root-${{ runner.os }}-${{ hashFiles('build.gradle*') }}
|
||||||
|
restore-keys: gradle-root-${{ runner.os }}-
|
||||||
|
|
||||||
|
# Setup paperweight cache
|
||||||
|
- name: Cache paperweight
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
./nms/*/.gradle/caches/paperweight
|
||||||
|
key: paperweight-submodules-${{ runner.os }}-${{ hashFiles('nms/*/build.gradle*') }}
|
||||||
|
restore-keys: |
|
||||||
|
paperweight-submodules-${{ runner.os }}-
|
||||||
|
|
||||||
|
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
|
||||||
|
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
|
||||||
|
- name: Setup Gradle
|
||||||
|
uses: gradle/actions/setup-gradle@v5
|
||||||
|
|
||||||
|
- name: Make gradlew executable
|
||||||
|
run: chmod +x ./gradlew
|
||||||
|
|
||||||
|
- name: Get small commit hash
|
||||||
|
if: ${{ github.event_name != 'release' && success() }}
|
||||||
|
run: echo "SMALL_COMMIT_HASH=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Build with Gradle Wrapper
|
||||||
|
run: ./gradlew build --parallel --stacktrace
|
||||||
|
|
||||||
|
# only submit dependency on push
|
||||||
|
- name: Generate and submit dependency graph
|
||||||
|
uses: gradle/actions/dependency-submission@v4
|
||||||
|
if: ${{ github.event_name == 'push' && success() }}
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
# Get the names of the online and offline jars
|
||||||
|
# grep -v "offline" to exclude offline jar as the regex would catch it otherwise
|
||||||
|
- name: Get file name for jars
|
||||||
|
run: |
|
||||||
|
ONLINE_JAR_PATH=$(ls build/libs/CustomAnvil-*.jar | grep -v "offline")
|
||||||
|
OFFLINE_JAR_PATH=$(ls build/libs/CustomAnvil-*-offline.jar)
|
||||||
|
|
||||||
|
echo "ONLINE_JAR_NAME=$(basename $ONLINE_JAR_PATH)" >> $GITHUB_ENV
|
||||||
|
echo "OFFLINE_JAR_NAME=$(basename $OFFLINE_JAR_PATH)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
# upload the named jars as artifact
|
||||||
|
- name: Upload online JAR artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: CustomAnvil.jar
|
||||||
|
path: build/libs/${{ env.ONLINE_JAR_NAME }}
|
||||||
|
|
||||||
|
- name: Upload offline JAR file
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: CustomAnvil-offline.jar
|
||||||
|
path: build/libs/${{ env.OFFLINE_JAR_NAME }}
|
||||||
|
|
||||||
|
- name: Summarize tests results
|
||||||
|
uses: jeantessier/test-summary-action@v1
|
||||||
|
if: ${{ always() }}
|
||||||
|
|
||||||
|
# upload the jar to release
|
||||||
|
- name: Upload jar to release
|
||||||
|
if: ${{ github.event_name == 'release' && success() }}
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
build/libs/${{ env.ONLINE_JAR_NAME }}
|
||||||
|
build/libs/${{ env.OFFLINE_JAR_NAME }}
|
||||||
|
|
||||||
|
- name: Hangar release
|
||||||
|
if: ${{ (github.event_name != 'release' || github.event_name != 'push') && github.repository_owner == 'alexcrea' && success() }}
|
||||||
|
env:
|
||||||
|
HANGAR_API_TOKEN: ${{ secrets.HANGAR_API_TOKEN }}
|
||||||
|
RELEASE_CHANGELOG: ${{ github.event.release.body }}
|
||||||
|
run: ./gradlew publishAllPublicationsToHangar --stacktrace
|
||||||
|
|
||||||
|
- name: Modrinth publish alpha
|
||||||
|
if: ${{ github.event_name == 'push' && github.repository_owner == 'alexcrea' && success() }}
|
||||||
|
uses: cloudnode-pro/modrinth-publish@v2
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.MODRINTH_TOKEN }}
|
||||||
|
project: S75Ueiq9
|
||||||
|
name: dev-${{ env.SMALL_COMMIT_HASH }}
|
||||||
|
version: dev-${{ env.SMALL_COMMIT_HASH }}
|
||||||
|
loaders: ${{ env.MODRINTH_PLATFORMS }}
|
||||||
|
game-versions: ${{ env.MODRINTH_VERSIONS }}
|
||||||
|
channel: alpha
|
||||||
|
files: build/libs/${{ env.ONLINE_JAR_NAME }}
|
||||||
|
changelog: ${{ github.event.head_commit.message }}
|
||||||
|
|
||||||
|
- name: Modrinth publish release
|
||||||
|
if: ${{ github.event_name == 'release' && github.repository_owner == 'alexcrea' && success() }}
|
||||||
|
uses: cloudnode-pro/modrinth-publish@v2
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.MODRINTH_TOKEN }}
|
||||||
|
project: S75Ueiq9
|
||||||
|
name: ${{ github.event.release.name }}
|
||||||
|
version: ${{ github.event.release.tag_name }}${{ github.event.release.prerelease && '-pre' || '' }}
|
||||||
|
loaders: ${{ env.MODRINTH_PLATFORMS }}
|
||||||
|
game-versions: ${{ env.MODRINTH_VERSIONS }}
|
||||||
|
channel: ${{ github.event.release.prerelease == false && 'release' || 'beta' }}
|
||||||
|
files: build/libs/${{ env.ONLINE_JAR_NAME }}
|
||||||
|
changelog: ${{ github.event.release.body }}
|
||||||
|
|
||||||
|
- name: Send release note to discord
|
||||||
|
if: ${{ github.event_name == 'release' && github.repository_owner == 'alexcrea' && success() }}
|
||||||
|
uses: tsickert/discord-webhook@v7.0.0
|
||||||
|
with:
|
||||||
|
webhook-url: ${{ secrets.RELEASE_WEBHOOK_URL }}
|
||||||
|
content: |
|
||||||
|
${{ github.event.release.prerelease == false && '<@&1338546156325568642>' || '<@&1352296092989001768>' }}
|
||||||
|
# New ${{ github.event.release.prerelease && 'beta ' || '' }}version of custom anvil ! <:CustomAnvil:1262550667986342001>([Modrinth](https://modrinth.com/plugin/customanvil), [Hangar](https://hangar.papermc.io/alexcrea/CustomAnvil) and [GitHub](${{ github.event.release.html_url }}) links)
|
||||||
|
-# note: automated release. spigot is not uploaded yet.
|
||||||
|
|
||||||
|
${{ github.event.release.body }}
|
||||||
17
.gitignore
vendored
17
.gitignore
vendored
|
|
@ -3,3 +3,20 @@
|
||||||
/build/
|
/build/
|
||||||
/out/
|
/out/
|
||||||
.lastDeploymentsId
|
.lastDeploymentsId
|
||||||
|
|
||||||
|
#nms & impl submodule build directory ignored
|
||||||
|
/nms/build
|
||||||
|
/nms/.gradle
|
||||||
|
/nms/*/build
|
||||||
|
/nms/*/.gradle
|
||||||
|
/impl/build
|
||||||
|
/impl/.gradle
|
||||||
|
/impl/*/build
|
||||||
|
/impl/*/.gradle
|
||||||
|
|
||||||
|
# run folder
|
||||||
|
/run/
|
||||||
|
|
||||||
|
# other random folders
|
||||||
|
/htmlReport
|
||||||
|
/.kotlin/errors
|
||||||
|
|
|
||||||
BIN
.idea/icon.png
generated
Normal file
BIN
.idea/icon.png
generated
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 58 KiB |
9
.run/Server.run.xml
Normal file
9
.run/Server.run.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Server" type="JarApplication">
|
||||||
|
<option name="JAR_PATH" value="$PROJECT_DIR$/run/server.jar" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="-nogui" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/run" />
|
||||||
|
<option name="ALTERNATIVE_JRE_PATH" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
63
COMPATIBILITY.md
Normal file
63
COMPATIBILITY.md
Normal file
|
|
@ -0,0 +1,63 @@
|
||||||
|
### Bedrock issue
|
||||||
|
For server using geyser, bedrock player cannot use custom "recipes" in the anvil.
|
||||||
|
This is cannot be fixed on geyser or my side.
|
||||||
|
|
||||||
|
### Plugin Compatibility
|
||||||
|
Here is various plugins that had issues with CustomAnvil
|
||||||
|
where efforts was made for compatibility and should be working right:
|
||||||
|
|
||||||
|
some if not all of them are cool ! I recommend checking them out !
|
||||||
|
|
||||||
|
## Supported By CustomAnvil
|
||||||
|
These plugins have compatibility handled by custom anvil. seek help on custom anvil and do not bother these developers
|
||||||
|
|
||||||
|
#### Enchantment Plugins
|
||||||
|
- [ExcellentEnchants](https://www.spigotmc.org/resources/excellentenchants-%E2%AD%90-75-vanilla-like-enchantments.61693/) by NightExpress:
|
||||||
|
Use ExcellentEnchants item type \
|
||||||
|
Also use ExcellentEnchant max enchant limit
|
||||||
|
|
||||||
|
- [EcoEnchant](https://www.spigotmc.org/resources/ecoenchants-%E2%AD%95-250-enchantments-%E2%9C%85-create-custom-enchants-%E2%9C%A8-essentials-cmi-support.79573/) by Auxilor:
|
||||||
|
Need to use /anvilconfigreload or a server restart to add newly added enchantment.
|
||||||
|
Use EcoEnchant restriction system but new restriction can be added in custom anvil
|
||||||
|
|
||||||
|
- [Enchantment²](https://www.spigotmc.org/resources/enchants-squared-the-enchantsplus-rewrite-custom-enchantments-that-act-like-vanilla-ones.86747/) by Athlaeos:
|
||||||
|
Support by Custom Anvil but still experimental. Automatic configuration. Plugin is not actively developed anymore
|
||||||
|
|
||||||
|
- [SuperEnchants](https://modrinth.com/plugin/superenchants) by Aznos:
|
||||||
|
Use SuperEnchant restrictions system but new restriction can be added in custom anvil
|
||||||
|
|
||||||
|
|
||||||
|
#### Custom Items Plugins
|
||||||
|
Custom Items support is considered unstable. If you find issue please report it !
|
||||||
|
|
||||||
|
- [EcoItem](https://www.spigotmc.org/resources/30-sale%E2%8F%B3-ecoitems-%E2%AD%95-create-custom-items-%E2%9C%85-weapons-armors-tools-charms-%E2%9C%A8-item-levels-rarities.94601/) by Exanthiax:
|
||||||
|
May have some issue. but should partially work I hope
|
||||||
|
|
||||||
|
- [ItemAdder](https://www.spigotmc.org/resources/%E2%9C%A8itemsadder%E2%AD%90emotes-mobs-items-armors-hud-gui-emojis-blocks-wings-hats-liquids.73355/) by LoneDev:
|
||||||
|
Need to fix unit item not working completly correctly as in can't have twice same base item
|
||||||
|
|
||||||
|
#### Anvil Mechanics Plugins
|
||||||
|
- [Disenchantment](https://www.spigotmc.org/resources/disenchantment-1-21-1-1-20-6-new-book-splitting-mechanics.110741/) by H7KZ
|
||||||
|
Partially use Custom Anvil maximum XP settings (>= 6.1.5)
|
||||||
|
|
||||||
|
- [HavenBags](https://www.spigotmc.org/resources/havenbags-shulker-like-player-bound-bags-1-17-1-21-4.110420/) by hyperdefined
|
||||||
|
For bag upgrade and skin via anvil. (version >= 1.31.0)
|
||||||
|
|
||||||
|
- [AxPlayerWarp](https://modrinth.com/project/QDJHDKvi) by ArtillexStudios
|
||||||
|
For its anvil inventory usage
|
||||||
|
|
||||||
|
- [ToolsStats](https://modrinth.com/project/oBZj9E15) by Valorless
|
||||||
|
For token application using anvil
|
||||||
|
|
||||||
|
### Known Partially Incompatible
|
||||||
|
- [UberEnchant](https://modrinth.com/plugin/uberenchant) by coltonj96
|
||||||
|
Anvil handling as they are doing something similar to CustomAnvil.
|
||||||
|
It is by no mean there faults and I recommend checking them out especially if custom anvil do not work for your use case !
|
||||||
|
|
||||||
|
- [AdvencedEnchantments](https://ae.advancedplugins.net/) by Advanced Plugins
|
||||||
|
Paid plugin I do not own as I did not get commissioned for support.
|
||||||
|
may be able to use api but cannot test on my side
|
||||||
|
|
||||||
|
If you like Custom Anvil to support a specific plugin (custom enchant or anvil mechanic).
|
||||||
|
You can ask, but please note implementing compatibility will be considered
|
||||||
|
as low priority as I work for the plugin as an hobby on my free time for free.
|
||||||
34
CREDITS.md
Normal file
34
CREDITS.md
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
Thanks **DelilahEve** for making [Unsafe Enchants](https://github.com/DelilahEve/UnsafeEnchants). \
|
||||||
|
CustomAnvil was initially a fork of Unsafe Enchants where I wanted to add more and more and here we are now !
|
||||||
|
|
||||||
|
Thanks for all the contributors of bukkit, spigot, the paper team and the adventure API developers \
|
||||||
|
Thanks JetBrain for making IntelliJ
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
These dependencies (or a modified version of) are used by custom anvil
|
||||||
|
- [IF](https://github.com/stefvanschie/IF) an inventory framework by stefvanschie
|
||||||
|
- [Mockbukkit](https://github.com/MockBukkit/MockBukkit) for unit testing
|
||||||
|
- [CentralPortalPlus](https://github.com/lalakii/central-portal-plus) by lalakii
|
||||||
|
- [test-summary-action](https://github.com/jeantessier/test-summary-action) by jeantessier
|
||||||
|
- [modrinth-publish](https://github.com/cloudnode-pro/modrinth-publish) by Zefir
|
||||||
|
- [discord-webhook](https://github.com/tsickert/discord-webhook) by tsickert
|
||||||
|
- Thanks [bstats](https://bstats.org/) for keeping me motivated
|
||||||
|
- And [FastStats](https://faststats.dev/) alternative to bstats in beta test
|
||||||
|
- [ModrinthUpdateChecker](https://github.com/Clickism/ModrinthUpdateChecker) by Clickism and thanks to the modrinth team
|
||||||
|
|
||||||
|
### Compatibility
|
||||||
|
Thanks to all the cool creator making the minecraft plugin's ecosystem works ! \
|
||||||
|
See [Compatibility list](https://github.com/alexcrea/CustomAnvil/blob/v1.x.x/COMPATIBILITY.md) for details
|
||||||
|
|
||||||
|
but especially, Big Thanks for H7KZ maker of [Disenchantment](https://github.com/H7KZ/Disenchantment)
|
||||||
|
|
||||||
|
### Special Thanks
|
||||||
|
|
||||||
|
Thanks for all the users trying my plugin for these niche use cases
|
||||||
|
, reporting issues and giving ideas !
|
||||||
|
|
||||||
|
Thanks coltonj96 for [UberEnchant](https://modrinth.com/plugin/uberenchant).
|
||||||
|
we may be incompatible with the anvil, but I do think it is a good alternative ! \
|
||||||
|
I wish one day to work on cross compatibiltiy \
|
||||||
|
* If custom anvil do not work well for you or your use case give it a try ! *
|
||||||
|
|
||||||
114
README.md
114
README.md
|
|
@ -1,85 +1,111 @@
|
||||||
# Custom Anvil
|
# Custom Anvil
|
||||||
|
|
||||||
**Custom Anvil** is a plugin that allows server administrators to customise every aspect of the anvil's mechanics.
|
**Custom Anvil** is a plugin that allows server administrators to customize every aspect of the anvil's mechanics.
|
||||||
It is expected to work on 1.18 to 1.21 minecraft servers running spigot or paper.
|
|
||||||
(the plugin support of 1.16.5 to 1.17.1 is experimental an may encounter issues)
|
|
||||||
|
|
||||||
**Custom Anvil** was previously named **Unsafe Enchants+**.
|
|
||||||
It was renamed because it now affects every anvil aspect and not only unsafe enchants\
|
|
||||||
**Custom Anvil** is based on [Unsafe Enchants](https://github.com/DelilahEve/UnsafeEnchants) by DelilahEve.
|
|
||||||
|
|
||||||
### Download Locations:
|
### Download Locations:
|
||||||
|
|
||||||
the plugin can be downloaded on the
|
the plugin can be downloaded on
|
||||||
[Spigot site](https://www.spigotmc.org/resources/custom-anvil.114884)
|
[Modrinth](https://modrinth.com/plugin/customanvil),
|
||||||
or [on GitHub](https://github.com/alexcrea/CustomAnvil/releases/latest)
|
[Hangar](https://hangar.papermc.io/alexcrea/CustomAnvil)
|
||||||
|
or here [on GitHub](https://github.com/alexcrea/CustomAnvil/releases/latest)
|
||||||
|
|
||||||
---
|
---
|
||||||
**Custom Anvil** have the following features:
|
**Custom Anvil** have the following features:
|
||||||
- Vanilla like default configuration.
|
- Vanilla like default configuration.
|
||||||
- Custom enchantment level limit.
|
- Custom enchantment level limit.
|
||||||
- Custom anvil recipes.
|
- Custom anvil recipes.
|
||||||
- Custom enchant restrictions (allow unsafe enchantment only for a group of item or create new restriction).
|
- Custom enchant restrictions (allows unsafe enchantment only for a group of item or create new restriction).
|
||||||
- Custom items of unit repairs (repair damaged with unit of "material", for example the repair of diamond sword by diamonds).
|
- Custom items of unit repairs (repair damaged with unit of "material", for example the repair of diamond sword by diamonds).
|
||||||
- Custom XP cost for every aspect of the anvil.
|
- Custom XP cost for every aspect of the anvil.
|
||||||
- Permissions to bypass level limit or enchantment restriction.
|
- Permissions to bypass level limit or enchantment restriction.
|
||||||
- Display xp cost instead of "to expensive" when above lv 40. (need ProtocoLib)
|
- Display XP cost instead of "too expensive" when above level 40. (see below for more information)
|
||||||
- Can handle some custom enchantment plugins (see bellow for more information)
|
- Can handle some custom enchantment plugins (see below for more information)
|
||||||
- Gui to configure the plugin in game.
|
- Gui to configure the plugin in game.
|
||||||
- Support of color code and hexadecimal color
|
- Support use of color code, hexadecimal color and minimessage for color/decoration
|
||||||
|
- (Experimental) Folia support (gui do not work)
|
||||||
|
- (Experimental) Dialog rename (allows longer rename)
|
||||||
|
- (Experimental) Anvil with monetary cost (using vault) (require dialog rename)
|
||||||
|
|
||||||
|
And more !
|
||||||
|
|
||||||
---
|
---
|
||||||
### Permissions:
|
### Permissions:
|
||||||
|
Note that for most of them you also need to enable feature and in most case enable use of permission for the specfic feature (indicated with `(toggleable)`)
|
||||||
```yml
|
```yml
|
||||||
|
# Generic and bypass permissions
|
||||||
ca.affected: Player with this permission will be affected by the plugin
|
ca.affected: Player with this permission will be affected by the plugin
|
||||||
ca.bypass.fuse: Allow player to combine every enchantments to every item (no custom limit)
|
ca.bypass.fuse: Allow player to combine every enchantments to every item (no custom limit)
|
||||||
ca.bypass.level: Allow player to bypass every level limit (no custom limit)
|
ca.bypass.level: Allow player to bypass every level limit (no custom limit)
|
||||||
|
|
||||||
|
# Command permissions
|
||||||
ca.command.reload: Allow administrator to reload the plugin's configs
|
ca.command.reload: Allow administrator to reload the plugin's configs
|
||||||
|
ca.command.diagnostic: Allow adminastator to diagnistic some simple problem with the plugin
|
||||||
ca.config.edit: Allow administrator to edit the plugin's config in game
|
ca.config.edit: Allow administrator to edit the plugin's config in game
|
||||||
# Related to use of color (usage of permission for color is toggleable in basic config gui or config.yml)
|
|
||||||
ca.color.code: Allow player to use color code if permission is required (toggleable)
|
# -----------------------------------------------------------------------------
|
||||||
ca.color.hex: Allow player to use hexadecimal color if permission is required (toggleable)
|
# Bellow permissions also require some config change to allow usage of features
|
||||||
|
# Usage of these permission is toggleable in basic config gui or config.yml
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Permissions related to use of color and minimessage
|
||||||
|
ca.color.code: Allow player to use color code on rename if enabled (toggleable)
|
||||||
|
ca.color.code.[thecode] (for example ca.color.code.a): Allows usage of only certain color code (toggleable)
|
||||||
|
ca.color.hex: Allow player to use hexadecimal color on rename if enabled (toggleable)
|
||||||
|
ca.rename.minimessage: Allow player to use minimessage formating on rename if enabled (toggleable)
|
||||||
|
|
||||||
|
# Permissions related to edition of the lore
|
||||||
|
ca.lore_edit.book: Allow player to edit lore via book and quil if enabled (toggleable)
|
||||||
|
ca.lore_edit.paper: Allow player to edit lore via paper if enabled (toggleable)
|
||||||
|
|
||||||
|
# Others
|
||||||
|
ca.rename.dialog: Allow player to use the rename dialog (toggleable)
|
||||||
```
|
```
|
||||||
/!\ version under 1.3.1 use other permission. from 1.2.0 to 1.3.1-A1 use ua.unsafe instead of ca.affected
|
|
||||||
under 1.2.0 replace ca prefix by ue and use ue.unsafe. some permission/features may not exist before the last version.
|
|
||||||
|
|
||||||
### Commands
|
### Commands
|
||||||
```yml
|
|
||||||
anvilconfigreload or carl: Reload every config of this plugin
|
|
||||||
customanvilconfig or configanvil: open a menu for administrator to edit plugin's config in game
|
|
||||||
```
|
|
||||||
### Custom Enchantment Plugins
|
|
||||||
Custom Anvil can be compatible with some custom enchant plugins. \
|
|
||||||
Currently, there is not a lot of compatible plugin
|
|
||||||
|
|
||||||
Here is a list of supported plugins with support status:
|
run `/customanvil help` to get information about available commands \
|
||||||
- [Enchantment²](https://www.spigotmc.org/resources/enchants-squared-the-enchantsplus-rewrite-custom-enchantments-that-act-like-vanilla-ones.86747/):
|
this only show subcommands you have permission for
|
||||||
Officially supported by Custom Anvil but still experimental. Automatic configuration.
|
|
||||||
- [EcoEnchant](https://www.spigotmc.org/resources/50-sale-%E2%8C%9B-ecoenchants-%E2%AD%95-250-enchantments-%E2%9C%85-create-custom-enchants-%E2%9C%A8-essentials-cmi-support.79573/):
|
|
||||||
Officially supported by Custom Anvil but still experimental. Need to use /anvilconfigreload or a server restart to add newly added enchantment.
|
|
||||||
Use EcoEnchant restriction system by default.
|
|
||||||
|
|
||||||
If you like Custom Anvil to support a specific custom enchantment plugin.
|
### Supported Plugins
|
||||||
You can ask, but please note implementing compatibility will be considered
|
See the [Compatibility list](https://github.com/alexcrea/CustomAnvil/blob/v1.x.x/COMPATIBILITY.md)
|
||||||
as low priority as I work for the plugin on my free time for free.
|
|
||||||
|
### Overriding Too Expensive
|
||||||
|
|
||||||
|
One of the configurations allow displaying price about 40 and removing Too Expensive. \
|
||||||
|
By how the minecraft client work: price above 40 can only be displayed green, even if the player does not own enough experience level.
|
||||||
|
spigot version 1.18 to 1.21.11 do not need any ProtocoLib dependency. (26.1.0 or above requires it) \
|
||||||
|
Any recent paper version also are supported for this feature.
|
||||||
|
But you should wait for update for new version containing new enchantable item or new enchantments if any of this got added.
|
||||||
|
Else it is, likely, fine to use the current version you are ussing on a new paper version
|
||||||
|
|
||||||
### For custom enchantment plugin developers
|
### For custom enchantment plugin developers
|
||||||
For information about the API, please refer to [the Wiki](https://github.com/alexcrea/CustomAnvil/wiki) \
|
For information about the API, please refer to [the Wiki](https://github.com/alexcrea/CustomAnvil/wiki) \
|
||||||
(Please note that the wiki is currently incomplete)
|
(Please note that the wiki is currently incomplete)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### Default Plugin's Configurations
|
### Default Plugin's Configurations
|
||||||
For 1.18 to 1.20.6 use the [1.18 configurations](https://github.com/alexcrea/CustomAnvil/tree/master/defaultconfigs/1.18)\
|
see [Here](https://github.com/alexcrea/CustomAnvil/tree/master/defaultconfigs)
|
||||||
For 1.21 use the [1.21 configurations](https://github.com/alexcrea/CustomAnvil/tree/master/defaultconfigs/1.21)
|
|
||||||
|
|
||||||
---
|
---
|
||||||
### Known issue:
|
### Metric And Telemetry
|
||||||
There is non known issue, if you find one please report the issue.
|
Custom anvil [use bstat](https://bstats.org/plugin/bukkit/Unsafe%20Enchants%20Plus/20923)
|
||||||
|
and [faststats](https://faststats.dev/project/customanvil/minecraft-plugin) for metric and error reporting.
|
||||||
|
|
||||||
|
You can select specific telemetry or disable all in config.yml. \
|
||||||
|
You can also [disable bstat](https://bstats.org/getting-started) and [faststats](https://faststats.dev/info) in their /plugin folder if you like too.
|
||||||
|
|
||||||
|
faststats is in beta testing please report me or them any error you encounter
|
||||||
|
|
||||||
|
### Credits and Thanks
|
||||||
|
Credits and thanks can be seen [here](https://github.com/alexcrea/CustomAnvil/blob/v1.x.x/CREDITS.md)
|
||||||
|
|
||||||
### Planned:
|
### Planned:
|
||||||
- Semi manual config update on plugin or minecraft update
|
- Better Folia support (make gui work. fix some dirty handled parts)
|
||||||
- Check unknown registered enchantment & warn
|
- Get restriction on unknown enchantments (planned for V2)
|
||||||
- Warn admin on unsupported minecraft version
|
- More features for custom anvil craft
|
||||||
- Better custom craft
|
|
||||||
|
|
||||||
|
### Known issue:
|
||||||
|
Most unknown registered enchantments (by unsupported custom enchantment plugin & datapacks) will not have restriction by default. Planned but no eta.
|
||||||
|
|
||||||
|
### Do you need help with the plugin, or have any issue or suggestion?
|
||||||
|
You can ask on the discussion page, create a [GitHub issue](https://github.com/alexcrea/CustomAnvil/issues) or join my [discord](https://discord.gg/KHUNsUfRYJ)
|
||||||
|
|
|
||||||
389
build.gradle.kts
389
build.gradle.kts
|
|
@ -1,99 +1,231 @@
|
||||||
import cn.lalaki.pub.BaseCentralPortalPlusExtension
|
import cn.lalaki.pub.BaseCentralPortalPlusExtension
|
||||||
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||||
|
import groovy.util.Node
|
||||||
|
import groovy.util.NodeList
|
||||||
|
import io.papermc.hangarpublishplugin.model.HangarPublication
|
||||||
|
import io.papermc.hangarpublishplugin.model.Platforms
|
||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
import java.io.ByteArrayOutputStream
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm") version "2.0.0"
|
kotlin("jvm") version "2.3.0"
|
||||||
java
|
java
|
||||||
id("org.jetbrains.dokka").version("1.9.20")
|
id("org.jetbrains.dokka").version("1.9.20")
|
||||||
id("io.github.goooler.shadow").version("8.1.8") // using fork of com.github.johnrengelman.shadow to support java 1.21. edit I do not need java 1.21 now so should be replaced ?
|
id("com.gradleup.shadow").version("9.3.0")
|
||||||
// Maven publish
|
// Maven publish
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
signing
|
signing
|
||||||
id("cn.lalaki.central").version("1.2.5")
|
id("cn.lalaki.central").version("1.2.8")
|
||||||
|
// Paper
|
||||||
|
id("io.papermc.paperweight.userdev") version "2.0.0-beta.17" apply false
|
||||||
|
id("io.papermc.hangar-publish-plugin") version "0.1.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "xyz.alexcrea"
|
group = "xyz.alexcrea"
|
||||||
version = "1.5.4"
|
version = "1.17.5"
|
||||||
|
|
||||||
java {
|
val isDevBuild = System.getenv("SMALL_COMMIT_HASH") != null
|
||||||
disableAutoTargetJvm()
|
val isPreRelease = System.getenv("IS_GITHUB_PRERELEASE") == "true"
|
||||||
toolchain.languageVersion.set(JavaLanguageVersion.of(20))
|
|
||||||
}
|
val effectiveVersion = "$version" +
|
||||||
|
(if (isDevBuild) "-dev-${System.getenv("SMALL_COMMIT_HASH")!!}" else "")
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
|
||||||
maven(url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
|
|
||||||
|
|
||||||
// ProtocoLib
|
|
||||||
maven (url = "https://repo.dmulloy2.net/repository/public/" )
|
|
||||||
|
|
||||||
// EcoEnchants
|
// EcoEnchants
|
||||||
maven(url = "https://repo.auxilor.io/repository/maven-public/")
|
maven(url = "https://repo.auxilor.io/repository/maven-public/")
|
||||||
|
|
||||||
|
// ExcellentEnchants
|
||||||
|
maven(url = "https://repo.nightexpressdev.com/releases")
|
||||||
|
|
||||||
|
// ItemsAdder
|
||||||
|
maven(url = "https://maven.devs.beer/")
|
||||||
|
|
||||||
|
// For fast stats
|
||||||
|
maven {
|
||||||
|
name = "thenextlvlReleases"
|
||||||
|
url = uri("https://repo.thenextlvl.net/releases")
|
||||||
|
}
|
||||||
|
|
||||||
|
// For vault unlocked
|
||||||
|
maven { url = uri("https://repo.codemc.io/repository/creatorfromhell/") }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val reobfNMS = providers.gradleProperty("subprojects.reobfnms")
|
||||||
|
.get().split(",")
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
// Spigot api
|
||||||
compileOnly(kotlin("stdlib"))
|
|
||||||
|
|
||||||
compileOnly("org.spigotmc:spigot-api:1.18-R0.1-SNAPSHOT")
|
compileOnly("org.spigotmc:spigot-api:1.18-R0.1-SNAPSHOT")
|
||||||
|
|
||||||
// Gui library
|
// fast stats
|
||||||
implementation("com.github.stefvanschie.inventoryframework:IF:0.10.14")
|
implementation("dev.faststats.metrics:bukkit:0.27.0")
|
||||||
|
|
||||||
// Protocolib
|
// minimessage
|
||||||
compileOnly("com.comphenix.protocol:ProtocolLib:5.1.0")
|
implementation("net.kyori:adventure-text-minimessage:4.25.0")
|
||||||
|
|
||||||
|
// Gui library
|
||||||
|
val inventoryFramework = "xyz.alexcrea.cuanvil.inventoryframework:IF-CustomAnvil:0.10.18.2"
|
||||||
|
implementation(inventoryFramework)
|
||||||
|
testRuntimeOnly(inventoryFramework)
|
||||||
|
|
||||||
// EnchantsSquaredRewritten
|
// EnchantsSquaredRewritten
|
||||||
compileOnly(files("libs/EnchantsSquared.jar"))
|
compileOnly(files("libs/EnchantsSquared.jar"))
|
||||||
|
|
||||||
// EcoEnchants
|
// EcoEnchants & item
|
||||||
compileOnly("com.willfp:EcoEnchants:12.5.1")
|
compileOnly("com.willfp:libreforge:4.79.0:all")
|
||||||
compileOnly("com.willfp:eco:6.70.1")
|
compileOnly("com.willfp:eco:6.74.5")
|
||||||
|
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.0")
|
compileOnly("com.willfp:EcoEnchants:12.11.1")
|
||||||
|
compileOnly(project(":impl:LegacyEcoEnchant"))
|
||||||
|
|
||||||
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
|
compileOnly("com.willfp:EcoItems:5.66.0")
|
||||||
|
|
||||||
}
|
// ExcellentEnchants
|
||||||
|
implementation(project(":impl:ExcellentEnchant5_4"))
|
||||||
tasks.getByName<Test>("test") {
|
compileOnly("su.nightexpress.excellentenchants:Core:5.1.0") {
|
||||||
useJUnitPlatform()
|
exclude("org.spigotmc")
|
||||||
}
|
|
||||||
|
|
||||||
// Set target version
|
|
||||||
tasks.withType<JavaCompile>().configureEach {
|
|
||||||
sourceCompatibility = "16" // We aim for java 16 for minecraft 1.16.5. even if it not really suported.
|
|
||||||
targetCompatibility = "16"
|
|
||||||
}
|
|
||||||
|
|
||||||
kotlin {
|
|
||||||
compilerOptions {
|
|
||||||
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_0)
|
|
||||||
jvmTarget.set(JvmTarget.JVM_16)
|
|
||||||
}
|
}
|
||||||
}
|
compileOnly(files("libs/ExcellentEnchants-4.3.3-striped.jar")) // For pre v5 excellent enchants
|
||||||
|
compileOnly(files("libs/ExcellentEnchants-4.1.0-striped.jar")) // For legacy excellent enchants
|
||||||
|
|
||||||
|
// Disenchantment
|
||||||
|
compileOnly(files("libs/Disenchantment-6.1.5.jar"))
|
||||||
|
|
||||||
// Fat-jar builder
|
// HavenBags
|
||||||
val fatJar = tasks.register<Jar>("fatJar") {
|
compileOnly(files("libs/HavenBags-1.31.0.1760.jar"))
|
||||||
manifest {
|
|
||||||
attributes.apply { put("Main-Class", "io.delilaheve.CustomAnvil") }
|
// ToolStats
|
||||||
|
compileOnly(files("libs/toolstats-1.9.6-stripped.jar"))
|
||||||
|
|
||||||
|
// AxPlayerWarps
|
||||||
|
compileOnly(files("libs/AxPlayerWarps-1.10.3.jar"))
|
||||||
|
|
||||||
|
// SuperEnchants
|
||||||
|
compileOnly(files("libs/SuperEnchants-4.6.2-all.jar"))
|
||||||
|
|
||||||
|
// ItemsAdder API
|
||||||
|
compileOnly("dev.lone:api-itemsadder:4.0.10")
|
||||||
|
|
||||||
|
// Vault api
|
||||||
|
compileOnly("net.milkbowl.vault:VaultUnlockedAPI:2.16")
|
||||||
|
|
||||||
|
// Include nms
|
||||||
|
implementation(project(":nms:nms-common"))
|
||||||
|
implementation(project(":nms:nms-paper"))
|
||||||
|
for (nmsPart in reobfNMS) {
|
||||||
|
implementation(project(":nms:$nmsPart", configuration = "reobf"))
|
||||||
}
|
}
|
||||||
archiveFileName.set("${rootProject.name}-${archiveVersion}.jar")
|
|
||||||
exclude("META-INF/*.RSA", "META-INF/*.SF", "META-INF/*.DSA")
|
// include kotlin for the offline jar
|
||||||
duplicatesStrategy = DuplicatesStrategy.WARN
|
implementation(kotlin("stdlib"))
|
||||||
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
|
|
||||||
with(tasks.jar.get() as CopySpec)
|
// Test dependency
|
||||||
|
testImplementation("org.mockbukkit.mockbukkit:mockbukkit-v1.21:4.48.0")
|
||||||
|
testRuntimeOnly("commons-lang:commons-lang:2.6")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure fatJar and copyJar are run
|
allprojects {
|
||||||
tasks.getByName("build") {
|
apply(plugin = "java")
|
||||||
dependsOn(fatJar)
|
apply(plugin = "kotlin")
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
|
||||||
|
// Spigot repository
|
||||||
|
maven(url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
|
||||||
|
|
||||||
|
// Paper repository
|
||||||
|
maven("https://repo.papermc.io/repository/maven-public/")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compileOnly(kotlin("stdlib"))
|
||||||
|
|
||||||
|
// Test dependency
|
||||||
|
testImplementation(platform("org.junit:junit-bom:5.12.2"))
|
||||||
|
testImplementation("org.junit.jupiter:junit-jupiter")
|
||||||
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.getByName<Test>("test") {
|
||||||
|
useJUnitPlatform()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Configure used version of kotlin and java
|
||||||
|
java {
|
||||||
|
disableAutoTargetJvm()
|
||||||
|
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set target version
|
||||||
|
tasks.withType<JavaCompile>().configureEach {
|
||||||
|
sourceCompatibility =
|
||||||
|
"16" // We aim for java 16 for minecraft 1.16.5. even if it not really supported by custom anvil.
|
||||||
|
targetCompatibility = "16"
|
||||||
|
|
||||||
|
options.encoding = "UTF-8"
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
compilerOptions {
|
||||||
|
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_2)
|
||||||
|
jvmTarget.set(JvmTarget.JVM_16)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shadow necessary dependency
|
|
||||||
tasks.shadowJar {
|
tasks {
|
||||||
relocate("com.github.stefvanschie.inventoryframework", "xyz.alexcrea.inventoryframework")
|
|
||||||
|
fun ShadowJar.configureBaseShadow(suffix: String, libraries: Array<String>) {
|
||||||
|
val processedSuffix = if(suffix.isEmpty()) "" else "-$suffix"
|
||||||
|
val name = "${rootProject.name}-${effectiveVersion}${processedSuffix}.jar"
|
||||||
|
archiveFileName.set(name)
|
||||||
|
|
||||||
|
// Shadow necessary dependency
|
||||||
|
relocate("com.github.stefvanschie.inventoryframework", "xyz.alexcrea.cuanvil.inventoryframework")
|
||||||
|
relocate("dev.faststats", "xyz.alexcrea.cuanvil.faststats")
|
||||||
|
|
||||||
|
filesMatching("plugin.yml") {
|
||||||
|
expand(
|
||||||
|
"version" to effectiveVersion + processedSuffix,
|
||||||
|
"libraries" to libraries.joinToString(transform = { "\"$it\"" }),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Process resource for plugin.yml
|
||||||
|
dependsOn(processResources)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Online jar (use of libraries)
|
||||||
|
shadowJar {
|
||||||
|
configureBaseShadow("",
|
||||||
|
arrayOf(
|
||||||
|
"org.jetbrains.kotlin:kotlin-stdlib:2.3.0",
|
||||||
|
"net.kyori:adventure-text-minimessage:4.25.0",
|
||||||
|
"net.kyori:adventure-text-serializer-plain:4.25.0",
|
||||||
|
"net.kyori:adventure-text-serializer-legacy:4.25.0",
|
||||||
|
))
|
||||||
|
|
||||||
|
// Exclude kotlin std, annotations and adventure api
|
||||||
|
exclude("*kotlin/**")
|
||||||
|
exclude("**/annotations/**")
|
||||||
|
exclude("net/kyori/**")
|
||||||
|
}
|
||||||
|
|
||||||
|
val offlineJar by registering(ShadowJar::class) {
|
||||||
|
configureBaseShadow("offline", emptyArray())
|
||||||
|
|
||||||
|
from(sourceSets.main.get().output)
|
||||||
|
configurations = listOf(project.configurations.runtimeClasspath.get())
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make the online and offline jar on build
|
||||||
|
named("build") {
|
||||||
|
dependsOn(shadowJar, offlineJar)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val sourcesJar by tasks.registering(Jar::class) {
|
val sourcesJar by tasks.registering(Jar::class) {
|
||||||
|
|
@ -101,12 +233,12 @@ val sourcesJar by tasks.registering(Jar::class) {
|
||||||
from(kotlin.sourceSets.main.get().kotlin)
|
from(kotlin.sourceSets.main.get().kotlin)
|
||||||
}
|
}
|
||||||
|
|
||||||
val javadocJar by tasks.creating(Jar::class) {
|
val javadocJar by tasks.registering(Jar::class, fun Jar.() {
|
||||||
group = JavaBasePlugin.DOCUMENTATION_GROUP
|
group = JavaBasePlugin.DOCUMENTATION_GROUP
|
||||||
description = "Assembles Javadoc JAR"
|
description = "Assembles Javadoc JAR"
|
||||||
archiveClassifier.set("javadoc")
|
archiveClassifier.set("javadoc")
|
||||||
from(tasks.named("dokkaHtml"))
|
from(tasks.named("dokkaHtml"))
|
||||||
}
|
})
|
||||||
|
|
||||||
signing {
|
signing {
|
||||||
useGpgCmd()
|
useGpgCmd()
|
||||||
|
|
@ -119,7 +251,12 @@ signing {
|
||||||
// PUBLISHING TO SONATYPE CONFIGURATION
|
// PUBLISHING TO SONATYPE CONFIGURATION
|
||||||
// ------------------------------------
|
// ------------------------------------
|
||||||
|
|
||||||
val localMavenRepo = uri("E:\\WorkSpace\\Java\\Maven\\repo") // The path is recommended to be set to an empty directory
|
// The path is recommended to be set to an empty directory
|
||||||
|
val localMavenRepo = uri(
|
||||||
|
project.findProperty("localMavenRepo") as String?
|
||||||
|
?: rootProject.layout.buildDirectory.dir("local-maven-repo").get().asFile.toURI() // Convert to URI
|
||||||
|
)
|
||||||
|
|
||||||
centralPortalPlus {
|
centralPortalPlus {
|
||||||
url = localMavenRepo
|
url = localMavenRepo
|
||||||
username = System.getenv("SONATYPE_USERNAME")
|
username = System.getenv("SONATYPE_USERNAME")
|
||||||
|
|
@ -135,6 +272,10 @@ object Meta {
|
||||||
const val snapshot = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
|
const val snapshot = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val disallowedDependency = HashSet<String>()
|
||||||
|
disallowedDependency.addAll(reobfNMS)
|
||||||
|
disallowedDependency.addAll(listOf("nms-common", "nms-paper", "kotlin-stdlib"))
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
|
|
@ -150,6 +291,16 @@ publishing {
|
||||||
from(components["kotlin"])
|
from(components["kotlin"])
|
||||||
artifact(tasks["sourcesJar"])
|
artifact(tasks["sourcesJar"])
|
||||||
artifact(tasks["javadocJar"])
|
artifact(tasks["javadocJar"])
|
||||||
|
|
||||||
|
versionMapping {
|
||||||
|
usage("java-api") {
|
||||||
|
fromResolutionOf("runtimeClasspath")
|
||||||
|
}
|
||||||
|
usage("java-runtime") {
|
||||||
|
fromResolutionResult()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pom {
|
pom {
|
||||||
name.set(project.name)
|
name.set(project.name)
|
||||||
description.set(Meta.desc)
|
description.set(Meta.desc)
|
||||||
|
|
@ -182,7 +333,123 @@ publishing {
|
||||||
issueManagement {
|
issueManagement {
|
||||||
url.set("https://github.com/${Meta.githubRepo}/issues")
|
url.set("https://github.com/${Meta.githubRepo}/issues")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
withXml {
|
||||||
|
val dependenciesNode = (asNode().get("dependencies") as NodeList)[0] as Node
|
||||||
|
|
||||||
|
val toRemove = ArrayList<Node>()
|
||||||
|
for (child in dependenciesNode.children()) {
|
||||||
|
val artifactNode = ((child as Node).get("artifactId") as NodeList)[0] as Node
|
||||||
|
val artifactID = artifactNode.value() as String
|
||||||
|
|
||||||
|
if(disallowedDependency.contains(artifactID)) {
|
||||||
|
toRemove.add(child)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (node in toRemove) {
|
||||||
|
dependenciesNode.remove(node)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// hangar publish
|
||||||
|
|
||||||
|
fun executeGitCommand(vararg command: String): String {
|
||||||
|
val byteOut = ByteArrayOutputStream()
|
||||||
|
exec {
|
||||||
|
commandLine = listOf("git", *command)
|
||||||
|
standardOutput = byteOut
|
||||||
|
}
|
||||||
|
return byteOut.toString(Charsets.UTF_8.name()).trim()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fun latestCommitMessage(): String {
|
||||||
|
return executeGitCommand("log", "-1", "--pretty=%B")
|
||||||
|
}
|
||||||
|
|
||||||
|
fun changelog(isOnline: Boolean): String {
|
||||||
|
var changelog = if(isDevBuild) latestCommitMessage()
|
||||||
|
else System.getenv("RELEASE_CHANGELOG")
|
||||||
|
|
||||||
|
if(!isOnline) {
|
||||||
|
changelog = "This is an offline version of the plugin. \\\n" +
|
||||||
|
"This mean that this plugin libraries are shaded into this plugin \\\n" +
|
||||||
|
"You likely want to use the normal version of this plugin\n\n" + changelog
|
||||||
|
}
|
||||||
|
|
||||||
|
if(changelog == null || changelog.isEmpty()) {
|
||||||
|
changelog = "empty changelog"
|
||||||
|
}
|
||||||
|
|
||||||
|
return changelog
|
||||||
|
}
|
||||||
|
|
||||||
|
hangarPublish {
|
||||||
|
|
||||||
|
fun HangarPublication.configure(isOnline: Boolean, devChannel: String, releaseChannel: String) {
|
||||||
|
var versionName = effectiveVersion
|
||||||
|
if(isPreRelease) versionName+= "-pre"
|
||||||
|
if(!isOnline) versionName+= "-offline"
|
||||||
|
|
||||||
|
version.set(versionName)
|
||||||
|
channel.set(if (isDevBuild || isPreRelease) devChannel else releaseChannel)
|
||||||
|
|
||||||
|
changelog.set(changelog(isOnline))
|
||||||
|
id.set("CustomAnvil")
|
||||||
|
apiKey.set(System.getenv("HANGAR_API_TOKEN"))
|
||||||
|
|
||||||
|
platforms {
|
||||||
|
register(Platforms.PAPER) {
|
||||||
|
// Set the JAR file to upload
|
||||||
|
var task = if(isOnline) tasks.shadowJar
|
||||||
|
else tasks.named<ShadowJar>("offlineJar")
|
||||||
|
|
||||||
|
jar.set(task.flatMap { it.archiveFile })
|
||||||
|
|
||||||
|
// Set platform versions from gradle.properties file
|
||||||
|
val versions: List<String> = (property("paperVersion") as String)
|
||||||
|
.split(",")
|
||||||
|
.map { it.trim() }
|
||||||
|
platformVersions.set(versions)
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
hangar("ProtocolLib") {
|
||||||
|
required.set(false)
|
||||||
|
}
|
||||||
|
url("Disenchantment", "https://modrinth.com/plugin/disenchantment") {
|
||||||
|
required.set(false)
|
||||||
|
}
|
||||||
|
url("ToolStats", "https://modrinth.com/plugin/toolstats") {
|
||||||
|
required.set(false)
|
||||||
|
}
|
||||||
|
url("HavenBags", "https://www.spigotmc.org/resources/havenbags-shulker-like-player-bound-bags-1-17-1-21-4.110420/") {
|
||||||
|
required.set(false)
|
||||||
|
}
|
||||||
|
url("EcoEnchants", "https://www.spigotmc.org/resources/ecoenchants-%E2%AD%95-250-enchantments-%E2%9C%85-create-custom-enchants-%E2%9C%A8-essentials-cmi-support.79573/") {
|
||||||
|
required.set(false)
|
||||||
|
}
|
||||||
|
hangar("EnchantsSquared") {
|
||||||
|
required.set(false)
|
||||||
|
}
|
||||||
|
url("ExcellentEnchants", "https://www.spigotmc.org/resources/excellentenchants-%E2%AD%90-75-vanilla-like-enchantments.61693/") {
|
||||||
|
required.set(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
publications.register("plugin") {
|
||||||
|
configure(true, "DevSnapshot", "Release")
|
||||||
|
}
|
||||||
|
|
||||||
|
publications.register("offline") {
|
||||||
|
configure(false, "OfflineSnapshot", "OfflineRelease")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,19 @@
|
||||||
# You can still manually edit here if you like to. but if you do, don't forget to /anvilconfigreload after you changes !
|
# You can still manually edit here if you like to. but if you do, don't forget to /anvilconfigreload after you changes !
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# What service of metric should custom anvil use
|
||||||
|
# Custom anvil collect generic information like server minecraft version, type, etc...
|
||||||
|
# It can also collect error information if error is happening (currently faststats only)
|
||||||
|
# It can also be disabled
|
||||||
|
# Please refer to README for public metric link
|
||||||
|
# Possible options: auto, bstat, faststats, disabled (auto by default)
|
||||||
|
metric_type: auto
|
||||||
|
|
||||||
|
# Allow to report errors made caused by this plugin (only for faststats)
|
||||||
|
# This allows me to fix potentials issue that I'm not aware of
|
||||||
|
# Accept true or false (true by default)
|
||||||
|
metric_collect_errors: true
|
||||||
|
|
||||||
# All anvil cost will be capped to limit_repair_value if enabled.
|
# All anvil cost will be capped to limit_repair_value if enabled.
|
||||||
#
|
#
|
||||||
# In other words:
|
# In other words:
|
||||||
|
|
@ -55,10 +68,54 @@ unit_repair_cost: 1
|
||||||
# Valid values include 0 to 1000
|
# Valid values include 0 to 1000
|
||||||
sacrifice_illegal_enchant_cost: 1
|
sacrifice_illegal_enchant_cost: 1
|
||||||
|
|
||||||
# Default limit to apply to any enchants missing from override_limits
|
# Allow using color code and hexadecimal color.
|
||||||
#
|
#
|
||||||
# Valid values include 1 to 1000
|
# Color code are prefixed by "&" and hexadecimal color by "#".
|
||||||
default_limit: 5
|
# Color code will not be applied if it colors nothing. "&&" can be used to write "&".
|
||||||
|
# For minimessage see minimessage formating https://docs.papermc.io/adventure/minimessage/format/
|
||||||
|
allow_color_code: false
|
||||||
|
allow_hexadecimal_color: false
|
||||||
|
allow_minimessage: false
|
||||||
|
|
||||||
|
# This enables restricting color code for player having specific permission
|
||||||
|
# It requires allow_color_code enabled for... obvious reasons
|
||||||
|
#
|
||||||
|
# For example: if player want to use "&aHello" it will be required that the player has
|
||||||
|
# the permission "ca.color.code.a" as he used the color code "a"
|
||||||
|
# In general permission to give to the player is "ca.color.code.[code]"
|
||||||
|
# where [code] is the color code you wish to allow the player
|
||||||
|
#
|
||||||
|
# It is kinda of useless when minimessage is supported as players would be able to bypass
|
||||||
|
# that using the equivalent minimessage tag
|
||||||
|
per_color_code_permission: false
|
||||||
|
|
||||||
|
# Toggle if color should only be applicable if the player a certain permission.
|
||||||
|
#
|
||||||
|
# permission are "ca.color.code" for use of color code and "ca.color.hex" for use of hexadecimal color.
|
||||||
|
permission_needed_for_color: true
|
||||||
|
|
||||||
|
# Xp cost if the player use color in the items name on rename.
|
||||||
|
#
|
||||||
|
# Valid values include 0 to 1000.
|
||||||
|
use_of_color_cost: 0
|
||||||
|
|
||||||
|
# Dialogue rename menu make use of dialog menu to allow bigger rename
|
||||||
|
# You can also change the maximum size and set it to -1 or less for maximum
|
||||||
|
#
|
||||||
|
# This feature only work on paper 1.21.7 or later
|
||||||
|
#
|
||||||
|
# At the moment only english is available for this menu... sorry !
|
||||||
|
#
|
||||||
|
# CustomAnvil use "ca.rename.dialog" when permission
|
||||||
|
enable_dialog_rename: false
|
||||||
|
dialog_rename_max_size: 256
|
||||||
|
permission_needed_for_dialog_rename: false
|
||||||
|
|
||||||
|
# This allows custom anvil to not "guess" the text used for rename but store it in the item
|
||||||
|
# It will make item stackable only and only if it had used the same rename text
|
||||||
|
#
|
||||||
|
# For practical reason. this only work when dialog rename is enabled
|
||||||
|
dialog_rename_keep_user_text: true
|
||||||
|
|
||||||
# Override limits for specific enchants
|
# Override limits for specific enchants
|
||||||
#
|
#
|
||||||
|
|
@ -66,48 +123,49 @@ default_limit: 5
|
||||||
#
|
#
|
||||||
# Overrides provided default from aqua_affinity to depth_strider won't change effect with extra levels
|
# Overrides provided default from aqua_affinity to depth_strider won't change effect with extra levels
|
||||||
#
|
#
|
||||||
# Valid range of 1 - 255 for each enchantment
|
# Valid range of 0 - 255 for each enchantment
|
||||||
|
# -1 mean keep default
|
||||||
enchant_limits:
|
enchant_limits:
|
||||||
aqua_affinity: 1
|
minecraft:aqua_affinity: 1
|
||||||
binding_curse: 1
|
minecraft:binding_curse: 1
|
||||||
channeling: 1
|
minecraft:channeling: 1
|
||||||
flame: 1
|
minecraft:flame: 1
|
||||||
infinity: 1
|
minecraft:infinity: 1
|
||||||
mending: 1
|
minecraft:mending: 1
|
||||||
multishot: 1
|
minecraft:multishot: 1
|
||||||
silk_touch: 1
|
minecraft:silk_touch: 1
|
||||||
vanishing_curse: 1
|
minecraft:vanishing_curse: 1
|
||||||
depth_strider: 3 # anything more than 3 is treated as 3 by the game
|
minecraft:depth_strider: 3 # anything more than 3 is treated as 3 by the game
|
||||||
protection: 4
|
minecraft:protection: 4
|
||||||
fire_protection: 4
|
minecraft:fire_protection: 4
|
||||||
blast_protection: 4
|
minecraft:blast_protection: 4
|
||||||
projectile_protection: 4
|
minecraft:projectile_protection: 4
|
||||||
feather_falling: 4
|
minecraft:feather_falling: 4
|
||||||
thorns: 3
|
minecraft:thorns: 3
|
||||||
respiration: 3
|
minecraft:respiration: 3
|
||||||
sharpness: 5
|
minecraft:sharpness: 5
|
||||||
smite: 5
|
minecraft:smite: 5
|
||||||
bane_of_arthropods: 5
|
minecraft:bane_of_arthropods: 5
|
||||||
knockback: 2
|
minecraft:knockback: 2
|
||||||
fire_aspect: 2
|
minecraft:fire_aspect: 2
|
||||||
looting: 3
|
minecraft:looting: 3
|
||||||
sweeping: 3
|
minecraft:sweeping: 3
|
||||||
sweeping_edge: 3
|
minecraft:sweeping_edge: 3
|
||||||
efficiency: 5
|
minecraft:efficiency: 5
|
||||||
unbreaking: 3
|
minecraft:unbreaking: 3
|
||||||
fortune: 3
|
minecraft:fortune: 3
|
||||||
power: 5
|
minecraft:power: 5
|
||||||
punch: 2
|
minecraft:punch: 2
|
||||||
luck_of_the_sea: 3
|
minecraft:luck_of_the_sea: 3
|
||||||
lure: 3
|
minecraft:lure: 3
|
||||||
frost_walker: 2
|
minecraft:frost_walker: 2
|
||||||
impaling: 5
|
minecraft:impaling: 5
|
||||||
riptide: 3
|
minecraft:riptide: 3
|
||||||
loyalty: 3
|
minecraft:loyalty: 3
|
||||||
piercing: 4
|
minecraft:piercing: 4
|
||||||
quick_charge: 3
|
minecraft:quick_charge: 3
|
||||||
soul_speed: 3
|
minecraft:soul_speed: 3
|
||||||
swift_sneak: 3
|
minecraft:swift_sneak: 3
|
||||||
|
|
||||||
# Multipliers used to calculate the enchantment's value in repair/combining
|
# Multipliers used to calculate the enchantment's value in repair/combining
|
||||||
#
|
#
|
||||||
|
|
@ -121,131 +179,288 @@ enchant_limits:
|
||||||
# With default values protection 4 would have a value of 4 when
|
# With default values protection 4 would have a value of 4 when
|
||||||
# coming from either a book (4 * 1) or an item (4 * 1)
|
# coming from either a book (4 * 1) or an item (4 * 1)
|
||||||
enchant_values:
|
enchant_values:
|
||||||
aqua_affinity:
|
minecraft:aqua_affinity:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
bane_of_arthropods:
|
minecraft:bane_of_arthropods:
|
||||||
item: 2
|
item: 2
|
||||||
book: 1
|
book: 1
|
||||||
binding_curse:
|
minecraft:binding_curse:
|
||||||
item: 8
|
item: 8
|
||||||
book: 4
|
book: 4
|
||||||
blast_protection:
|
minecraft:blast_protection:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
channeling:
|
minecraft:channeling:
|
||||||
item: 8
|
item: 8
|
||||||
book: 4
|
book: 4
|
||||||
depth_strider:
|
minecraft:depth_strider:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
efficiency:
|
minecraft:efficiency:
|
||||||
item: 1
|
item: 1
|
||||||
book: 1
|
book: 1
|
||||||
flame:
|
minecraft:flame:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
feather_falling:
|
minecraft:feather_falling:
|
||||||
item: 2
|
item: 2
|
||||||
book: 1
|
book: 1
|
||||||
fire_aspect:
|
minecraft:fire_aspect:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
fire_protection:
|
minecraft:fire_protection:
|
||||||
item: 2
|
item: 2
|
||||||
book: 1
|
book: 1
|
||||||
fortune:
|
minecraft:fortune:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
frost_walker:
|
minecraft:frost_walker:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
impaling:
|
minecraft:impaling:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
infinity:
|
minecraft:infinity:
|
||||||
item: 8
|
item: 8
|
||||||
book: 4
|
book: 4
|
||||||
knockback:
|
minecraft:knockback:
|
||||||
item: 2
|
item: 2
|
||||||
book: 1
|
book: 1
|
||||||
looting:
|
minecraft:looting:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
loyalty:
|
minecraft:loyalty:
|
||||||
item: 1
|
item: 1
|
||||||
book: 1
|
book: 1
|
||||||
luck_of_the_sea:
|
minecraft:luck_of_the_sea:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
lure:
|
minecraft:lure:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
mending:
|
minecraft:mending:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
multishot:
|
minecraft:multishot:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
piercing:
|
minecraft:piercing:
|
||||||
item: 1
|
item: 1
|
||||||
book: 1
|
book: 1
|
||||||
power:
|
minecraft:power:
|
||||||
item: 1
|
item: 1
|
||||||
book: 1
|
book: 1
|
||||||
projectile_protection:
|
minecraft:projectile_protection:
|
||||||
item: 2
|
item: 2
|
||||||
book: 1
|
book: 1
|
||||||
protection:
|
minecraft:protection:
|
||||||
item: 1
|
item: 1
|
||||||
book: 1
|
book: 1
|
||||||
punch:
|
minecraft:punch:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
quick_charge:
|
minecraft:quick_charge:
|
||||||
item: 2
|
item: 2
|
||||||
book: 1
|
book: 1
|
||||||
respiration:
|
minecraft:respiration:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
riptide:
|
minecraft:riptide:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
silk_touch:
|
minecraft:silk_touch:
|
||||||
item: 8
|
item: 8
|
||||||
book: 4
|
book: 4
|
||||||
sharpness:
|
minecraft:sharpness:
|
||||||
item: 1
|
item: 1
|
||||||
book: 1
|
book: 1
|
||||||
smite:
|
minecraft:smite:
|
||||||
item: 2
|
item: 2
|
||||||
book: 1
|
book: 1
|
||||||
soul_speed:
|
minecraft:soul_speed:
|
||||||
item: 8
|
item: 8
|
||||||
book: 4
|
book: 4
|
||||||
swift_sneak:
|
minecraft:swift_sneak:
|
||||||
item: 8
|
item: 8
|
||||||
book: 4
|
book: 4
|
||||||
sweeping:
|
minecraft:sweeping:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
sweeping_edge:
|
minecraft:sweeping_edge:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
thorns:
|
minecraft:thorns:
|
||||||
item: 8
|
item: 8
|
||||||
book: 4
|
book: 4
|
||||||
unbreaking:
|
minecraft:unbreaking:
|
||||||
item: 2
|
item: 2
|
||||||
book: 1
|
book: 1
|
||||||
vanishing_curse:
|
minecraft:vanishing_curse:
|
||||||
item: 8
|
item: 8
|
||||||
book: 4
|
book: 4
|
||||||
|
|
||||||
|
# Disable enchantment merging for level above the set value
|
||||||
|
# Enchantment merging is when, for example, 2 unbreaking II book combine to give sharpness III
|
||||||
|
# But Enchantment above this value can still be applied. following the previous example, we could still apply a unbreaking III book to a sword
|
||||||
|
# Even if disable-merge-over of unbreaking is set to 2
|
||||||
|
# -1 mean enchantment merge for this enchantment is not disabled. default to -1 if absent.
|
||||||
|
disable-merge-over:
|
||||||
|
# Sharpness is set to -1. it equivalent to it not being set to anything (and work as vanilla on default configuration)
|
||||||
|
minecraft:sharpness: -1
|
||||||
|
# If uncommented. 2 unbreaking II book would not give an unbreaking III book. but unbreaking III book can still be applied
|
||||||
|
#minecraft:unbreaking: 2
|
||||||
|
|
||||||
|
# The maximum number of enchantment an item can get. -1 for infinity
|
||||||
|
# Use eco enchant enchant_limit if present by default unless "default" is not equal to -1
|
||||||
|
enchantment_count_limit:
|
||||||
|
default: -1
|
||||||
|
# Limit for specific items. example bellow is an example with stick
|
||||||
|
# Per item enchantment limit override eco enchant enchant_limit and default limit
|
||||||
|
items:
|
||||||
|
stick: -1
|
||||||
|
|
||||||
|
# Settings for lore modification
|
||||||
|
lore_edit:
|
||||||
|
book_and_quil:
|
||||||
|
# Permission is ca.lore_edit.book
|
||||||
|
use_permission: true
|
||||||
|
append:
|
||||||
|
# If adding lore using book & quil is enabled
|
||||||
|
enabled: false
|
||||||
|
# Cost used every time
|
||||||
|
fixed_cost: 1
|
||||||
|
# Cost used for every lore line added
|
||||||
|
per_line_cost: 0
|
||||||
|
# Use left item vanilla cost penalty if any
|
||||||
|
shared_increase: false
|
||||||
|
# Increase shared left item cost penalty
|
||||||
|
shared_additive: false
|
||||||
|
# If adding the lore consume the book & quil
|
||||||
|
do_consume: false
|
||||||
|
# Allow using color code and hexadecimal color when editing lore via book & quil
|
||||||
|
#
|
||||||
|
# Color code are prefixed by "&" and hexadecimal color by "#"
|
||||||
|
# Color code will not be applied if it colors nothing. "&&" can be used to write "&"
|
||||||
|
# For minimessage see minimessage formating https://docs.papermc.io/adventure/minimessage/format/
|
||||||
|
#
|
||||||
|
# Note that currently minimessage would disable hex code when adding color
|
||||||
|
allow_color_code: true
|
||||||
|
allow_hexadecimal_color: false
|
||||||
|
allow_minimessage: true
|
||||||
|
|
||||||
|
remove:
|
||||||
|
# If removing lore using book & quil is enabled
|
||||||
|
enabled: false
|
||||||
|
# Cost used every time
|
||||||
|
fixed_cost: 1
|
||||||
|
# Cost used for every lore line removed
|
||||||
|
per_line_cost: 0
|
||||||
|
# Use left item vanilla cost penalty if any
|
||||||
|
shared_increase: false
|
||||||
|
# Increase shared left item cost penalty
|
||||||
|
shared_additive: false
|
||||||
|
# If removing the lore consume the book & quil
|
||||||
|
do_consume: false
|
||||||
|
# Cost of replacing colors
|
||||||
|
remove_color_cost: 0
|
||||||
|
# Allowed some color and tags to be reverted to plain text
|
||||||
|
# Custom anvil will prioritise format that result is a smaller resulting text
|
||||||
|
# Note that not allowing certain format will lead to some lost of color or tags.
|
||||||
|
# If configuration are exact as append appending this book should result in the exact same color
|
||||||
|
#
|
||||||
|
# Color code will be prefixed by "&" and hexadecimal color by "#".
|
||||||
|
# If color code is allowed, "&" in the text will get converted to "&&"
|
||||||
|
# For minimessage see minimessage formating https://docs.papermc.io/adventure/minimessage/format/
|
||||||
|
allow_color_code: true
|
||||||
|
allow_hexadecimal_color: false
|
||||||
|
allow_minimessage: true
|
||||||
|
|
||||||
|
paper:
|
||||||
|
# Permission is ca.lore_edit.paper
|
||||||
|
use_permission: true
|
||||||
|
# what order should the lines should get added/removed (start/end, if invalid or not present will be end)
|
||||||
|
order: end
|
||||||
|
|
||||||
|
append_line:
|
||||||
|
# If adding lore line using paper is enabled
|
||||||
|
enabled: false
|
||||||
|
# Cost used every time
|
||||||
|
fixed_cost: 1
|
||||||
|
# Use left item vanilla cost penalty if any
|
||||||
|
shared_increase: false
|
||||||
|
# Increase shared left item cost penalty
|
||||||
|
shared_additive: false
|
||||||
|
# If adding the lore line consume the paper
|
||||||
|
do_consume: false
|
||||||
|
# Allow using color code and hexadecimal color when editing lore via book & quil
|
||||||
|
#
|
||||||
|
# Color code are prefixed by "&" and hexadecimal color by "#"
|
||||||
|
# Color code will not be applied if it colors nothing. "&&" can be used to write "&"
|
||||||
|
# For minimessage see minimessage formating https://docs.papermc.io/adventure/minimessage/format/
|
||||||
|
#
|
||||||
|
# Note that currently minimessage would disable hex code when adding color
|
||||||
|
allow_color_code: true
|
||||||
|
allow_hexadecimal_color: false
|
||||||
|
allow_minimessage: true
|
||||||
|
color_use_cost: 0
|
||||||
|
|
||||||
|
remove_line:
|
||||||
|
# If removing lore line using paper is enabled
|
||||||
|
enabled: false
|
||||||
|
# Cost used every time
|
||||||
|
fixed_cost: 1
|
||||||
|
# Use left item vanilla cost penalty if any
|
||||||
|
shared_increase: false
|
||||||
|
# Increase shared left item cost penalty
|
||||||
|
shared_additive: false
|
||||||
|
# If removing the lore line consume the paper
|
||||||
|
do_consume: false
|
||||||
|
# Cost of replacing colors
|
||||||
|
remove_color_cost: 0
|
||||||
|
# Allowed some color and tags to be reverted to plain text
|
||||||
|
# Custom anvil will prioritise format that result is a smaller resulting text
|
||||||
|
# Note that not allowing certain format will lead to some lost of color or tags.
|
||||||
|
# If configuration are exact as append appending this paper should result in the exact same color
|
||||||
|
#
|
||||||
|
# Color code will be prefixed by "&" and hexadecimal color by "#".
|
||||||
|
# If color code is allowed, "&" in the text will get converted to "&&"
|
||||||
|
# For minimessage see minimessage formating https://docs.papermc.io/adventure/minimessage/format/
|
||||||
|
allow_color_code: true
|
||||||
|
allow_hexadecimal_color: false
|
||||||
|
allow_minimessage: true
|
||||||
|
|
||||||
|
# Allow to replace the xp cost by a monetary cost
|
||||||
|
# If enabled it will not be bound to the experience level limits
|
||||||
|
#
|
||||||
|
# It also requires to enable dialog rename (set "enable_dialog_rename: false" a bit higher)
|
||||||
|
# If dialog rename permission is enabled and player do not have the permission merge will fall back to vanilla xp cost
|
||||||
|
#
|
||||||
|
# If you are using custom craft I recommend using Linear Xp Cost with Exact Linear Xp as normal Xp Cost will act "weird"
|
||||||
|
# But Linear Xp will act as 1$ time global multiplier. In other word: like you expect
|
||||||
|
#
|
||||||
|
# As this feature require dialog rename, it can only be enabled starting with paper 1.21.6 and later
|
||||||
|
monetary_cost:
|
||||||
|
enabled: false
|
||||||
|
# If using vault unlocked this allow to specify what currency should be used for anvil usage
|
||||||
|
# default being the default currency
|
||||||
|
currency: default
|
||||||
|
# multiply the anvil cost by a value to allow to have price a big bigger than like 40
|
||||||
|
multipliers:
|
||||||
|
# global multipliers. all usage type will be multiplied by this value
|
||||||
|
global: 1.0
|
||||||
|
# usage specific type. it will only apply for specific xp "reason"
|
||||||
|
enchantment: 1.0 # related to enchantments level
|
||||||
|
repair: 1.0 # for repairing via unit repair (per unit)
|
||||||
|
rename: 1.0 # for renaming the item
|
||||||
|
lore_edit: 1.0 # for changing the lore of the item (only if lore edit is enabled)
|
||||||
|
work_penalty: 1.0 # for work penalty (aka use penalty)
|
||||||
|
recipe: 1.0 # for custom anvil recipe cost
|
||||||
|
|
||||||
# Whether to show debug logging
|
# Whether to show debug logging
|
||||||
debug_log: false
|
debug_log: false
|
||||||
|
|
||||||
# Whether to show verbose debug logging
|
# Whether to show verbose debug logging
|
||||||
debug_log_verbose: false
|
debug_log_verbose: false
|
||||||
|
|
||||||
configVersion: 1.4.5
|
configVersion: 1.11.0
|
||||||
|
|
|
||||||
|
|
@ -17,158 +17,162 @@
|
||||||
# ----------------------------------------------------
|
# ----------------------------------------------------
|
||||||
|
|
||||||
restriction_aqua_affinity:
|
restriction_aqua_affinity:
|
||||||
enchantments: [ aqua_affinity ]
|
enchantments: [ minecraft:aqua_affinity ]
|
||||||
notAffectedGroups: [ enchanted_book, helmets ]
|
notAffectedGroups: [ enchanted_book, helmets ]
|
||||||
|
|
||||||
restriction_bane_of_arthropods:
|
restriction_bane_of_arthropods:
|
||||||
enchantments: [ bane_of_arthropods ]
|
enchantments: [ minecraft:bane_of_arthropods ]
|
||||||
notAffectedGroups: [ enchanted_book, melee_weapons ]
|
notAffectedGroups: [ enchanted_book, melee_weapons ]
|
||||||
|
|
||||||
restriction_blast_protection:
|
restriction_blast_protection:
|
||||||
enchantments: [ blast_protection ]
|
enchantments: [ minecraft:blast_protection ]
|
||||||
notAffectedGroups: [ enchanted_book, armors ]
|
notAffectedGroups: [ enchanted_book, armors ]
|
||||||
|
|
||||||
restriction_channeling:
|
restriction_channeling:
|
||||||
enchantments: [ channeling ]
|
enchantments: [ minecraft:channeling ]
|
||||||
notAffectedGroups: [ enchanted_book, trident ]
|
notAffectedGroups: [ enchanted_book, trident ]
|
||||||
|
|
||||||
restriction_binding_curse:
|
restriction_binding_curse:
|
||||||
enchantments: [ binding_curse ]
|
enchantments: [ minecraft:binding_curse ]
|
||||||
notAffectedGroups: [ enchanted_book, wearable ]
|
notAffectedGroups: [ enchanted_book, wearable ]
|
||||||
|
|
||||||
restriction_vanishing_curse:
|
restriction_vanishing_curse:
|
||||||
enchantments: [ vanishing_curse ]
|
enchantments: [ minecraft:vanishing_curse ]
|
||||||
notAffectedGroups: [ enchanted_book, can_vanish ]
|
notAffectedGroups: [ enchanted_book, can_vanish ]
|
||||||
|
|
||||||
restriction_depth_strider:
|
restriction_depth_strider:
|
||||||
enchantments: [ depth_strider ]
|
enchantments: [ minecraft:depth_strider ]
|
||||||
notAffectedGroups: [ enchanted_book, boots ]
|
notAffectedGroups: [ enchanted_book, boots ]
|
||||||
|
|
||||||
restriction_efficiency:
|
restriction_efficiency:
|
||||||
enchantments: [ efficiency ]
|
enchantments: [ minecraft:efficiency ]
|
||||||
notAffectedGroups: [ enchanted_book, tools, shears ]
|
notAffectedGroups: [ enchanted_book, tools, shears ]
|
||||||
|
|
||||||
restriction_feather_falling:
|
restriction_feather_falling:
|
||||||
enchantments: [ feather_falling ]
|
enchantments: [ minecraft:feather_falling ]
|
||||||
notAffectedGroups: [ enchanted_book, boots ]
|
notAffectedGroups: [ enchanted_book, boots ]
|
||||||
|
|
||||||
restriction_fire_aspect:
|
restriction_fire_aspect:
|
||||||
enchantments: [ fire_aspect ]
|
enchantments: [ minecraft:fire_aspect ]
|
||||||
notAffectedGroups: [ enchanted_book, swords ]
|
notAffectedGroups: [ enchanted_book, swords ]
|
||||||
|
|
||||||
restriction_fire_protection:
|
restriction_fire_protection:
|
||||||
enchantments: [ fire_protection ]
|
enchantments: [ minecraft:fire_protection ]
|
||||||
notAffectedGroups: [ enchanted_book, armors ]
|
notAffectedGroups: [ enchanted_book, armors ]
|
||||||
|
|
||||||
restriction_flame:
|
restriction_flame:
|
||||||
enchantments: [ flame ]
|
enchantments: [ minecraft:flame ]
|
||||||
notAffectedGroups: [ enchanted_book, bow ]
|
notAffectedGroups: [ enchanted_book, bow ]
|
||||||
|
|
||||||
restriction_fortune:
|
restriction_fortune:
|
||||||
enchantments: [ fortune ]
|
enchantments: [ minecraft:fortune ]
|
||||||
notAffectedGroups: [ enchanted_book, tools ]
|
notAffectedGroups: [ enchanted_book, tools ]
|
||||||
|
|
||||||
restriction_frost_walker:
|
restriction_frost_walker:
|
||||||
enchantments: [ frost_walker ]
|
enchantments: [ minecraft:frost_walker ]
|
||||||
notAffectedGroups: [ enchanted_book, boots ]
|
notAffectedGroups: [ enchanted_book, boots ]
|
||||||
|
|
||||||
restriction_impaling:
|
restriction_impaling:
|
||||||
enchantments: [ impaling ]
|
enchantments: [ minecraft:impaling ]
|
||||||
notAffectedGroups: [ enchanted_book, trident ]
|
notAffectedGroups: [ enchanted_book, trident ]
|
||||||
|
|
||||||
restriction_infinity:
|
restriction_infinity:
|
||||||
enchantments: [ infinity ]
|
enchantments: [ minecraft:infinity ]
|
||||||
notAffectedGroups: [ enchanted_book, bow ]
|
notAffectedGroups: [ enchanted_book, bow ]
|
||||||
|
|
||||||
restriction_knockback:
|
restriction_knockback:
|
||||||
enchantments: [ knockback ]
|
enchantments: [ minecraft:knockback ]
|
||||||
notAffectedGroups: [ enchanted_book, swords ]
|
notAffectedGroups: [ enchanted_book, swords ]
|
||||||
|
|
||||||
restriction_looting:
|
restriction_looting:
|
||||||
enchantments: [ looting ]
|
enchantments: [ minecraft:looting ]
|
||||||
notAffectedGroups: [ enchanted_book, swords ]
|
notAffectedGroups: [ enchanted_book, swords ]
|
||||||
|
|
||||||
restriction_loyalty:
|
restriction_loyalty:
|
||||||
enchantments: [ loyalty ]
|
enchantments: [ minecraft:loyalty ]
|
||||||
notAffectedGroups: [ enchanted_book, trident ]
|
notAffectedGroups: [ enchanted_book, trident ]
|
||||||
|
|
||||||
|
restriction_luck_of_the_sea:
|
||||||
|
enchantments: [ minecraft:luck_of_the_sea ]
|
||||||
|
notAffectedGroups: [ enchanted_book, fishing_rod ]
|
||||||
|
|
||||||
restriction_lure:
|
restriction_lure:
|
||||||
enchantments: [ lure ]
|
enchantments: [ minecraft:lure ]
|
||||||
notAffectedGroups: [ enchanted_book, fishing_rod ]
|
notAffectedGroups: [ enchanted_book, fishing_rod ]
|
||||||
|
|
||||||
restriction_mending:
|
restriction_mending:
|
||||||
enchantments: [ mending ]
|
enchantments: [ minecraft:mending ]
|
||||||
notAffectedGroups: [ enchanted_book, can_unbreak ]
|
notAffectedGroups: [ enchanted_book, can_unbreak ]
|
||||||
|
|
||||||
restriction_multishot:
|
restriction_minecraft_multishot:
|
||||||
enchantments: [ multishot ]
|
enchantments: [ minecraft:multishot ]
|
||||||
notAffectedGroups: [ enchanted_book, crossbow ]
|
notAffectedGroups: [ enchanted_book, crossbow ]
|
||||||
|
|
||||||
restriction_piercing:
|
restriction_piercing:
|
||||||
enchantments: [ piercing ]
|
enchantments: [ minecraft:piercing ]
|
||||||
notAffectedGroups: [ enchanted_book, crossbow ]
|
notAffectedGroups: [ enchanted_book, crossbow ]
|
||||||
|
|
||||||
restriction_power:
|
restriction_power:
|
||||||
enchantments: [ power ]
|
enchantments: [ minecraft:power ]
|
||||||
notAffectedGroups: [ enchanted_book, bow ]
|
notAffectedGroups: [ enchanted_book, bow ]
|
||||||
|
|
||||||
restriction_projectile_protection:
|
restriction_projectile_protection:
|
||||||
enchantments: [ projectile_protection ]
|
enchantments: [ minecraft:projectile_protection ]
|
||||||
notAffectedGroups: [ enchanted_book, armors ]
|
notAffectedGroups: [ enchanted_book, armors ]
|
||||||
|
|
||||||
restriction_protection:
|
restriction_protection:
|
||||||
enchantments: [ protection ]
|
enchantments: [ minecraft:protection ]
|
||||||
notAffectedGroups: [ enchanted_book, armors ]
|
notAffectedGroups: [ enchanted_book, armors ]
|
||||||
|
|
||||||
restriction_punch:
|
restriction_punch:
|
||||||
enchantments: [ punch ]
|
enchantments: [ minecraft:punch ]
|
||||||
notAffectedGroups: [ enchanted_book, bow ]
|
notAffectedGroups: [ enchanted_book, bow ]
|
||||||
|
|
||||||
restriction_quick_charge:
|
restriction_quick_charge:
|
||||||
enchantments: [ quick_charge ]
|
enchantments: [ minecraft:quick_charge ]
|
||||||
notAffectedGroups: [ enchanted_book, crossbow ]
|
notAffectedGroups: [ enchanted_book, crossbow ]
|
||||||
|
|
||||||
restriction_respiration:
|
restriction_respiration:
|
||||||
enchantments: [ respiration ]
|
enchantments: [ minecraft:respiration ]
|
||||||
notAffectedGroups: [ enchanted_book, helmets ]
|
notAffectedGroups: [ enchanted_book, helmets ]
|
||||||
|
|
||||||
restriction_riptide:
|
restriction_riptide:
|
||||||
enchantments: [ riptide ]
|
enchantments: [ minecraft:riptide ]
|
||||||
notAffectedGroups: [ enchanted_book, trident ]
|
notAffectedGroups: [ enchanted_book, trident ]
|
||||||
|
|
||||||
restriction_sharpness:
|
restriction_sharpness:
|
||||||
enchantments: [ sharpness ]
|
enchantments: [ minecraft:sharpness ]
|
||||||
notAffectedGroups: [ enchanted_book, melee_weapons ]
|
notAffectedGroups: [ enchanted_book, melee_weapons ]
|
||||||
|
|
||||||
restriction_silk_touch:
|
restriction__silk_touch:
|
||||||
enchantments: [ silk_touch ]
|
enchantments: [ minecraft:silk_touch ]
|
||||||
notAffectedGroups: [ enchanted_book, tools ]
|
notAffectedGroups: [ enchanted_book, tools ]
|
||||||
|
|
||||||
restriction_smite:
|
restriction_smite:
|
||||||
enchantments: [ smite ]
|
enchantments: [ minecraft:smite ]
|
||||||
notAffectedGroups: [ enchanted_book, melee_weapons ]
|
notAffectedGroups: [ enchanted_book, melee_weapons ]
|
||||||
|
|
||||||
restriction_soul_speed:
|
restriction_soul_speed:
|
||||||
enchantments: [ soul_speed ]
|
enchantments: [ minecraft:soul_speed ]
|
||||||
notAffectedGroups: [ enchanted_book, boots ]
|
notAffectedGroups: [ enchanted_book, boots ]
|
||||||
|
|
||||||
restriction_sweeping_edge:
|
restriction_sweeping_edge:
|
||||||
enchantments: [ sweeping, sweeping_edge ]
|
enchantments: [ minecraft:sweeping, minecraft:sweeping_edge ]
|
||||||
notAffectedGroups: [ enchanted_book, swords ]
|
notAffectedGroups: [ enchanted_book, swords ]
|
||||||
|
|
||||||
# Do not exist in 1.18, that mean useInFuture will be set to true
|
# Do not exist in 1.18, that mean useInFuture will be set to true
|
||||||
# useInFuture set to true also mean it will not warn if there is an issue
|
# useInFuture set to true also mean it will not warn if there is an issue
|
||||||
restriction_swift_sneak:
|
restriction_swift_sneak:
|
||||||
useInFuture: true
|
useInFuture: true
|
||||||
enchantments: [ swift_sneak ]
|
enchantments: [ minecraft:swift_sneak ]
|
||||||
notAffectedGroups: [ enchanted_book, leggings ]
|
notAffectedGroups: [ enchanted_book, leggings ]
|
||||||
|
|
||||||
restriction_thorns:
|
restriction_thorns:
|
||||||
enchantments: [ thorns ]
|
enchantments: [ minecraft:thorns ]
|
||||||
notAffectedGroups: [ enchanted_book, armors ]
|
notAffectedGroups: [ enchanted_book, armors ]
|
||||||
|
|
||||||
restriction_unbreaking:
|
restriction__unbreaking:
|
||||||
enchantments: [ unbreaking ]
|
enchantments: [ minecraft:unbreaking ]
|
||||||
notAffectedGroups: [ enchanted_book, can_unbreak ]
|
notAffectedGroups: [ enchanted_book, can_unbreak ]
|
||||||
|
|
||||||
# ----------------------------------------------------
|
# ----------------------------------------------------
|
||||||
|
|
@ -180,60 +184,60 @@ restriction_unbreaking:
|
||||||
|
|
||||||
sword_enchant_conflict:
|
sword_enchant_conflict:
|
||||||
enchantments:
|
enchantments:
|
||||||
- bane_of_arthropods
|
- minecraft:bane_of_arthropods
|
||||||
- smite
|
- minecraft:smite
|
||||||
- sharpness
|
- minecraft:sharpness
|
||||||
notAffectedGroups: [ ]
|
notAffectedGroups: [ ]
|
||||||
maxEnchantmentBeforeConflict: 1
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
protection_enchant_conflict:
|
protection_enchant_conflict:
|
||||||
enchantments:
|
enchantments:
|
||||||
- blast_protection
|
- minecraft:blast_protection
|
||||||
- fire_protection
|
- minecraft:fire_protection
|
||||||
- projectile_protection
|
- minecraft:projectile_protection
|
||||||
- protection
|
- minecraft:protection
|
||||||
notAffectedGroups: [ ]
|
notAffectedGroups: [ ]
|
||||||
maxEnchantmentBeforeConflict: 1
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
trident_conflict1:
|
trident_conflict1:
|
||||||
enchantments:
|
enchantments:
|
||||||
- channeling
|
- minecraft:channeling
|
||||||
- riptide
|
- minecraft:riptide
|
||||||
notAffectedGroups: [ ]
|
notAffectedGroups: [ ]
|
||||||
maxEnchantmentBeforeConflict: 1
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
trident_conflict2:
|
trident_conflict2:
|
||||||
enchantments:
|
enchantments:
|
||||||
- loyalty
|
- minecraft:loyalty
|
||||||
- riptide
|
- minecraft:riptide
|
||||||
notAffectedGroups: [ ]
|
notAffectedGroups: [ ]
|
||||||
maxEnchantmentBeforeConflict: 1
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
boot_conflict:
|
boot_conflict:
|
||||||
enchantments:
|
enchantments:
|
||||||
- depth_strider
|
- minecraft:depth_strider
|
||||||
- frost_walker
|
- minecraft:frost_walker
|
||||||
notAffectedGroups: [ ]
|
notAffectedGroups: [ ]
|
||||||
maxEnchantmentBeforeConflict: 1
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
tool_conflict:
|
tool_conflict:
|
||||||
enchantments:
|
enchantments:
|
||||||
- fortune
|
- minecraft:fortune
|
||||||
- silk_touch
|
- minecraft:silk_touch
|
||||||
notAffectedGroups: [ ]
|
notAffectedGroups: [ ]
|
||||||
maxEnchantmentBeforeConflict: 1
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
bow_conflict:
|
bow_conflict:
|
||||||
enchantments:
|
enchantments:
|
||||||
- mending
|
- minecraft:mending
|
||||||
- infinity
|
- minecraft:infinity
|
||||||
notAffectedGroups: [ ]
|
notAffectedGroups: [ ]
|
||||||
maxEnchantmentBeforeConflict: 1
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
crossbow_conflict:
|
crossbow_conflict:
|
||||||
enchantments:
|
enchantments:
|
||||||
- multishot
|
- minecraft:multishot
|
||||||
- piercing
|
- minecraft:piercing
|
||||||
notAffectedGroups: [ ]
|
notAffectedGroups: [ ]
|
||||||
maxEnchantmentBeforeConflict: 1
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
|
|
|
||||||
6
defaultconfigs/1.21.11/README.md
Normal file
6
defaultconfigs/1.21.11/README.md
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
### Default Plugin's Configurations For 1.21.11
|
||||||
|
- [config.yml](https://github.com/alexcrea/CustomAnvil/tree/master/defaultconfigs/1.21.11/config.yml)
|
||||||
|
- [enchant_conflict.yml](https://github.com/alexcrea/CustomAnvil/tree/master/defaultconfigs/1.21.11/enchant_conflict.yml)
|
||||||
|
- [item_groups.yml](https://github.com/alexcrea/CustomAnvil/tree/master/defaultconfigs/1.21.11/item_groups.yml)
|
||||||
|
- [unit_repair_item.yml](https://github.com/alexcrea/CustomAnvil/tree/master/defaultconfigs/1.21.11/unit_repair_item.yml)
|
||||||
|
- [custom_recipes.yml](https://github.com/alexcrea/CustomAnvil/tree/master/defaultconfigs/1.21.11/custom_recipes.yml)
|
||||||
487
defaultconfigs/1.21.11/config.yml
Normal file
487
defaultconfigs/1.21.11/config.yml
Normal file
|
|
@ -0,0 +1,487 @@
|
||||||
|
#
|
||||||
|
# It is recommended that you use /configanvil to edit theses config.
|
||||||
|
# You can still manually edit here if you like to. but if you do, don't forget to /anvilconfigreload after you changes !
|
||||||
|
#
|
||||||
|
|
||||||
|
# What service of metric should custom anvil use
|
||||||
|
# Custom anvil collect generic information like server minecraft version, type, etc...
|
||||||
|
# It can also collect error information if error is happening (currently faststats only)
|
||||||
|
# It can also be disabled
|
||||||
|
# Please refer to README for public metric link
|
||||||
|
# Possible options: auto, bstat, faststats, disabled (auto by default)
|
||||||
|
metric_type: auto
|
||||||
|
|
||||||
|
# Allow to report errors made caused by this plugin (only for faststats)
|
||||||
|
# This allows me to fix potentials issue that I'm not aware of
|
||||||
|
# Accept true or false (true by default)
|
||||||
|
metric_collect_errors: true
|
||||||
|
|
||||||
|
# All anvil cost will be capped to limit_repair_value if enabled.
|
||||||
|
#
|
||||||
|
# In other words:
|
||||||
|
# For any anvil cost greater than limit_repair_value, Cost will be set to limit_repair_value.
|
||||||
|
limit_repair_cost: false
|
||||||
|
|
||||||
|
# Max cost value the Anvil can get to.
|
||||||
|
#
|
||||||
|
# Valid values include 0 to 1000.
|
||||||
|
# Cost will be displayed as "Too Expensive":
|
||||||
|
# - If Cost is above 39
|
||||||
|
# - And replace_too_expensive is disabled (false)
|
||||||
|
limit_repair_value: 39
|
||||||
|
|
||||||
|
# Whether the anvil's cost limit should be removed entirely.
|
||||||
|
#
|
||||||
|
# The anvil will still visually display "Too Expensive" if "replace_too_expensive" is disabled
|
||||||
|
# However, the action will be completable if xp requirement is meet.
|
||||||
|
remove_repair_limit: false
|
||||||
|
|
||||||
|
# Whenever anvil cost is above 39 should display the true price and not "Too Expensive".
|
||||||
|
#
|
||||||
|
# However, when bypassing "Too Expensive", anvil price will be displayed as Green.
|
||||||
|
# If the action is not completable, the cost will still be displayed as "Too expensive".
|
||||||
|
# That mean you also need to change other settings like remove_repair_limit or limit_repair_cost.
|
||||||
|
#
|
||||||
|
# Require ProtocoLib.
|
||||||
|
replace_too_expensive: false
|
||||||
|
|
||||||
|
# XP Level amount added to the anvil when the item is repaired by another item of the same type
|
||||||
|
#
|
||||||
|
# Valid values include 0 to 1000
|
||||||
|
item_repair_cost: 2
|
||||||
|
|
||||||
|
# XP Level amount added to the anvil when the item is renamed
|
||||||
|
#
|
||||||
|
# Valid values include 0 to 1000
|
||||||
|
item_rename_cost: 1
|
||||||
|
|
||||||
|
# XP Level amount added to the anvil when the item is repaired by an "unit"
|
||||||
|
# For example: a Diamond on a Diamond Sword
|
||||||
|
# What's considered unit for what can be edited on the unit repair configuration.
|
||||||
|
#
|
||||||
|
# Valid values include 0 to 1000
|
||||||
|
unit_repair_cost: 1
|
||||||
|
|
||||||
|
# XP Level amount added to the anvil when a sacrifice enchantment
|
||||||
|
# conflict with one of the left item enchantment
|
||||||
|
#
|
||||||
|
# Valid values include 0 to 1000
|
||||||
|
sacrifice_illegal_enchant_cost: 1
|
||||||
|
|
||||||
|
# Allow using color code and hexadecimal color.
|
||||||
|
#
|
||||||
|
# Color code are prefixed by "&" and hexadecimal color by "#".
|
||||||
|
# Color code will not be applied if it colors nothing. "&&" can be used to write "&".
|
||||||
|
# For minimessage search for minimessage formating https://docs.papermc.io/adventure/minimessage/format/
|
||||||
|
# Note that only color and decoration tags are allowed for minimisage in the v1 version of this plugin
|
||||||
|
# but any global tag will be allowed later when v2 release
|
||||||
|
allow_color_code: false
|
||||||
|
allow_hexadecimal_color: false
|
||||||
|
allow_minimessage: false
|
||||||
|
|
||||||
|
# This enables restricting color code for player having specific permission
|
||||||
|
# It requires allow_color_code enabled for... obvious reasons
|
||||||
|
#
|
||||||
|
# For example: if player want to use "&aHello" it will be required that the player has
|
||||||
|
# the permission "ca.color.code.a" as he used the color code "a"
|
||||||
|
# In general permission to give to the player is "ca.color.code.[code]"
|
||||||
|
# where [code] is the color code you wish to allow the player
|
||||||
|
#
|
||||||
|
# It is kinda of useless when minimessage is supported as players would be able to bypass
|
||||||
|
# that using the equivalent minimessage tag
|
||||||
|
per_color_code_permission: false
|
||||||
|
|
||||||
|
# Toggle if color should only be applicable if the player a certain permission.
|
||||||
|
#
|
||||||
|
# permission are "ca.color.code" for use of color code and "ca.color.hex" for use of hexadecimal color.
|
||||||
|
permission_needed_for_color: true
|
||||||
|
|
||||||
|
# Xp cost if the player use color in the items name on rename.
|
||||||
|
#
|
||||||
|
# Valid values include 0 to 1000.
|
||||||
|
use_of_color_cost: 0
|
||||||
|
|
||||||
|
# Dialogue rename menu make use of dialog menu to allow bigger rename
|
||||||
|
# You can also change the maximum size and set it to -1 or less for maximum
|
||||||
|
#
|
||||||
|
# This feature only work on paper 1.21.7 or later
|
||||||
|
#
|
||||||
|
# At the moment only english is available for this menu... sorry !
|
||||||
|
#
|
||||||
|
# CustomAnvil use "ca.rename.dialog" when permission
|
||||||
|
enable_dialog_rename: false
|
||||||
|
dialog_rename_max_size: 256
|
||||||
|
permission_needed_for_dialog_rename: false
|
||||||
|
|
||||||
|
# This allows custom anvil to not "guess" the text used for rename but store it in the item
|
||||||
|
# It will make item stackable only and only if it had used the same rename text
|
||||||
|
#
|
||||||
|
# For practical reason. this only work when dialog rename is enabled
|
||||||
|
dialog_rename_keep_user_text: true
|
||||||
|
|
||||||
|
# Override limits for specific enchants
|
||||||
|
#
|
||||||
|
# Enchantments not listed here will use the value of default_limit
|
||||||
|
#
|
||||||
|
# Overrides provided default from aqua_affinity to depth_strider won't change effect with extra levels
|
||||||
|
#
|
||||||
|
# Valid range of 0 - 255 for each enchantment
|
||||||
|
# -1 mean keep default
|
||||||
|
enchant_limits:
|
||||||
|
minecraft:aqua_affinity: 1
|
||||||
|
minecraft:binding_curse: 1
|
||||||
|
minecraft:channeling: 1
|
||||||
|
minecraft:flame: 1
|
||||||
|
minecraft:infinity: 1
|
||||||
|
minecraft:mending: 1
|
||||||
|
minecraft:multishot: 1
|
||||||
|
minecraft:silk_touch: 1
|
||||||
|
minecraft:vanishing_curse: 1
|
||||||
|
minecraft:depth_strider: 3 # anything more than 3 is treated as 3 by the game
|
||||||
|
minecraft:protection: 4
|
||||||
|
minecraft:fire_protection: 4
|
||||||
|
minecraft:blast_protection: 4
|
||||||
|
minecraft:projectile_protection: 4
|
||||||
|
minecraft:feather_falling: 4
|
||||||
|
minecraft:thorns: 3
|
||||||
|
minecraft:respiration: 3
|
||||||
|
minecraft:sharpness: 5
|
||||||
|
minecraft:smite: 5
|
||||||
|
minecraft:bane_of_arthropods: 5
|
||||||
|
minecraft:knockback: 2
|
||||||
|
minecraft:fire_aspect: 2
|
||||||
|
minecraft:looting: 3
|
||||||
|
minecraft:sweeping: 3
|
||||||
|
minecraft:sweeping_edge: 3
|
||||||
|
minecraft:efficiency: 5
|
||||||
|
minecraft:unbreaking: 3
|
||||||
|
minecraft:fortune: 3
|
||||||
|
minecraft:power: 5
|
||||||
|
minecraft:punch: 2
|
||||||
|
minecraft:luck_of_the_sea: 3
|
||||||
|
minecraft:lure: 3
|
||||||
|
minecraft:frost_walker: 2
|
||||||
|
minecraft:impaling: 5
|
||||||
|
minecraft:riptide: 3
|
||||||
|
minecraft:loyalty: 3
|
||||||
|
minecraft:piercing: 4
|
||||||
|
minecraft:quick_charge: 3
|
||||||
|
minecraft:soul_speed: 3
|
||||||
|
minecraft:swift_sneak: 3
|
||||||
|
minecraft:density: 5
|
||||||
|
minecraft:breach: 4
|
||||||
|
minecraft:wind_burst: 3
|
||||||
|
minecraft:lunge: 3
|
||||||
|
|
||||||
|
# Multipliers used to calculate the enchantment's value in repair/combining
|
||||||
|
#
|
||||||
|
# Values here are pulled from the fandom wiki:
|
||||||
|
# https://minecraft.fandom.com/wiki/Anvil_mechanics#Costs_for_combining_enchantments
|
||||||
|
#
|
||||||
|
# If an enchantment is missing values here, or is less than 0, it will default to 0
|
||||||
|
#
|
||||||
|
# Calculated as: [Enchantment lvl] * [multiplier]
|
||||||
|
#
|
||||||
|
# With default values protection 4 would have a value of 4 when
|
||||||
|
# coming from either a book (4 * 1) or an item (4 * 1)
|
||||||
|
enchant_values:
|
||||||
|
minecraft:aqua_affinity:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:bane_of_arthropods:
|
||||||
|
item: 2
|
||||||
|
book: 1
|
||||||
|
minecraft:binding_curse:
|
||||||
|
item: 8
|
||||||
|
book: 4
|
||||||
|
minecraft:blast_protection:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:channeling:
|
||||||
|
item: 8
|
||||||
|
book: 4
|
||||||
|
minecraft:depth_strider:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:efficiency:
|
||||||
|
item: 1
|
||||||
|
book: 1
|
||||||
|
minecraft:flame:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:feather_falling:
|
||||||
|
item: 2
|
||||||
|
book: 1
|
||||||
|
minecraft:fire_aspect:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:fire_protection:
|
||||||
|
item: 2
|
||||||
|
book: 1
|
||||||
|
minecraft:fortune:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:frost_walker:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:impaling:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:infinity:
|
||||||
|
item: 8
|
||||||
|
book: 4
|
||||||
|
minecraft:knockback:
|
||||||
|
item: 2
|
||||||
|
book: 1
|
||||||
|
minecraft:looting:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:loyalty:
|
||||||
|
item: 1
|
||||||
|
book: 1
|
||||||
|
minecraft:luck_of_the_sea:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:lure:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:mending:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:multishot:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:piercing:
|
||||||
|
item: 1
|
||||||
|
book: 1
|
||||||
|
minecraft:power:
|
||||||
|
item: 1
|
||||||
|
book: 1
|
||||||
|
minecraft:projectile_protection:
|
||||||
|
item: 2
|
||||||
|
book: 1
|
||||||
|
minecraft:protection:
|
||||||
|
item: 1
|
||||||
|
book: 1
|
||||||
|
minecraft:punch:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:quick_charge:
|
||||||
|
item: 2
|
||||||
|
book: 1
|
||||||
|
minecraft:respiration:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:riptide:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:silk_touch:
|
||||||
|
item: 8
|
||||||
|
book: 4
|
||||||
|
minecraft:sharpness:
|
||||||
|
item: 1
|
||||||
|
book: 1
|
||||||
|
minecraft:smite:
|
||||||
|
item: 2
|
||||||
|
book: 1
|
||||||
|
minecraft:soul_speed:
|
||||||
|
item: 8
|
||||||
|
book: 4
|
||||||
|
minecraft:swift_sneak:
|
||||||
|
item: 8
|
||||||
|
book: 4
|
||||||
|
minecraft:sweeping:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:sweeping_edge:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:thorns:
|
||||||
|
item: 8
|
||||||
|
book: 4
|
||||||
|
minecraft:unbreaking:
|
||||||
|
item: 2
|
||||||
|
book: 1
|
||||||
|
minecraft:vanishing_curse:
|
||||||
|
item: 8
|
||||||
|
book: 4
|
||||||
|
minecraft:density:
|
||||||
|
item: 2
|
||||||
|
book: 1
|
||||||
|
minecraft:breach:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:wind_burst:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:lunge:
|
||||||
|
item: 2
|
||||||
|
book: 1
|
||||||
|
|
||||||
|
# Disable enchantment merging for level above the set value
|
||||||
|
# Enchantment merging is when, for example, 2 unbreaking II book combine to give sharpness III
|
||||||
|
# But Enchantment above this value can still be applied. following the previous example, we could still apply a unbreaking III book to a sword
|
||||||
|
# Even if disable-merge-over of unbreaking is set to 2
|
||||||
|
# -1 mean enchantment merge for this enchantment is not disabled. default to -1 if absent.
|
||||||
|
disable-merge-over:
|
||||||
|
# Sharpness is set to -1. it equivalent to it not being set to anything (and work as vanilla on default configuration)
|
||||||
|
minecraft:sharpness: -1
|
||||||
|
# If uncommented. 2 unbreaking II book would not give an unbreaking III book. but unbreaking III book can still be applied
|
||||||
|
# minecraft:unbreaking: 2
|
||||||
|
|
||||||
|
# The maximum number of enchantment an item can get. -1 for infinity
|
||||||
|
# Use eco enchant enchant_limit if present by default unless "default" is not equal to -1
|
||||||
|
enchantment_count_limit:
|
||||||
|
default: -1
|
||||||
|
# Limit for specific items. example bellow is an example with stick
|
||||||
|
# Per item enchantment limit override eco enchant enchant_limit and default limit
|
||||||
|
items:
|
||||||
|
stick: -1
|
||||||
|
|
||||||
|
# Settings for lore modification
|
||||||
|
lore_edit:
|
||||||
|
book_and_quil:
|
||||||
|
# Permission is ca.lore_edit.book
|
||||||
|
use_permission: true
|
||||||
|
append:
|
||||||
|
# If adding lore using book & quil is enabled
|
||||||
|
enabled: false
|
||||||
|
# Cost used every time
|
||||||
|
fixed_cost: 1
|
||||||
|
# Cost used for every lore line added
|
||||||
|
per_line_cost: 0
|
||||||
|
# Use left item vanilla cost penalty if any
|
||||||
|
shared_increase: false
|
||||||
|
# Increase shared left item cost penalty
|
||||||
|
shared_additive: false
|
||||||
|
# If adding the lore consume the book & quil
|
||||||
|
do_consume: false
|
||||||
|
# Allow using color code and hexadecimal color when editing lore via book & quil
|
||||||
|
#
|
||||||
|
# Color code are prefixed by "&" and hexadecimal color by "#"
|
||||||
|
# Color code will not be applied if it colors nothing. "&&" can be used to write "&"
|
||||||
|
# For minimessage see minimessage formating https://docs.papermc.io/adventure/minimessage/format/
|
||||||
|
#
|
||||||
|
# Note that currently minimessage would disable hex code when adding color
|
||||||
|
allow_color_code: true
|
||||||
|
allow_hexadecimal_color: false
|
||||||
|
allow_minimessage: true
|
||||||
|
use_cost: 0
|
||||||
|
|
||||||
|
remove:
|
||||||
|
# If removing lore using book & quil is enabled
|
||||||
|
enabled: false
|
||||||
|
# Cost used every time
|
||||||
|
fixed_cost: 1
|
||||||
|
# Cost used for every lore line removed
|
||||||
|
per_line_cost: 0
|
||||||
|
# Use left item vanilla cost penalty if any
|
||||||
|
shared_increase: false
|
||||||
|
# Increase shared left item cost penalty
|
||||||
|
shared_additive: false
|
||||||
|
# If removing the lore consume the book & quil
|
||||||
|
do_consume: false
|
||||||
|
# Cost of replacing colors
|
||||||
|
remove_color_cost: 0
|
||||||
|
# Allowed some color and tags to be reverted to plain text
|
||||||
|
# Custom anvil will prioritise format that result is a smaller resulting text
|
||||||
|
# Note that not allowing certain format will lead to some lost of color or tags.
|
||||||
|
# If configuration are exact as append appending this book should result in the exact same color
|
||||||
|
#
|
||||||
|
# Color code will be prefixed by "&" and hexadecimal color by "#".
|
||||||
|
# If color code is allowed, "&" in the text will get converted to "&&"
|
||||||
|
# For minimessage see minimessage formating https://docs.papermc.io/adventure/minimessage/format/
|
||||||
|
allow_color_code: true
|
||||||
|
allow_hexadecimal_color: false
|
||||||
|
allow_minimessage: true
|
||||||
|
|
||||||
|
paper:
|
||||||
|
# Permission is ca.lore_edit.paper
|
||||||
|
use_permission: true
|
||||||
|
# what order should the lines should get added/removed (start/end, if invalid or not present will be end)
|
||||||
|
order: end
|
||||||
|
|
||||||
|
append_line:
|
||||||
|
# If adding lore line using paper is enabled
|
||||||
|
enabled: false
|
||||||
|
# Cost used every time
|
||||||
|
fixed_cost: 1
|
||||||
|
# Use left item vanilla cost penalty if any
|
||||||
|
shared_increase: false
|
||||||
|
# Increase shared left item cost penalty
|
||||||
|
shared_additive: false
|
||||||
|
# If adding the lore line consume the paper
|
||||||
|
do_consume: false
|
||||||
|
# Allow using color code and hexadecimal color when editing lore via book & quil
|
||||||
|
#
|
||||||
|
# Color code are prefixed by "&" and hexadecimal color by "#"
|
||||||
|
# Color code will not be applied if it colors nothing. "&&" can be used to write "&"
|
||||||
|
# For minimessage see minimessage formating https://docs.papermc.io/adventure/minimessage/format/
|
||||||
|
#
|
||||||
|
# Note that currently minimessage would disable hex code when adding color
|
||||||
|
allow_color_code: true
|
||||||
|
allow_hexadecimal_color: false
|
||||||
|
allow_minimessage: true
|
||||||
|
color_use_cost: 0
|
||||||
|
use_cost: 0
|
||||||
|
|
||||||
|
remove_line:
|
||||||
|
# If removing lore line using paper is enabled
|
||||||
|
enabled: false
|
||||||
|
# Cost used every time
|
||||||
|
fixed_cost: 1
|
||||||
|
# Use left item vanilla cost penalty if any
|
||||||
|
shared_increase: false
|
||||||
|
# Increase shared left item cost penalty
|
||||||
|
shared_additive: false
|
||||||
|
# If removing the lore line consume the paper
|
||||||
|
do_consume: false
|
||||||
|
# Cost of replacing colors
|
||||||
|
remove_color_cost: 0
|
||||||
|
# Allowed some color and tags to be reverted to plain text
|
||||||
|
# Custom anvil will prioritise format that result is a smaller resulting text
|
||||||
|
# Note that not allowing certain format will lead to some lost of color or tags.
|
||||||
|
# If configuration are exact as append appending this paper should result in the exact same color
|
||||||
|
#
|
||||||
|
# Color code will be prefixed by "&" and hexadecimal color by "#".
|
||||||
|
# If color code is allowed, "&" in the text will get converted to "&&"
|
||||||
|
# For minimessage see minimessage formating https://docs.papermc.io/adventure/minimessage/format/
|
||||||
|
allow_color_code: true
|
||||||
|
allow_hexadecimal_color: false
|
||||||
|
allow_minimessage: true
|
||||||
|
|
||||||
|
# Allow to replace the xp cost by a monetary cost
|
||||||
|
# If enabled it will not be bound to the experience level limits
|
||||||
|
#
|
||||||
|
# It also requires to enable dialog rename (set "enable_dialog_rename: false" a bit higher)
|
||||||
|
# If dialog rename permission is enabled and player do not have the permission merge will fall back to vanilla xp cost
|
||||||
|
#
|
||||||
|
# If you are using custom craft I recommend using Linear Xp Cost with Exact Linear Xp as normal Xp Cost will act "weird"
|
||||||
|
# But Linear Xp will act as 1$ time global multiplier. In other word: like you expect
|
||||||
|
#
|
||||||
|
# As this feature require dialog rename, it can only be enabled starting with paper 1.21.6 and later
|
||||||
|
monetary_cost:
|
||||||
|
enabled: false
|
||||||
|
# If using vault unlocked this allow to specify what currency should be used for anvil usage
|
||||||
|
# default being the default currency
|
||||||
|
currency: default
|
||||||
|
# multiply the anvil cost by a value to allow to have price a big bigger than like 40
|
||||||
|
multipliers:
|
||||||
|
# global multipliers. all usage type will be multiplied by this value
|
||||||
|
global: 1.0
|
||||||
|
# usage specific type. it will only apply for specific xp "reason"
|
||||||
|
enchantment: 1.0 # related to enchantments level
|
||||||
|
repair: 1.0 # for repairing via unit repair (per unit)
|
||||||
|
rename: 1.0 # for renaming the item
|
||||||
|
lore_edit: 1.0 # for changing the lore of the item (only if lore edit is enabled)
|
||||||
|
work_penalty: 1.0 # for work penalty (aka use penalty)
|
||||||
|
recipe: 1.0 # for custom anvil recipe cost
|
||||||
|
|
||||||
|
# Whether to show debug logging
|
||||||
|
debug_log: false
|
||||||
|
|
||||||
|
# Whether to show verbose debug logging
|
||||||
|
debug_log_verbose: false
|
||||||
|
|
||||||
|
configVersion: 1.15.5
|
||||||
|
lowMinecraftVersion: 1.21.11
|
||||||
5
defaultconfigs/1.21.11/custom_recipes.yml
Normal file
5
defaultconfigs/1.21.11/custom_recipes.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
# ----------------------------------------------------
|
||||||
|
# This config file is to store custom craft
|
||||||
|
# It is recommended to use the in game config editor for this configuration.
|
||||||
|
# /customanvilconfig With ca.config.edit permission
|
||||||
|
# ----------------------------------------------------
|
||||||
398
defaultconfigs/1.21.11/enchant_conflict.yml
Normal file
398
defaultconfigs/1.21.11/enchant_conflict.yml
Normal file
|
|
@ -0,0 +1,398 @@
|
||||||
|
#
|
||||||
|
# It is recommended that you use /configanvil to edit theses config.
|
||||||
|
# You can still manually edit here if you like to. but if you do, don't forget to /anvilconfigreload after you changes !
|
||||||
|
#
|
||||||
|
|
||||||
|
# material conflicts
|
||||||
|
#
|
||||||
|
# If you want to edit this file:
|
||||||
|
# - A conflict will apply to every item except if in one of the notAffectedGroups group
|
||||||
|
# - the conflict will count only if the user try to combine at least as
|
||||||
|
# many conflicting enchantment as "maxEnchantmentBeforeConflict"
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# ----------------------------------------------------
|
||||||
|
# These restriction are about not allowing enchantment
|
||||||
|
# on illegal items
|
||||||
|
# ----------------------------------------------------
|
||||||
|
|
||||||
|
restriction_aqua_affinity:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:aqua_affinity
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- helmets
|
||||||
|
|
||||||
|
restriction_bane_of_arthropods:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:bane_of_arthropods
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- melee_weapons
|
||||||
|
- mace
|
||||||
|
|
||||||
|
restriction_blast_protection:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:blast_protection
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- armors
|
||||||
|
|
||||||
|
restriction_channeling:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:channeling
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- trident
|
||||||
|
|
||||||
|
restriction_binding_curse:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:binding_curse
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- wearable
|
||||||
|
|
||||||
|
restriction_vanishing_curse:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:vanishing_curse
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- can_vanish
|
||||||
|
|
||||||
|
restriction_depth_strider:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:depth_strider
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- boots
|
||||||
|
|
||||||
|
restriction_efficiency:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:efficiency
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- tools
|
||||||
|
- shears
|
||||||
|
|
||||||
|
restriction_feather_falling:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:feather_falling
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- boots
|
||||||
|
|
||||||
|
restriction_fire_aspect:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:fire_aspect
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- swords
|
||||||
|
- mace
|
||||||
|
- spears
|
||||||
|
|
||||||
|
restriction_fire_protection:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:fire_protection
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- armors
|
||||||
|
|
||||||
|
restriction_flame:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:flame
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- bow
|
||||||
|
|
||||||
|
restriction_fortune:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:fortune
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- tools
|
||||||
|
|
||||||
|
restriction_frost_walker:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:frost_walker
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- boots
|
||||||
|
|
||||||
|
restriction_impaling:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:impaling
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- trident
|
||||||
|
|
||||||
|
restriction_infinity:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:infinity
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- bow
|
||||||
|
|
||||||
|
restriction_knockback:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:knockback
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- swords
|
||||||
|
- spears
|
||||||
|
|
||||||
|
restriction_looting:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:looting
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- swords
|
||||||
|
- spears
|
||||||
|
|
||||||
|
restriction_loyalty:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:loyalty
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- trident
|
||||||
|
|
||||||
|
restriction_luck_of_the_sea:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:luck_of_the_sea
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- fishing_rod
|
||||||
|
|
||||||
|
restriction_lure:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:lure
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- fishing_rod
|
||||||
|
|
||||||
|
restriction_mending:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:mending
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- can_unbreak
|
||||||
|
|
||||||
|
restriction_minecraft_multishot:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:multishot
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- crossbow
|
||||||
|
|
||||||
|
restriction_piercing:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:piercing
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- crossbow
|
||||||
|
|
||||||
|
restriction_power:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:power
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- bow
|
||||||
|
|
||||||
|
restriction_projectile_protection:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:projectile_protection
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- armors
|
||||||
|
|
||||||
|
restriction_protection:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:protection
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- armors
|
||||||
|
|
||||||
|
restriction_punch:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:punch
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- bow
|
||||||
|
|
||||||
|
restriction_quick_charge:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:quick_charge
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- crossbow
|
||||||
|
|
||||||
|
restriction_respiration:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:respiration
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- helmets
|
||||||
|
|
||||||
|
restriction_riptide:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:riptide
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- trident
|
||||||
|
|
||||||
|
restriction_sharpness:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:sharpness
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- melee_weapons
|
||||||
|
|
||||||
|
restriction__silk_touch:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:silk_touch
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- tools
|
||||||
|
|
||||||
|
restriction_smite:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:smite
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- melee_weapons
|
||||||
|
- mace
|
||||||
|
|
||||||
|
restriction_soul_speed:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:soul_speed
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- boots
|
||||||
|
|
||||||
|
restriction_sweeping_edge:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:sweeping
|
||||||
|
- minecraft:sweeping_edge
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- swords
|
||||||
|
|
||||||
|
# Do not exist in 1.18, that mean useInFuture will be set to true
|
||||||
|
# useInFuture set to true also mean it will not warn if there is an issue
|
||||||
|
restriction_swift_sneak:
|
||||||
|
useInFuture: true
|
||||||
|
enchantments:
|
||||||
|
- minecraft:swift_sneak
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- leggings
|
||||||
|
|
||||||
|
restriction_thorns:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:thorns
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- armors
|
||||||
|
|
||||||
|
restriction__unbreaking:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:unbreaking
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- can_unbreak
|
||||||
|
|
||||||
|
# ----------------------------------------------------
|
||||||
|
# Now we have conflicts about enchantment Incompatibility
|
||||||
|
# We just filtered what item enchantments can be applied
|
||||||
|
# notAffectedGroups is empty as we don't want anything to not respect theses rules
|
||||||
|
# maxEnchantmentBeforeConflict is set to 1 to only have 1 on those enchantment available
|
||||||
|
# ----------------------------------------------------
|
||||||
|
|
||||||
|
sword_enchant_conflict:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:bane_of_arthropods
|
||||||
|
- minecraft:smite
|
||||||
|
- minecraft:sharpness
|
||||||
|
- minecraft:density
|
||||||
|
- minecraft:breach
|
||||||
|
notAffectedGroups: []
|
||||||
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
|
protection_enchant_conflict:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:blast_protection
|
||||||
|
- minecraft:fire_protection
|
||||||
|
- minecraft:projectile_protection
|
||||||
|
- minecraft:protection
|
||||||
|
notAffectedGroups: []
|
||||||
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
|
trident_conflict1:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:channeling
|
||||||
|
- minecraft:riptide
|
||||||
|
notAffectedGroups: []
|
||||||
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
|
trident_conflict2:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:loyalty
|
||||||
|
- minecraft:riptide
|
||||||
|
notAffectedGroups: []
|
||||||
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
|
boot_conflict:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:depth_strider
|
||||||
|
- minecraft:frost_walker
|
||||||
|
notAffectedGroups: []
|
||||||
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
|
tool_conflict:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:fortune
|
||||||
|
- minecraft:silk_touch
|
||||||
|
notAffectedGroups: []
|
||||||
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
|
bow_conflict:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:mending
|
||||||
|
- minecraft:infinity
|
||||||
|
notAffectedGroups: []
|
||||||
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
|
crossbow_conflict:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:multishot
|
||||||
|
- minecraft:piercing
|
||||||
|
notAffectedGroups: []
|
||||||
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
restriction_density:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:density
|
||||||
|
notAffectedGroups:
|
||||||
|
- mace
|
||||||
|
- enchanted_book
|
||||||
|
restriction_breach:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:breach
|
||||||
|
notAffectedGroups:
|
||||||
|
- mace
|
||||||
|
- enchanted_book
|
||||||
|
restriction_wind_burst:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:wind_burst
|
||||||
|
notAffectedGroups:
|
||||||
|
- mace
|
||||||
|
- enchanted_book
|
||||||
|
restriction_lunge:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:lunge
|
||||||
|
notAffectedGroups:
|
||||||
|
- spears
|
||||||
|
- enchanted_book
|
||||||
|
|
||||||
|
# ----------------------------------------------------
|
||||||
|
# Bellow is for custom conflicts.
|
||||||
|
# This is also where conflict create from the gui will be placed.
|
||||||
|
# ----------------------------------------------------
|
||||||
247
defaultconfigs/1.21.11/item_groups.yml
Normal file
247
defaultconfigs/1.21.11/item_groups.yml
Normal file
|
|
@ -0,0 +1,247 @@
|
||||||
|
#
|
||||||
|
# It is recommended that you use /configanvil to edit theses config.
|
||||||
|
# You can still manually edit here if you like to. but if you do, don't forget to /anvilconfigreload after you changes !
|
||||||
|
#
|
||||||
|
|
||||||
|
# Please note this config use spigot material names.
|
||||||
|
# It should match minecraft name in most case, maybe every case, but I can't be sure
|
||||||
|
# In case there an issue with material name, you can found them here:
|
||||||
|
# https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
|
||||||
|
|
||||||
|
# An empty Exclude group exclude nothing, so it contain everything
|
||||||
|
everything:
|
||||||
|
type: exclude
|
||||||
|
|
||||||
|
# An empty include group will include nothing
|
||||||
|
nothing:
|
||||||
|
type: include
|
||||||
|
|
||||||
|
# This group is an example of a group including only stone and polished granite
|
||||||
|
example_include:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- stone
|
||||||
|
- polished_granite
|
||||||
|
|
||||||
|
# This group contain everything except polished granite and elements of example_include
|
||||||
|
example_exclude:
|
||||||
|
type: exclude
|
||||||
|
items:
|
||||||
|
- polished_granite
|
||||||
|
groups:
|
||||||
|
- example_include
|
||||||
|
|
||||||
|
# Default configuration should be vanilla enchantment conflict group
|
||||||
|
# there may have error, if you find one you can fix it !
|
||||||
|
# https://minecraft.fandom.com/wiki/Enchanting
|
||||||
|
|
||||||
|
swords:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- wooden_sword
|
||||||
|
- stone_sword
|
||||||
|
- iron_sword
|
||||||
|
- diamond_sword
|
||||||
|
- golden_sword
|
||||||
|
- netherite_sword
|
||||||
|
- copper_sword
|
||||||
|
|
||||||
|
axes:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- wooden_axe
|
||||||
|
- stone_axe
|
||||||
|
- iron_axe
|
||||||
|
- diamond_axe
|
||||||
|
- golden_axe
|
||||||
|
- netherite_axe
|
||||||
|
- copper_axe
|
||||||
|
|
||||||
|
melee_weapons:
|
||||||
|
type: include
|
||||||
|
groups:
|
||||||
|
- swords
|
||||||
|
- axes
|
||||||
|
- spears
|
||||||
|
|
||||||
|
helmets:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- leather_helmet
|
||||||
|
- chainmail_helmet
|
||||||
|
- iron_helmet
|
||||||
|
- diamond_helmet
|
||||||
|
- golden_helmet
|
||||||
|
- netherite_helmet
|
||||||
|
- turtle_helmet
|
||||||
|
- copper_helmet
|
||||||
|
|
||||||
|
chestplate:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- leather_chestplate
|
||||||
|
- chainmail_chestplate
|
||||||
|
- iron_chestplate
|
||||||
|
- diamond_chestplate
|
||||||
|
- golden_chestplate
|
||||||
|
- netherite_chestplate
|
||||||
|
- copper_chestplate
|
||||||
|
|
||||||
|
leggings:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- leather_leggings
|
||||||
|
- chainmail_leggings
|
||||||
|
- iron_leggings
|
||||||
|
- diamond_leggings
|
||||||
|
- golden_leggings
|
||||||
|
- netherite_leggings
|
||||||
|
- copper_leggings
|
||||||
|
|
||||||
|
boots:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- leather_boots
|
||||||
|
- chainmail_boots
|
||||||
|
- iron_boots
|
||||||
|
- diamond_boots
|
||||||
|
- golden_boots
|
||||||
|
- netherite_boots
|
||||||
|
- copper_boots
|
||||||
|
|
||||||
|
armors:
|
||||||
|
type: include
|
||||||
|
groups:
|
||||||
|
- helmets
|
||||||
|
- chestplate
|
||||||
|
- leggings
|
||||||
|
- boots
|
||||||
|
|
||||||
|
wearable:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- elytra
|
||||||
|
- carved_pumpkin
|
||||||
|
- skeleton_skull
|
||||||
|
- wither_skeleton_skull
|
||||||
|
- zombie_head
|
||||||
|
- player_head
|
||||||
|
- creeper_head
|
||||||
|
- dragon_head
|
||||||
|
- piglin_head
|
||||||
|
groups:
|
||||||
|
- armors
|
||||||
|
|
||||||
|
pickaxes:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- wooden_pickaxe
|
||||||
|
- stone_pickaxe
|
||||||
|
- iron_pickaxe
|
||||||
|
- diamond_pickaxe
|
||||||
|
- golden_pickaxe
|
||||||
|
- netherite_pickaxe
|
||||||
|
- copper_pickaxe
|
||||||
|
|
||||||
|
shovels:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- wooden_shovel
|
||||||
|
- stone_shovel
|
||||||
|
- iron_shovel
|
||||||
|
- diamond_shovel
|
||||||
|
- golden_shovel
|
||||||
|
- netherite_shovel
|
||||||
|
- copper_shovel
|
||||||
|
|
||||||
|
hoes:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- wooden_hoe
|
||||||
|
- stone_hoe
|
||||||
|
- iron_hoe
|
||||||
|
- diamond_hoe
|
||||||
|
- golden_hoe
|
||||||
|
- netherite_hoe
|
||||||
|
- copper_hoe
|
||||||
|
|
||||||
|
tools:
|
||||||
|
type: include
|
||||||
|
groups:
|
||||||
|
- pickaxes
|
||||||
|
- shovels
|
||||||
|
- hoes
|
||||||
|
- axes
|
||||||
|
|
||||||
|
enchanted_book:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- enchanted_book
|
||||||
|
|
||||||
|
trident:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- trident
|
||||||
|
|
||||||
|
bow:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- bow
|
||||||
|
|
||||||
|
crossbow:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- crossbow
|
||||||
|
|
||||||
|
fishing_rod:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- fishing_rod
|
||||||
|
|
||||||
|
shears:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- shears
|
||||||
|
|
||||||
|
can_unbreak:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- elytra
|
||||||
|
- flint_and_steel
|
||||||
|
- shield
|
||||||
|
- carrot_on_a_stick
|
||||||
|
- warped_fungus_on_a_stick
|
||||||
|
- brush
|
||||||
|
groups:
|
||||||
|
- melee_weapons
|
||||||
|
- tools
|
||||||
|
- armors
|
||||||
|
- trident
|
||||||
|
- bow
|
||||||
|
- crossbow
|
||||||
|
- fishing_rod
|
||||||
|
- shears
|
||||||
|
- mace
|
||||||
|
|
||||||
|
can_vanish:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- compass
|
||||||
|
groups:
|
||||||
|
- wearable
|
||||||
|
- can_unbreak
|
||||||
|
mace:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- mace
|
||||||
|
spears:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- wooden_spear
|
||||||
|
- golden_spear
|
||||||
|
- stone_spear
|
||||||
|
- copper_spear
|
||||||
|
- iron_spear
|
||||||
|
- diamond_spear
|
||||||
|
- netherite_spear
|
||||||
|
|
||||||
220
defaultconfigs/1.21.11/unit_repair_item.yml
Normal file
220
defaultconfigs/1.21.11/unit_repair_item.yml
Normal file
|
|
@ -0,0 +1,220 @@
|
||||||
|
#
|
||||||
|
# It is recommended that you use /configanvil to edit theses config.
|
||||||
|
# You can still manually edit here if you like to. but if you do, don't forget to /anvilconfigreload after you changes !
|
||||||
|
#
|
||||||
|
|
||||||
|
# Unit repair configuration
|
||||||
|
#
|
||||||
|
# This configuration is to make custom unit repair
|
||||||
|
# A unit repair is, for example, a diamond to repair a diamond sword
|
||||||
|
# In vanilla, a unit repair 25% of object durability
|
||||||
|
# you can make a custom value here
|
||||||
|
#
|
||||||
|
# Item name should NOT combine caps and no caps (example: Stone)
|
||||||
|
|
||||||
|
# Default value if the config is an invalid value (value <= 0 )
|
||||||
|
# If value > 1 it will be treated as being = 1
|
||||||
|
default_repair_amount: 0.25
|
||||||
|
|
||||||
|
# You can add custom unit repair
|
||||||
|
# The example bellow make a shield repaired by 10% by sticks
|
||||||
|
|
||||||
|
# stick:
|
||||||
|
# shield: 0.10
|
||||||
|
|
||||||
|
|
||||||
|
# Vanilla unit repair group is bellow
|
||||||
|
diamond:
|
||||||
|
diamond_helmet: 0.25
|
||||||
|
diamond_chestplate: 0.25
|
||||||
|
diamond_leggings: 0.25
|
||||||
|
diamond_boots: 0.25
|
||||||
|
diamond_sword: 0.25
|
||||||
|
diamond_pickaxe: 0.25
|
||||||
|
diamond_axe: 0.25
|
||||||
|
diamond_shovel: 0.25
|
||||||
|
diamond_hoe: 0.25
|
||||||
|
diamond_spear: 0.25
|
||||||
|
|
||||||
|
netherite_ingot:
|
||||||
|
netherite_helmet: 0.25
|
||||||
|
netherite_chestplate: 0.25
|
||||||
|
netherite_leggings: 0.25
|
||||||
|
netherite_boots: 0.25
|
||||||
|
netherite_sword: 0.25
|
||||||
|
netherite_pickaxe: 0.25
|
||||||
|
netherite_axe: 0.25
|
||||||
|
netherite_shovel: 0.25
|
||||||
|
netherite_hoe: 0.25
|
||||||
|
netherite_spear: 0.25
|
||||||
|
|
||||||
|
gold_ingot:
|
||||||
|
golden_helmet: 0.25
|
||||||
|
golden_chestplate: 0.25
|
||||||
|
golden_leggings: 0.25
|
||||||
|
golden_boots: 0.25
|
||||||
|
golden_sword: 0.25
|
||||||
|
golden_pickaxe: 0.25
|
||||||
|
golden_axe: 0.25
|
||||||
|
golden_shovel: 0.25
|
||||||
|
golden_hoe: 0.25
|
||||||
|
golden_spear: 0.25
|
||||||
|
|
||||||
|
iron_ingot:
|
||||||
|
iron_helmet: 0.25
|
||||||
|
iron_chestplate: 0.25
|
||||||
|
iron_leggings: 0.25
|
||||||
|
iron_boots: 0.25
|
||||||
|
iron_sword: 0.25
|
||||||
|
iron_pickaxe: 0.25
|
||||||
|
iron_axe: 0.25
|
||||||
|
iron_shovel: 0.25
|
||||||
|
iron_hoe: 0.25
|
||||||
|
iron_spear: 0.25
|
||||||
|
|
||||||
|
cobblestone:
|
||||||
|
stone_sword: 0.25
|
||||||
|
stone_pickaxe: 0.25
|
||||||
|
stone_axe: 0.25
|
||||||
|
stone_shovel: 0.25
|
||||||
|
stone_hoe: 0.25
|
||||||
|
stone_spear: 0.25
|
||||||
|
|
||||||
|
cobbled_deepslate:
|
||||||
|
stone_sword: 0.25
|
||||||
|
stone_pickaxe: 0.25
|
||||||
|
stone_axe: 0.25
|
||||||
|
stone_shovel: 0.25
|
||||||
|
stone_hoe: 0.25
|
||||||
|
stone_spear: 0.25
|
||||||
|
|
||||||
|
blackstone:
|
||||||
|
stone_sword: 0.25
|
||||||
|
stone_pickaxe: 0.25
|
||||||
|
stone_axe: 0.25
|
||||||
|
stone_shovel: 0.25
|
||||||
|
stone_hoe: 0.25
|
||||||
|
|
||||||
|
leather:
|
||||||
|
leather_helmet: 0.25
|
||||||
|
leather_chestplate: 0.25
|
||||||
|
leather_leggings: 0.25
|
||||||
|
leather_boots: 0.25
|
||||||
|
|
||||||
|
phantom_membrane:
|
||||||
|
elytra: 0.25
|
||||||
|
|
||||||
|
scute:
|
||||||
|
turtle_helmet: 0.25
|
||||||
|
|
||||||
|
oak_planks:
|
||||||
|
wooden_sword: 0.25
|
||||||
|
wooden_pickaxe: 0.25
|
||||||
|
wooden_axe: 0.25
|
||||||
|
wooden_shovel: 0.25
|
||||||
|
wooden_hoe: 0.25
|
||||||
|
shield: 0.25
|
||||||
|
wooden_spear: 0.25
|
||||||
|
|
||||||
|
spruce_planks:
|
||||||
|
wooden_sword: 0.25
|
||||||
|
wooden_pickaxe: 0.25
|
||||||
|
wooden_axe: 0.25
|
||||||
|
wooden_shovel: 0.25
|
||||||
|
wooden_hoe: 0.25
|
||||||
|
shield: 0.25
|
||||||
|
wooden_spear: 0.25
|
||||||
|
|
||||||
|
birch_planks:
|
||||||
|
wooden_sword: 0.25
|
||||||
|
wooden_pickaxe: 0.25
|
||||||
|
wooden_axe: 0.25
|
||||||
|
wooden_shovel: 0.25
|
||||||
|
wooden_hoe: 0.25
|
||||||
|
shield: 0.25
|
||||||
|
wooden_spear: 0.25
|
||||||
|
|
||||||
|
jungle_planks:
|
||||||
|
wooden_sword: 0.25
|
||||||
|
wooden_pickaxe: 0.25
|
||||||
|
wooden_axe: 0.25
|
||||||
|
wooden_shovel: 0.25
|
||||||
|
wooden_hoe: 0.25
|
||||||
|
shield: 0.25
|
||||||
|
wooden_spear: 0.25
|
||||||
|
|
||||||
|
acacia_planks:
|
||||||
|
wooden_sword: 0.25
|
||||||
|
wooden_pickaxe: 0.25
|
||||||
|
wooden_axe: 0.25
|
||||||
|
wooden_shovel: 0.25
|
||||||
|
wooden_hoe: 0.25
|
||||||
|
shield: 0.25
|
||||||
|
wooden_spear: 0.25
|
||||||
|
|
||||||
|
dark_oak_planks:
|
||||||
|
wooden_sword: 0.25
|
||||||
|
wooden_pickaxe: 0.25
|
||||||
|
wooden_axe: 0.25
|
||||||
|
wooden_shovel: 0.25
|
||||||
|
wooden_hoe: 0.25
|
||||||
|
shield: 0.25
|
||||||
|
wooden_spear: 0.25
|
||||||
|
|
||||||
|
mangrove_planks:
|
||||||
|
wooden_sword: 0.25
|
||||||
|
wooden_pickaxe: 0.25
|
||||||
|
wooden_axe: 0.25
|
||||||
|
wooden_shovel: 0.25
|
||||||
|
wooden_hoe: 0.25
|
||||||
|
shield: 0.25
|
||||||
|
wooden_spear: 0.25
|
||||||
|
|
||||||
|
cherry_planks:
|
||||||
|
wooden_sword: 0.25
|
||||||
|
wooden_pickaxe: 0.25
|
||||||
|
wooden_axe: 0.25
|
||||||
|
wooden_shovel: 0.25
|
||||||
|
wooden_hoe: 0.25
|
||||||
|
shield: 0.25
|
||||||
|
wooden_spear: 0.25
|
||||||
|
|
||||||
|
bamboo_planks:
|
||||||
|
wooden_sword: 0.25
|
||||||
|
wooden_pickaxe: 0.25
|
||||||
|
wooden_axe: 0.25
|
||||||
|
wooden_shovel: 0.25
|
||||||
|
wooden_hoe: 0.25
|
||||||
|
shield: 0.25
|
||||||
|
wooden_spear: 0.25
|
||||||
|
|
||||||
|
crimson_planks:
|
||||||
|
wooden_sword: 0.25
|
||||||
|
wooden_pickaxe: 0.25
|
||||||
|
wooden_axe: 0.25
|
||||||
|
wooden_shovel: 0.25
|
||||||
|
wooden_hoe: 0.25
|
||||||
|
shield: 0.25
|
||||||
|
wooden_spear: 0.25
|
||||||
|
|
||||||
|
warped_planks:
|
||||||
|
wooden_sword: 0.25
|
||||||
|
wooden_pickaxe: 0.25
|
||||||
|
wooden_axe: 0.25
|
||||||
|
wooden_shovel: 0.25
|
||||||
|
wooden_hoe: 0.25
|
||||||
|
shield: 0.25
|
||||||
|
wooden_spear: 0.25
|
||||||
|
breeze_rod:
|
||||||
|
mace: 0.25
|
||||||
|
copper_ingot:
|
||||||
|
copper_helmet: 0.25
|
||||||
|
copper_chestplate: 0.25
|
||||||
|
copper_leggings: 0.25
|
||||||
|
copper_boots: 0.25
|
||||||
|
copper_pickaxe: 0.25
|
||||||
|
copper_shovel: 0.25
|
||||||
|
copper_hoe: 0.25
|
||||||
|
copper_axe: 0.25
|
||||||
|
copper_sword: 0.25
|
||||||
|
copper_spear: 0.25
|
||||||
6
defaultconfigs/1.21.9/README.md
Normal file
6
defaultconfigs/1.21.9/README.md
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
### Default Plugin's Configurations For 1.21.9
|
||||||
|
- [config.yml](https://github.com/alexcrea/CustomAnvil/tree/master/defaultconfigs/1.21.9/config.yml)
|
||||||
|
- [enchant_conflict.yml](https://github.com/alexcrea/CustomAnvil/tree/master/defaultconfigs/1.21.9/enchant_conflict.yml)
|
||||||
|
- [item_groups.yml](https://github.com/alexcrea/CustomAnvil/tree/master/defaultconfigs/1.21.9/item_groups.yml)
|
||||||
|
- [unit_repair_item.yml](https://github.com/alexcrea/CustomAnvil/tree/master/defaultconfigs/1.21.9/unit_repair_item.yml)
|
||||||
|
- [custom_recipes.yml](https://github.com/alexcrea/CustomAnvil/tree/master/defaultconfigs/1.21.9/custom_recipes.yml)
|
||||||
479
defaultconfigs/1.21.9/config.yml
Normal file
479
defaultconfigs/1.21.9/config.yml
Normal file
|
|
@ -0,0 +1,479 @@
|
||||||
|
#
|
||||||
|
# It is recommended that you use /configanvil to edit theses config.
|
||||||
|
# You can still manually edit here if you like to. but if you do, don't forget to /anvilconfigreload after you changes !
|
||||||
|
#
|
||||||
|
|
||||||
|
# What service of metric should custom anvil use
|
||||||
|
# Custom anvil collect generic information like server minecraft version, type, etc...
|
||||||
|
# It can also collect error information if error is happening (currently faststats only)
|
||||||
|
# It can also be disabled
|
||||||
|
# Please refer to README for public metric link
|
||||||
|
# Possible options: auto, bstat, faststats, disabled (auto by default)
|
||||||
|
metric_type: auto
|
||||||
|
|
||||||
|
# Allow to report errors made caused by this plugin (only for faststats)
|
||||||
|
# This allows me to fix potentials issue that I'm not aware of
|
||||||
|
# Accept true or false (true by default)
|
||||||
|
metric_collect_errors: true
|
||||||
|
|
||||||
|
# All anvil cost will be capped to limit_repair_value if enabled.
|
||||||
|
#
|
||||||
|
# In other words:
|
||||||
|
# For any anvil cost greater than limit_repair_value, Cost will be set to limit_repair_value.
|
||||||
|
limit_repair_cost: false
|
||||||
|
|
||||||
|
# Max cost value the Anvil can get to.
|
||||||
|
#
|
||||||
|
# Valid values include 0 to 1000.
|
||||||
|
# Cost will be displayed as "Too Expensive":
|
||||||
|
# - If Cost is above 39
|
||||||
|
# - And replace_too_expensive is disabled (false)
|
||||||
|
limit_repair_value: 39
|
||||||
|
|
||||||
|
# Whether the anvil's cost limit should be removed entirely.
|
||||||
|
#
|
||||||
|
# The anvil will still visually display "Too Expensive" if "replace_too_expensive" is disabled
|
||||||
|
# However, the action will be completable if xp requirement is meet.
|
||||||
|
remove_repair_limit: false
|
||||||
|
|
||||||
|
# Whenever anvil cost is above 39 should display the true price and not "Too Expensive".
|
||||||
|
#
|
||||||
|
# However, when bypassing "Too Expensive", anvil price will be displayed as Green.
|
||||||
|
# If the action is not completable, the cost will still be displayed as "Too expensive".
|
||||||
|
# That mean you also need to change other settings like remove_repair_limit or limit_repair_cost.
|
||||||
|
#
|
||||||
|
# Require ProtocoLib.
|
||||||
|
replace_too_expensive: false
|
||||||
|
|
||||||
|
# XP Level amount added to the anvil when the item is repaired by another item of the same type
|
||||||
|
#
|
||||||
|
# Valid values include 0 to 1000
|
||||||
|
item_repair_cost: 2
|
||||||
|
|
||||||
|
# XP Level amount added to the anvil when the item is renamed
|
||||||
|
#
|
||||||
|
# Valid values include 0 to 1000
|
||||||
|
item_rename_cost: 1
|
||||||
|
|
||||||
|
# XP Level amount added to the anvil when the item is repaired by an "unit"
|
||||||
|
# For example: a Diamond on a Diamond Sword
|
||||||
|
# What's considered unit for what can be edited on the unit repair configuration.
|
||||||
|
#
|
||||||
|
# Valid values include 0 to 1000
|
||||||
|
unit_repair_cost: 1
|
||||||
|
|
||||||
|
# XP Level amount added to the anvil when a sacrifice enchantment
|
||||||
|
# conflict with one of the left item enchantment
|
||||||
|
#
|
||||||
|
# Valid values include 0 to 1000
|
||||||
|
sacrifice_illegal_enchant_cost: 1
|
||||||
|
|
||||||
|
# Allow using color code and hexadecimal color.
|
||||||
|
#
|
||||||
|
# Color code are prefixed by "&" and hexadecimal color by "#".
|
||||||
|
# Color code will not be applied if it colors nothing. "&&" can be used to write "&".
|
||||||
|
# For minimessage search for minimessage formating https://docs.papermc.io/adventure/minimessage/format/
|
||||||
|
allow_color_code: false
|
||||||
|
allow_hexadecimal_color: false
|
||||||
|
allow_minimessage: false
|
||||||
|
|
||||||
|
# This enables restricting color code for player having specific permission
|
||||||
|
# It requires allow_color_code enabled for... obvious reasons
|
||||||
|
#
|
||||||
|
# For example: if player want to use "&aHello" it will be required that the player has
|
||||||
|
# the permission "ca.color.code.a" as he used the color code "a"
|
||||||
|
# In general permission to give to the player is "ca.color.code.[code]"
|
||||||
|
# where [code] is the color code you wish to allow the player
|
||||||
|
#
|
||||||
|
# It is kinda of useless when minimessage is supported as players would be able to bypass
|
||||||
|
# that using the equivalent minimessage tag
|
||||||
|
per_color_code_permission: false
|
||||||
|
|
||||||
|
# Toggle if color should only be applicable if the player a certain permission.
|
||||||
|
#
|
||||||
|
# permission are "ca.color.code" for use of color code and "ca.color.hex" for use of hexadecimal color.
|
||||||
|
permission_needed_for_color: true
|
||||||
|
|
||||||
|
# Xp cost if the player use color in the items name on rename.
|
||||||
|
#
|
||||||
|
# Valid values include 0 to 1000.
|
||||||
|
use_of_color_cost: 0
|
||||||
|
|
||||||
|
# Dialogue rename menu make use of dialog menu to allow bigger rename
|
||||||
|
# You can also change the maximum size and set it to -1 or less for maximum
|
||||||
|
#
|
||||||
|
# This feature only work on paper 1.21.7 or later
|
||||||
|
#
|
||||||
|
# At the moment only english is available for this menu... sorry !
|
||||||
|
#
|
||||||
|
# CustomAnvil use "ca.rename.dialog" when permission
|
||||||
|
enable_dialog_rename: false
|
||||||
|
dialog_rename_max_size: 256
|
||||||
|
permission_needed_for_dialog_rename: false
|
||||||
|
|
||||||
|
# This allows custom anvil to not "guess" the text used for rename but store it in the item
|
||||||
|
# It will make item stackable only and only if it had used the same rename text
|
||||||
|
#
|
||||||
|
# For practical reason. this only work when dialog rename is enabled
|
||||||
|
dialog_rename_keep_user_text: true
|
||||||
|
|
||||||
|
# Override limits for specific enchants
|
||||||
|
#
|
||||||
|
# Enchantments not listed here will use the value of default_limit
|
||||||
|
#
|
||||||
|
# Overrides provided default from aqua_affinity to depth_strider won't change effect with extra levels
|
||||||
|
#
|
||||||
|
# Valid range of 0 - 255 for each enchantment
|
||||||
|
# -1 mean keep default
|
||||||
|
enchant_limits:
|
||||||
|
minecraft:aqua_affinity: 1
|
||||||
|
minecraft:binding_curse: 1
|
||||||
|
minecraft:channeling: 1
|
||||||
|
minecraft:flame: 1
|
||||||
|
minecraft:infinity: 1
|
||||||
|
minecraft:mending: 1
|
||||||
|
minecraft:multishot: 1
|
||||||
|
minecraft:silk_touch: 1
|
||||||
|
minecraft:vanishing_curse: 1
|
||||||
|
minecraft:depth_strider: 3 # anything more than 3 is treated as 3 by the game
|
||||||
|
minecraft:protection: 4
|
||||||
|
minecraft:fire_protection: 4
|
||||||
|
minecraft:blast_protection: 4
|
||||||
|
minecraft:projectile_protection: 4
|
||||||
|
minecraft:feather_falling: 4
|
||||||
|
minecraft:thorns: 3
|
||||||
|
minecraft:respiration: 3
|
||||||
|
minecraft:sharpness: 5
|
||||||
|
minecraft:smite: 5
|
||||||
|
minecraft:bane_of_arthropods: 5
|
||||||
|
minecraft:knockback: 2
|
||||||
|
minecraft:fire_aspect: 2
|
||||||
|
minecraft:looting: 3
|
||||||
|
minecraft:sweeping: 3
|
||||||
|
minecraft:sweeping_edge: 3
|
||||||
|
minecraft:efficiency: 5
|
||||||
|
minecraft:unbreaking: 3
|
||||||
|
minecraft:fortune: 3
|
||||||
|
minecraft:power: 5
|
||||||
|
minecraft:punch: 2
|
||||||
|
minecraft:luck_of_the_sea: 3
|
||||||
|
minecraft:lure: 3
|
||||||
|
minecraft:frost_walker: 2
|
||||||
|
minecraft:impaling: 5
|
||||||
|
minecraft:riptide: 3
|
||||||
|
minecraft:loyalty: 3
|
||||||
|
minecraft:piercing: 4
|
||||||
|
minecraft:quick_charge: 3
|
||||||
|
minecraft:soul_speed: 3
|
||||||
|
minecraft:swift_sneak: 3
|
||||||
|
minecraft:density: 5
|
||||||
|
minecraft:breach: 4
|
||||||
|
minecraft:wind_burst: 3
|
||||||
|
|
||||||
|
# Multipliers used to calculate the enchantment's value in repair/combining
|
||||||
|
#
|
||||||
|
# Values here are pulled from the fandom wiki:
|
||||||
|
# https://minecraft.fandom.com/wiki/Anvil_mechanics#Costs_for_combining_enchantments
|
||||||
|
#
|
||||||
|
# If an enchantment is missing values here, or is less than 0, it will default to 0
|
||||||
|
#
|
||||||
|
# Calculated as: [Enchantment lvl] * [multiplier]
|
||||||
|
#
|
||||||
|
# With default values protection 4 would have a value of 4 when
|
||||||
|
# coming from either a book (4 * 1) or an item (4 * 1)
|
||||||
|
enchant_values:
|
||||||
|
minecraft:aqua_affinity:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:bane_of_arthropods:
|
||||||
|
item: 2
|
||||||
|
book: 1
|
||||||
|
minecraft:binding_curse:
|
||||||
|
item: 8
|
||||||
|
book: 4
|
||||||
|
minecraft:blast_protection:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:channeling:
|
||||||
|
item: 8
|
||||||
|
book: 4
|
||||||
|
minecraft:depth_strider:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:efficiency:
|
||||||
|
item: 1
|
||||||
|
book: 1
|
||||||
|
minecraft:flame:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:feather_falling:
|
||||||
|
item: 2
|
||||||
|
book: 1
|
||||||
|
minecraft:fire_aspect:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:fire_protection:
|
||||||
|
item: 2
|
||||||
|
book: 1
|
||||||
|
minecraft:fortune:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:frost_walker:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:impaling:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:infinity:
|
||||||
|
item: 8
|
||||||
|
book: 4
|
||||||
|
minecraft:knockback:
|
||||||
|
item: 2
|
||||||
|
book: 1
|
||||||
|
minecraft:looting:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:loyalty:
|
||||||
|
item: 1
|
||||||
|
book: 1
|
||||||
|
minecraft:luck_of_the_sea:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:lure:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:mending:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:multishot:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:piercing:
|
||||||
|
item: 1
|
||||||
|
book: 1
|
||||||
|
minecraft:power:
|
||||||
|
item: 1
|
||||||
|
book: 1
|
||||||
|
minecraft:projectile_protection:
|
||||||
|
item: 2
|
||||||
|
book: 1
|
||||||
|
minecraft:protection:
|
||||||
|
item: 1
|
||||||
|
book: 1
|
||||||
|
minecraft:punch:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:quick_charge:
|
||||||
|
item: 2
|
||||||
|
book: 1
|
||||||
|
minecraft:respiration:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:riptide:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:silk_touch:
|
||||||
|
item: 8
|
||||||
|
book: 4
|
||||||
|
minecraft:sharpness:
|
||||||
|
item: 1
|
||||||
|
book: 1
|
||||||
|
minecraft:smite:
|
||||||
|
item: 2
|
||||||
|
book: 1
|
||||||
|
minecraft:soul_speed:
|
||||||
|
item: 8
|
||||||
|
book: 4
|
||||||
|
minecraft:swift_sneak:
|
||||||
|
item: 8
|
||||||
|
book: 4
|
||||||
|
minecraft:sweeping:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:sweeping_edge:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:thorns:
|
||||||
|
item: 8
|
||||||
|
book: 4
|
||||||
|
minecraft:unbreaking:
|
||||||
|
item: 2
|
||||||
|
book: 1
|
||||||
|
minecraft:vanishing_curse:
|
||||||
|
item: 8
|
||||||
|
book: 4
|
||||||
|
minecraft:density:
|
||||||
|
item: 2
|
||||||
|
book: 1
|
||||||
|
minecraft:breach:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
minecraft:wind_burst:
|
||||||
|
item: 4
|
||||||
|
book: 2
|
||||||
|
|
||||||
|
# Disable enchantment merging for level above the set value
|
||||||
|
# Enchantment merging is when, for example, 2 unbreaking II book combine to give sharpness III
|
||||||
|
# But Enchantment above this value can still be applied. following the previous example, we could still apply a unbreaking III book to a sword
|
||||||
|
# Even if disable-merge-over of unbreaking is set to 2
|
||||||
|
# -1 mean enchantment merge for this enchantment is not disabled. default to -1 if absent.
|
||||||
|
disable-merge-over:
|
||||||
|
# Sharpness is set to -1. it equivalent to it not being set to anything (and work as vanilla on default configuration)
|
||||||
|
minecraft:sharpness: -1
|
||||||
|
# If uncommented. 2 unbreaking II book would not give an unbreaking III book. but unbreaking III book can still be applied
|
||||||
|
# minecraft:unbreaking: 2
|
||||||
|
|
||||||
|
# The maximum number of enchantment an item can get. -1 for infinity
|
||||||
|
# Use eco enchant enchant_limit if present by default unless "default" is not equal to -1
|
||||||
|
enchantment_count_limit:
|
||||||
|
default: -1
|
||||||
|
# Limit for specific items. example bellow is an example with stick
|
||||||
|
# Per item enchantment limit override eco enchant enchant_limit and default limit
|
||||||
|
items:
|
||||||
|
stick: -1
|
||||||
|
|
||||||
|
# Settings for lore modification
|
||||||
|
lore_edit:
|
||||||
|
book_and_quil:
|
||||||
|
# Permission is ca.lore_edit.book
|
||||||
|
use_permission: true
|
||||||
|
append:
|
||||||
|
# If adding lore using book & quil is enabled
|
||||||
|
enabled: false
|
||||||
|
# Cost used every time
|
||||||
|
fixed_cost: 1
|
||||||
|
# Cost used for every lore line added
|
||||||
|
per_line_cost: 0
|
||||||
|
# Use left item vanilla cost penalty if any
|
||||||
|
shared_increase: false
|
||||||
|
# Increase shared left item cost penalty
|
||||||
|
shared_additive: false
|
||||||
|
# If adding the lore consume the book & quil
|
||||||
|
do_consume: false
|
||||||
|
# Allow using color code and hexadecimal color when editing lore via book & quil
|
||||||
|
#
|
||||||
|
# Color code are prefixed by "&" and hexadecimal color by "#"
|
||||||
|
# Color code will not be applied if it colors nothing. "&&" can be used to write "&"
|
||||||
|
# For minimessage see minimessage formating https://docs.papermc.io/adventure/minimessage/format/
|
||||||
|
#
|
||||||
|
# Note that currently minimessage would disable hex code when adding color
|
||||||
|
allow_color_code: true
|
||||||
|
allow_hexadecimal_color: false
|
||||||
|
allow_minimessage: true
|
||||||
|
|
||||||
|
remove:
|
||||||
|
# If removing lore using book & quil is enabled
|
||||||
|
enabled: false
|
||||||
|
# Cost used every time
|
||||||
|
fixed_cost: 1
|
||||||
|
# Cost used for every lore line removed
|
||||||
|
per_line_cost: 0
|
||||||
|
# Use left item vanilla cost penalty if any
|
||||||
|
shared_increase: false
|
||||||
|
# Increase shared left item cost penalty
|
||||||
|
shared_additive: false
|
||||||
|
# If removing the lore consume the book & quil
|
||||||
|
do_consume: false
|
||||||
|
# Cost of replacing colors
|
||||||
|
remove_color_cost: 0
|
||||||
|
# Allowed some color and tags to be reverted to plain text
|
||||||
|
# Custom anvil will prioritise format that result is a smaller resulting text
|
||||||
|
# Note that not allowing certain format will lead to some lost of color or tags.
|
||||||
|
# If configuration are exact as append appending this book should result in the exact same color
|
||||||
|
#
|
||||||
|
# Color code will be prefixed by "&" and hexadecimal color by "#".
|
||||||
|
# If color code is allowed, "&" in the text will get converted to "&&"
|
||||||
|
# For minimessage see minimessage formating https://docs.papermc.io/adventure/minimessage/format/
|
||||||
|
allow_color_code: true
|
||||||
|
allow_hexadecimal_color: false
|
||||||
|
allow_minimessage: true
|
||||||
|
|
||||||
|
paper:
|
||||||
|
# Permission is ca.lore_edit.paper
|
||||||
|
use_permission: true
|
||||||
|
# what order should the lines should get added/removed (start/end, if invalid or not present will be end)
|
||||||
|
order: end
|
||||||
|
|
||||||
|
append_line:
|
||||||
|
# If adding lore line using paper is enabled
|
||||||
|
enabled: false
|
||||||
|
# Cost used every time
|
||||||
|
fixed_cost: 1
|
||||||
|
# Use left item vanilla cost penalty if any
|
||||||
|
shared_increase: false
|
||||||
|
# Increase shared left item cost penalty
|
||||||
|
shared_additive: false
|
||||||
|
# If adding the lore line consume the paper
|
||||||
|
do_consume: false
|
||||||
|
# Allow using color code and hexadecimal color when editing lore via book & quil
|
||||||
|
#
|
||||||
|
# Color code are prefixed by "&" and hexadecimal color by "#"
|
||||||
|
# Color code will not be applied if it colors nothing. "&&" can be used to write "&"
|
||||||
|
# For minimessage see minimessage formating https://docs.papermc.io/adventure/minimessage/format/
|
||||||
|
#
|
||||||
|
# Note that currently minimessage would disable hex code when adding color
|
||||||
|
allow_color_code: true
|
||||||
|
allow_hexadecimal_color: false
|
||||||
|
allow_minimessage: true
|
||||||
|
color_use_cost: 0
|
||||||
|
|
||||||
|
remove_line:
|
||||||
|
# If removing lore line using paper is enabled
|
||||||
|
enabled: false
|
||||||
|
# Cost used every time
|
||||||
|
fixed_cost: 1
|
||||||
|
# Use left item vanilla cost penalty if any
|
||||||
|
shared_increase: false
|
||||||
|
# Increase shared left item cost penalty
|
||||||
|
shared_additive: false
|
||||||
|
# If removing the lore line consume the paper
|
||||||
|
do_consume: false
|
||||||
|
# Cost of replacing colors
|
||||||
|
remove_color_cost: 0
|
||||||
|
# Allowed some color and tags to be reverted to plain text
|
||||||
|
# Custom anvil will prioritise format that result is a smaller resulting text
|
||||||
|
# Note that not allowing certain format will lead to some lost of color or tags.
|
||||||
|
# If configuration are exact as append appending this paper should result in the exact same color
|
||||||
|
#
|
||||||
|
# Color code will be prefixed by "&" and hexadecimal color by "#".
|
||||||
|
# If color code is allowed, "&" in the text will get converted to "&&"
|
||||||
|
# For minimessage see minimessage formating https://docs.papermc.io/adventure/minimessage/format/
|
||||||
|
allow_color_code: true
|
||||||
|
allow_hexadecimal_color: false
|
||||||
|
allow_minimessage: true
|
||||||
|
|
||||||
|
# Allow to replace the xp cost by a monetary cost
|
||||||
|
# If enabled it will not be bound to the experience level limits
|
||||||
|
#
|
||||||
|
# It also requires to enable dialog rename (set "enable_dialog_rename: false" a bit higher)
|
||||||
|
# If dialog rename permission is enabled and player do not have the permission merge will fall back to vanilla xp cost
|
||||||
|
#
|
||||||
|
# If you are using custom craft I recommend using Linear Xp Cost with Exact Linear Xp as normal Xp Cost will act "weird"
|
||||||
|
# But Linear Xp will act as 1$ time global multiplier. In other word: like you expect
|
||||||
|
#
|
||||||
|
# As this feature require dialog rename, it can only be enabled starting with paper 1.21.6 and later
|
||||||
|
monetary_cost:
|
||||||
|
enabled: false
|
||||||
|
# If using vault unlocked this allow to specify what currency should be used for anvil usage
|
||||||
|
# default being the default currency
|
||||||
|
currency: default
|
||||||
|
# multiply the anvil cost by a value to allow to have price a big bigger than like 40
|
||||||
|
multipliers:
|
||||||
|
# global multipliers. all usage type will be multiplied by this value
|
||||||
|
global: 1.0
|
||||||
|
# usage specific type. it will only apply for specific xp "reason"
|
||||||
|
enchantment: 1.0 # related to enchantments level
|
||||||
|
repair: 1.0 # for repairing via unit repair (per unit)
|
||||||
|
rename: 1.0 # for renaming the item
|
||||||
|
lore_edit: 1.0 # for changing the lore of the item (only if lore edit is enabled)
|
||||||
|
work_penalty: 1.0 # for work penalty (aka use penalty)
|
||||||
|
recipe: 1.0 # for custom anvil recipe cost
|
||||||
|
|
||||||
|
# Whether to show debug logging
|
||||||
|
debug_log: false
|
||||||
|
|
||||||
|
# Whether to show verbose debug logging
|
||||||
|
debug_log_verbose: false
|
||||||
|
|
||||||
|
configVersion: 1.11.0
|
||||||
|
lowMinecraftVersion: 1.21.9
|
||||||
5
defaultconfigs/1.21.9/custom_recipes.yml
Normal file
5
defaultconfigs/1.21.9/custom_recipes.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
# ----------------------------------------------------
|
||||||
|
# This config file is to store custom craft
|
||||||
|
# It is recommended to use the in game config editor for this configuration.
|
||||||
|
# /customanvilconfig With ca.config.edit permission
|
||||||
|
# ----------------------------------------------------
|
||||||
389
defaultconfigs/1.21.9/enchant_conflict.yml
Normal file
389
defaultconfigs/1.21.9/enchant_conflict.yml
Normal file
|
|
@ -0,0 +1,389 @@
|
||||||
|
#
|
||||||
|
# It is recommended that you use /configanvil to edit theses config.
|
||||||
|
# You can still manually edit here if you like to. but if you do, don't forget to /anvilconfigreload after you changes !
|
||||||
|
#
|
||||||
|
|
||||||
|
# material conflicts
|
||||||
|
#
|
||||||
|
# If you want to edit this file:
|
||||||
|
# - A conflict will apply to every item except if in one of the notAffectedGroups group
|
||||||
|
# - the conflict will count only if the user try to combine at least as
|
||||||
|
# many conflicting enchantment as "maxEnchantmentBeforeConflict"
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# ----------------------------------------------------
|
||||||
|
# These restriction are about not allowing enchantment
|
||||||
|
# on illegal items
|
||||||
|
# ----------------------------------------------------
|
||||||
|
|
||||||
|
restriction_aqua_affinity:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:aqua_affinity
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- helmets
|
||||||
|
|
||||||
|
restriction_bane_of_arthropods:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:bane_of_arthropods
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- melee_weapons
|
||||||
|
- mace
|
||||||
|
|
||||||
|
restriction_blast_protection:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:blast_protection
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- armors
|
||||||
|
|
||||||
|
restriction_channeling:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:channeling
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- trident
|
||||||
|
|
||||||
|
restriction_binding_curse:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:binding_curse
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- wearable
|
||||||
|
|
||||||
|
restriction_vanishing_curse:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:vanishing_curse
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- can_vanish
|
||||||
|
|
||||||
|
restriction_depth_strider:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:depth_strider
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- boots
|
||||||
|
|
||||||
|
restriction_efficiency:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:efficiency
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- tools
|
||||||
|
- shears
|
||||||
|
|
||||||
|
restriction_feather_falling:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:feather_falling
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- boots
|
||||||
|
|
||||||
|
restriction_fire_aspect:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:fire_aspect
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- swords
|
||||||
|
- mace
|
||||||
|
|
||||||
|
restriction_fire_protection:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:fire_protection
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- armors
|
||||||
|
|
||||||
|
restriction_flame:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:flame
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- bow
|
||||||
|
|
||||||
|
restriction_fortune:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:fortune
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- tools
|
||||||
|
|
||||||
|
restriction_frost_walker:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:frost_walker
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- boots
|
||||||
|
|
||||||
|
restriction_impaling:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:impaling
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- trident
|
||||||
|
|
||||||
|
restriction_infinity:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:infinity
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- bow
|
||||||
|
|
||||||
|
restriction_knockback:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:knockback
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- swords
|
||||||
|
|
||||||
|
restriction_looting:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:looting
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- swords
|
||||||
|
|
||||||
|
restriction_loyalty:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:loyalty
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- trident
|
||||||
|
|
||||||
|
restriction_luck_of_the_sea:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:luck_of_the_sea
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- fishing_rod
|
||||||
|
|
||||||
|
restriction_lure:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:lure
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- fishing_rod
|
||||||
|
|
||||||
|
restriction_mending:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:mending
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- can_unbreak
|
||||||
|
|
||||||
|
restriction_minecraft_multishot:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:multishot
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- crossbow
|
||||||
|
|
||||||
|
restriction_piercing:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:piercing
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- crossbow
|
||||||
|
|
||||||
|
restriction_power:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:power
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- bow
|
||||||
|
|
||||||
|
restriction_projectile_protection:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:projectile_protection
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- armors
|
||||||
|
|
||||||
|
restriction_protection:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:protection
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- armors
|
||||||
|
|
||||||
|
restriction_punch:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:punch
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- bow
|
||||||
|
|
||||||
|
restriction_quick_charge:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:quick_charge
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- crossbow
|
||||||
|
|
||||||
|
restriction_respiration:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:respiration
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- helmets
|
||||||
|
|
||||||
|
restriction_riptide:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:riptide
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- trident
|
||||||
|
|
||||||
|
restriction_sharpness:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:sharpness
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- melee_weapons
|
||||||
|
|
||||||
|
restriction__silk_touch:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:silk_touch
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- tools
|
||||||
|
|
||||||
|
restriction_smite:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:smite
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- melee_weapons
|
||||||
|
- mace
|
||||||
|
|
||||||
|
restriction_soul_speed:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:soul_speed
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- boots
|
||||||
|
|
||||||
|
restriction_sweeping_edge:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:sweeping
|
||||||
|
- minecraft:sweeping_edge
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- swords
|
||||||
|
|
||||||
|
# Do not exist in 1.18, that mean useInFuture will be set to true
|
||||||
|
# useInFuture set to true also mean it will not warn if there is an issue
|
||||||
|
restriction_swift_sneak:
|
||||||
|
useInFuture: true
|
||||||
|
enchantments:
|
||||||
|
- minecraft:swift_sneak
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- leggings
|
||||||
|
|
||||||
|
restriction_thorns:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:thorns
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- armors
|
||||||
|
|
||||||
|
restriction__unbreaking:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:unbreaking
|
||||||
|
notAffectedGroups:
|
||||||
|
- enchanted_book
|
||||||
|
- can_unbreak
|
||||||
|
|
||||||
|
# ----------------------------------------------------
|
||||||
|
# Now we have conflicts about enchantment Incompatibility
|
||||||
|
# We just filtered what item enchantments can be applied
|
||||||
|
# notAffectedGroups is empty as we don't want anything to not respect theses rules
|
||||||
|
# maxEnchantmentBeforeConflict is set to 1 to only have 1 on those enchantment available
|
||||||
|
# ----------------------------------------------------
|
||||||
|
|
||||||
|
sword_enchant_conflict:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:bane_of_arthropods
|
||||||
|
- minecraft:smite
|
||||||
|
- minecraft:sharpness
|
||||||
|
- minecraft:density
|
||||||
|
- minecraft:breach
|
||||||
|
notAffectedGroups: []
|
||||||
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
|
protection_enchant_conflict:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:blast_protection
|
||||||
|
- minecraft:fire_protection
|
||||||
|
- minecraft:projectile_protection
|
||||||
|
- minecraft:protection
|
||||||
|
notAffectedGroups: []
|
||||||
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
|
trident_conflict1:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:channeling
|
||||||
|
- minecraft:riptide
|
||||||
|
notAffectedGroups: []
|
||||||
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
|
trident_conflict2:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:loyalty
|
||||||
|
- minecraft:riptide
|
||||||
|
notAffectedGroups: []
|
||||||
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
|
boot_conflict:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:depth_strider
|
||||||
|
- minecraft:frost_walker
|
||||||
|
notAffectedGroups: []
|
||||||
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
|
tool_conflict:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:fortune
|
||||||
|
- minecraft:silk_touch
|
||||||
|
notAffectedGroups: []
|
||||||
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
|
bow_conflict:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:mending
|
||||||
|
- minecraft:infinity
|
||||||
|
notAffectedGroups: []
|
||||||
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
|
crossbow_conflict:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:multishot
|
||||||
|
- minecraft:piercing
|
||||||
|
notAffectedGroups: []
|
||||||
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
restriction_density:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:density
|
||||||
|
notAffectedGroups:
|
||||||
|
- mace
|
||||||
|
- enchanted_book
|
||||||
|
restriction_breach:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:breach
|
||||||
|
notAffectedGroups:
|
||||||
|
- mace
|
||||||
|
- enchanted_book
|
||||||
|
restriction_wind_burst:
|
||||||
|
enchantments:
|
||||||
|
- minecraft:wind_burst
|
||||||
|
notAffectedGroups:
|
||||||
|
- mace
|
||||||
|
- enchanted_book
|
||||||
|
|
||||||
|
# ----------------------------------------------------
|
||||||
|
# Bellow is for custom conflicts.
|
||||||
|
# This is also where conflict create from the gui will be placed.
|
||||||
|
# ----------------------------------------------------
|
||||||
236
defaultconfigs/1.21.9/item_groups.yml
Normal file
236
defaultconfigs/1.21.9/item_groups.yml
Normal file
|
|
@ -0,0 +1,236 @@
|
||||||
|
#
|
||||||
|
# It is recommended that you use /configanvil to edit theses config.
|
||||||
|
# You can still manually edit here if you like to. but if you do, don't forget to /anvilconfigreload after you changes !
|
||||||
|
#
|
||||||
|
|
||||||
|
# Please note this config use spigot material names.
|
||||||
|
# It should match minecraft name in most case, maybe every case, but I can't be sure
|
||||||
|
# In case there an issue with material name, you can found them here:
|
||||||
|
# https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
|
||||||
|
|
||||||
|
# An empty Exclude group exclude nothing, so it contain everything
|
||||||
|
everything:
|
||||||
|
type: exclude
|
||||||
|
|
||||||
|
# An empty include group will include nothing
|
||||||
|
nothing:
|
||||||
|
type: include
|
||||||
|
|
||||||
|
# This group is an example of a group including only stone and polished granite
|
||||||
|
example_include:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- stone
|
||||||
|
- polished_granite
|
||||||
|
|
||||||
|
# This group contain everything except polished granite and elements of example_include
|
||||||
|
example_exclude:
|
||||||
|
type: exclude
|
||||||
|
items:
|
||||||
|
- polished_granite
|
||||||
|
groups:
|
||||||
|
- example_include
|
||||||
|
|
||||||
|
# Default configuration should be vanilla enchantment conflict group
|
||||||
|
# there may have error, if you find one you can fix it !
|
||||||
|
# https://minecraft.fandom.com/wiki/Enchanting
|
||||||
|
|
||||||
|
swords:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- wooden_sword
|
||||||
|
- stone_sword
|
||||||
|
- iron_sword
|
||||||
|
- diamond_sword
|
||||||
|
- golden_sword
|
||||||
|
- netherite_sword
|
||||||
|
- copper_sword
|
||||||
|
|
||||||
|
axes:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- wooden_axe
|
||||||
|
- stone_axe
|
||||||
|
- iron_axe
|
||||||
|
- diamond_axe
|
||||||
|
- golden_axe
|
||||||
|
- netherite_axe
|
||||||
|
- copper_axe
|
||||||
|
|
||||||
|
melee_weapons:
|
||||||
|
type: include
|
||||||
|
groups:
|
||||||
|
- swords
|
||||||
|
- axes
|
||||||
|
|
||||||
|
helmets:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- leather_helmet
|
||||||
|
- chainmail_helmet
|
||||||
|
- iron_helmet
|
||||||
|
- diamond_helmet
|
||||||
|
- golden_helmet
|
||||||
|
- netherite_helmet
|
||||||
|
- turtle_helmet
|
||||||
|
- copper_helmet
|
||||||
|
|
||||||
|
chestplate:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- leather_chestplate
|
||||||
|
- chainmail_chestplate
|
||||||
|
- iron_chestplate
|
||||||
|
- diamond_chestplate
|
||||||
|
- golden_chestplate
|
||||||
|
- netherite_chestplate
|
||||||
|
- copper_chestplate
|
||||||
|
|
||||||
|
leggings:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- leather_leggings
|
||||||
|
- chainmail_leggings
|
||||||
|
- iron_leggings
|
||||||
|
- diamond_leggings
|
||||||
|
- golden_leggings
|
||||||
|
- netherite_leggings
|
||||||
|
- copper_leggings
|
||||||
|
|
||||||
|
boots:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- leather_boots
|
||||||
|
- chainmail_boots
|
||||||
|
- iron_boots
|
||||||
|
- diamond_boots
|
||||||
|
- golden_boots
|
||||||
|
- netherite_boots
|
||||||
|
- copper_boots
|
||||||
|
|
||||||
|
armors:
|
||||||
|
type: include
|
||||||
|
groups:
|
||||||
|
- helmets
|
||||||
|
- chestplate
|
||||||
|
- leggings
|
||||||
|
- boots
|
||||||
|
|
||||||
|
wearable:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- elytra
|
||||||
|
- carved_pumpkin
|
||||||
|
- skeleton_skull
|
||||||
|
- wither_skeleton_skull
|
||||||
|
- zombie_head
|
||||||
|
- player_head
|
||||||
|
- creeper_head
|
||||||
|
- dragon_head
|
||||||
|
- piglin_head
|
||||||
|
groups:
|
||||||
|
- armors
|
||||||
|
|
||||||
|
pickaxes:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- wooden_pickaxe
|
||||||
|
- stone_pickaxe
|
||||||
|
- iron_pickaxe
|
||||||
|
- diamond_pickaxe
|
||||||
|
- golden_pickaxe
|
||||||
|
- netherite_pickaxe
|
||||||
|
- copper_pickaxe
|
||||||
|
|
||||||
|
shovels:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- wooden_shovel
|
||||||
|
- stone_shovel
|
||||||
|
- iron_shovel
|
||||||
|
- diamond_shovel
|
||||||
|
- golden_shovel
|
||||||
|
- netherite_shovel
|
||||||
|
- copper_shovel
|
||||||
|
|
||||||
|
hoes:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- wooden_hoe
|
||||||
|
- stone_hoe
|
||||||
|
- iron_hoe
|
||||||
|
- diamond_hoe
|
||||||
|
- golden_hoe
|
||||||
|
- netherite_hoe
|
||||||
|
- copper_hoe
|
||||||
|
|
||||||
|
tools:
|
||||||
|
type: include
|
||||||
|
groups:
|
||||||
|
- pickaxes
|
||||||
|
- shovels
|
||||||
|
- hoes
|
||||||
|
- axes
|
||||||
|
|
||||||
|
enchanted_book:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- enchanted_book
|
||||||
|
|
||||||
|
trident:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- trident
|
||||||
|
|
||||||
|
bow:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- bow
|
||||||
|
|
||||||
|
crossbow:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- crossbow
|
||||||
|
|
||||||
|
fishing_rod:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- fishing_rod
|
||||||
|
|
||||||
|
shears:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- shears
|
||||||
|
|
||||||
|
can_unbreak:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- elytra
|
||||||
|
- flint_and_steel
|
||||||
|
- shield
|
||||||
|
- carrot_on_a_stick
|
||||||
|
- warped_fungus_on_a_stick
|
||||||
|
- brush
|
||||||
|
groups:
|
||||||
|
- melee_weapons
|
||||||
|
- tools
|
||||||
|
- armors
|
||||||
|
- trident
|
||||||
|
- bow
|
||||||
|
- crossbow
|
||||||
|
- fishing_rod
|
||||||
|
- shears
|
||||||
|
- mace
|
||||||
|
|
||||||
|
can_vanish:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- compass
|
||||||
|
groups:
|
||||||
|
- wearable
|
||||||
|
- can_unbreak
|
||||||
|
mace:
|
||||||
|
type: include
|
||||||
|
items:
|
||||||
|
- mace
|
||||||
|
|
||||||
192
defaultconfigs/1.21.9/unit_repair_item.yml
Normal file
192
defaultconfigs/1.21.9/unit_repair_item.yml
Normal file
|
|
@ -0,0 +1,192 @@
|
||||||
|
#
|
||||||
|
# It is recommended that you use /configanvil to edit theses config.
|
||||||
|
# You can still manually edit here if you like to. but if you do, don't forget to /anvilconfigreload after you changes !
|
||||||
|
#
|
||||||
|
|
||||||
|
# Unit repair configuration
|
||||||
|
#
|
||||||
|
# This configuration is to make custom unit repair
|
||||||
|
# A unit repair is, for example, a diamond to repair a diamond sword
|
||||||
|
# In vanilla, a unit repair 25% of object durability
|
||||||
|
# you can make a custom value here
|
||||||
|
#
|
||||||
|
# Item name should NOT combine caps and no caps (example: Stone)
|
||||||
|
|
||||||
|
# Default value if the config is an invalid value (value <= 0 )
|
||||||
|
# If value > 1 it will be treated as being = 1
|
||||||
|
default_repair_amount: 0.25
|
||||||
|
|
||||||
|
# You can add custom unit repair
|
||||||
|
# The example bellow make a shield repaired by 10% by sticks
|
||||||
|
|
||||||
|
# stick:
|
||||||
|
# shield: 0.10
|
||||||
|
|
||||||
|
|
||||||
|
# Vanilla unit repair group is bellow
|
||||||
|
diamond:
|
||||||
|
diamond_helmet: 0.25
|
||||||
|
diamond_chestplate: 0.25
|
||||||
|
diamond_leggings: 0.25
|
||||||
|
diamond_boots: 0.25
|
||||||
|
diamond_sword: 0.25
|
||||||
|
diamond_pickaxe: 0.25
|
||||||
|
diamond_axe: 0.25
|
||||||
|
diamond_shovel: 0.25
|
||||||
|
diamond_hoe: 0.25
|
||||||
|
|
||||||
|
netherite_ingot:
|
||||||
|
netherite_helmet: 0.25
|
||||||
|
netherite_chestplate: 0.25
|
||||||
|
netherite_leggings: 0.25
|
||||||
|
netherite_boots: 0.25
|
||||||
|
netherite_sword: 0.25
|
||||||
|
netherite_pickaxe: 0.25
|
||||||
|
netherite_axe: 0.25
|
||||||
|
netherite_shovel: 0.25
|
||||||
|
netherite_hoe: 0.25
|
||||||
|
|
||||||
|
gold_ingot:
|
||||||
|
golden_helmet: 0.25
|
||||||
|
golden_chestplate: 0.25
|
||||||
|
golden_leggings: 0.25
|
||||||
|
golden_boots: 0.25
|
||||||
|
golden_sword: 0.25
|
||||||
|
golden_pickaxe: 0.25
|
||||||
|
golden_axe: 0.25
|
||||||
|
golden_shovel: 0.25
|
||||||
|
golden_hoe: 0.25
|
||||||
|
|
||||||
|
iron_ingot:
|
||||||
|
iron_helmet: 0.25
|
||||||
|
iron_chestplate: 0.25
|
||||||
|
iron_leggings: 0.25
|
||||||
|
iron_boots: 0.25
|
||||||
|
iron_sword: 0.25
|
||||||
|
iron_pickaxe: 0.25
|
||||||
|
iron_axe: 0.25
|
||||||
|
iron_shovel: 0.25
|
||||||
|
iron_hoe: 0.25
|
||||||
|
|
||||||
|
cobblestone:
|
||||||
|
stone_sword: 0.25
|
||||||
|
stone_pickaxe: 0.25
|
||||||
|
stone_axe: 0.25
|
||||||
|
stone_shovel: 0.25
|
||||||
|
stone_hoe: 0.25
|
||||||
|
|
||||||
|
cobbled_deepslate:
|
||||||
|
stone_sword: 0.25
|
||||||
|
stone_pickaxe: 0.25
|
||||||
|
stone_axe: 0.25
|
||||||
|
stone_shovel: 0.25
|
||||||
|
stone_hoe: 0.25
|
||||||
|
|
||||||
|
blackstone:
|
||||||
|
stone_sword: 0.25
|
||||||
|
stone_pickaxe: 0.25
|
||||||
|
stone_axe: 0.25
|
||||||
|
stone_shovel: 0.25
|
||||||
|
stone_hoe: 0.25
|
||||||
|
|
||||||
|
leather:
|
||||||
|
leather_helmet: 0.25
|
||||||
|
leather_chestplate: 0.25
|
||||||
|
leather_leggings: 0.25
|
||||||
|
leather_boots: 0.25
|
||||||
|
|
||||||
|
phantom_membrane:
|
||||||
|
elytra: 0.25
|
||||||
|
|
||||||
|
scute:
|
||||||
|
turtle_helmet: 0.25
|
||||||
|
|
||||||
|
oak_planks:
|
||||||
|
wooden_sword: 0.25
|
||||||
|
wooden_pickaxe: 0.25
|
||||||
|
wooden_axe: 0.25
|
||||||
|
wooden_shovel: 0.25
|
||||||
|
wooden_hoe: 0.25
|
||||||
|
shield: 0.25
|
||||||
|
|
||||||
|
spruce_planks:
|
||||||
|
wooden_sword: 0.25
|
||||||
|
wooden_pickaxe: 0.25
|
||||||
|
wooden_axe: 0.25
|
||||||
|
wooden_shovel: 0.25
|
||||||
|
wooden_hoe: 0.25
|
||||||
|
shield: 0.25
|
||||||
|
|
||||||
|
birch_planks:
|
||||||
|
wooden_sword: 0.25
|
||||||
|
wooden_pickaxe: 0.25
|
||||||
|
wooden_axe: 0.25
|
||||||
|
wooden_shovel: 0.25
|
||||||
|
wooden_hoe: 0.25
|
||||||
|
shield: 0.25
|
||||||
|
|
||||||
|
jungle_planks:
|
||||||
|
wooden_sword: 0.25
|
||||||
|
wooden_pickaxe: 0.25
|
||||||
|
wooden_axe: 0.25
|
||||||
|
wooden_shovel: 0.25
|
||||||
|
wooden_hoe: 0.25
|
||||||
|
shield: 0.25
|
||||||
|
|
||||||
|
acacia_planks:
|
||||||
|
wooden_sword: 0.25
|
||||||
|
wooden_pickaxe: 0.25
|
||||||
|
wooden_axe: 0.25
|
||||||
|
wooden_shovel: 0.25
|
||||||
|
wooden_hoe: 0.25
|
||||||
|
shield: 0.25
|
||||||
|
|
||||||
|
dark_oak_planks:
|
||||||
|
wooden_sword: 0.25
|
||||||
|
wooden_pickaxe: 0.25
|
||||||
|
wooden_axe: 0.25
|
||||||
|
wooden_shovel: 0.25
|
||||||
|
wooden_hoe: 0.25
|
||||||
|
shield: 0.25
|
||||||
|
|
||||||
|
mangrove_planks:
|
||||||
|
wooden_sword: 0.25
|
||||||
|
wooden_pickaxe: 0.25
|
||||||
|
wooden_axe: 0.25
|
||||||
|
wooden_shovel: 0.25
|
||||||
|
wooden_hoe: 0.25
|
||||||
|
shield: 0.25
|
||||||
|
|
||||||
|
cherry_planks:
|
||||||
|
wooden_sword: 0.25
|
||||||
|
wooden_pickaxe: 0.25
|
||||||
|
wooden_axe: 0.25
|
||||||
|
wooden_shovel: 0.25
|
||||||
|
wooden_hoe: 0.25
|
||||||
|
shield: 0.25
|
||||||
|
|
||||||
|
bamboo_planks:
|
||||||
|
wooden_sword: 0.25
|
||||||
|
wooden_pickaxe: 0.25
|
||||||
|
wooden_axe: 0.25
|
||||||
|
wooden_shovel: 0.25
|
||||||
|
wooden_hoe: 0.25
|
||||||
|
shield: 0.25
|
||||||
|
|
||||||
|
crimson_planks:
|
||||||
|
wooden_sword: 0.25
|
||||||
|
wooden_pickaxe: 0.25
|
||||||
|
wooden_axe: 0.25
|
||||||
|
wooden_shovel: 0.25
|
||||||
|
wooden_hoe: 0.25
|
||||||
|
shield: 0.25
|
||||||
|
|
||||||
|
warped_planks:
|
||||||
|
wooden_sword: 0.25
|
||||||
|
wooden_pickaxe: 0.25
|
||||||
|
wooden_axe: 0.25
|
||||||
|
wooden_shovel: 0.25
|
||||||
|
wooden_hoe: 0.25
|
||||||
|
shield: 0.25
|
||||||
|
breeze_rod:
|
||||||
|
mace: 0.25
|
||||||
|
|
@ -3,6 +3,19 @@
|
||||||
# You can still manually edit here if you like to. but if you do, don't forget to /anvilconfigreload after you changes !
|
# You can still manually edit here if you like to. but if you do, don't forget to /anvilconfigreload after you changes !
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# What service of metric should custom anvil use
|
||||||
|
# Custom anvil collect generic information like server minecraft version, type, etc...
|
||||||
|
# It can also collect error information if error is happening (currently faststats only)
|
||||||
|
# It can also be disabled
|
||||||
|
# Please refer to README for public metric link
|
||||||
|
# Possible options: auto, bstat, faststats, disabled (auto by default)
|
||||||
|
metric_type: auto
|
||||||
|
|
||||||
|
# Allow to report errors made caused by this plugin (only for faststats)
|
||||||
|
# This allows me to fix potentials issue that I'm not aware of
|
||||||
|
# Accept true or false (true by default)
|
||||||
|
metric_collect_errors: true
|
||||||
|
|
||||||
# All anvil cost will be capped to limit_repair_value if enabled.
|
# All anvil cost will be capped to limit_repair_value if enabled.
|
||||||
#
|
#
|
||||||
# In other words:
|
# In other words:
|
||||||
|
|
@ -55,10 +68,54 @@ unit_repair_cost: 1
|
||||||
# Valid values include 0 to 1000
|
# Valid values include 0 to 1000
|
||||||
sacrifice_illegal_enchant_cost: 1
|
sacrifice_illegal_enchant_cost: 1
|
||||||
|
|
||||||
# Default limit to apply to any enchants missing from override_limits
|
# Allow using color code and hexadecimal color.
|
||||||
#
|
#
|
||||||
# Valid values include 1 to 1000
|
# Color code are prefixed by "&" and hexadecimal color by "#".
|
||||||
default_limit: 5
|
# Color code will not be applied if it colors nothing. "&&" can be used to write "&".
|
||||||
|
# For minimessage search for minimessage formating https://docs.papermc.io/adventure/minimessage/format/
|
||||||
|
allow_color_code: false
|
||||||
|
allow_hexadecimal_color: false
|
||||||
|
allow_minimessage: false
|
||||||
|
|
||||||
|
# This enables restricting color code for player having specific permission
|
||||||
|
# It requires allow_color_code enabled for... obvious reasons
|
||||||
|
#
|
||||||
|
# For example: if player want to use "&aHello" it will be required that the player has
|
||||||
|
# the permission "ca.color.code.a" as he used the color code "a"
|
||||||
|
# In general permission to give to the player is "ca.color.code.[code]"
|
||||||
|
# where [code] is the color code you wish to allow the player
|
||||||
|
#
|
||||||
|
# It is kinda of useless when minimessage is supported as players would be able to bypass
|
||||||
|
# that using the equivalent minimessage tag
|
||||||
|
per_color_code_permission: false
|
||||||
|
|
||||||
|
# Toggle if color should only be applicable if the player a certain permission.
|
||||||
|
#
|
||||||
|
# permission are "ca.color.code" for use of color code and "ca.color.hex" for use of hexadecimal color.
|
||||||
|
permission_needed_for_color: true
|
||||||
|
|
||||||
|
# Xp cost if the player use color in the items name on rename.
|
||||||
|
#
|
||||||
|
# Valid values include 0 to 1000.
|
||||||
|
use_of_color_cost: 0
|
||||||
|
|
||||||
|
# Dialogue rename menu make use of dialog menu to allow bigger rename
|
||||||
|
# You can also change the maximum size and set it to -1 or less for maximum
|
||||||
|
#
|
||||||
|
# This feature only work on paper 1.21.7 or later
|
||||||
|
#
|
||||||
|
# At the moment only english is available for this menu... sorry !
|
||||||
|
#
|
||||||
|
# CustomAnvil use "ca.rename.dialog" when permission
|
||||||
|
enable_dialog_rename: false
|
||||||
|
dialog_rename_max_size: 256
|
||||||
|
permission_needed_for_dialog_rename: false
|
||||||
|
|
||||||
|
# This allows custom anvil to not "guess" the text used for rename but store it in the item
|
||||||
|
# It will make item stackable only and only if it had used the same rename text
|
||||||
|
#
|
||||||
|
# For practical reason. this only work when dialog rename is enabled
|
||||||
|
dialog_rename_keep_user_text: true
|
||||||
|
|
||||||
# Override limits for specific enchants
|
# Override limits for specific enchants
|
||||||
#
|
#
|
||||||
|
|
@ -66,51 +123,49 @@ default_limit: 5
|
||||||
#
|
#
|
||||||
# Overrides provided default from aqua_affinity to depth_strider won't change effect with extra levels
|
# Overrides provided default from aqua_affinity to depth_strider won't change effect with extra levels
|
||||||
#
|
#
|
||||||
# Valid range of 1 - 255 for each enchantment
|
# Valid range of 0 - 255 for each enchantment
|
||||||
|
# -1 mean keep default
|
||||||
enchant_limits:
|
enchant_limits:
|
||||||
aqua_affinity: 1
|
minecraft:aqua_affinity: 1
|
||||||
binding_curse: 1
|
minecraft:binding_curse: 1
|
||||||
channeling: 1
|
minecraft:channeling: 1
|
||||||
flame: 1
|
minecraft:flame: 1
|
||||||
infinity: 1
|
minecraft:infinity: 1
|
||||||
mending: 1
|
minecraft:mending: 1
|
||||||
multishot: 1
|
minecraft:multishot: 1
|
||||||
silk_touch: 1
|
minecraft:silk_touch: 1
|
||||||
vanishing_curse: 1
|
minecraft:vanishing_curse: 1
|
||||||
depth_strider: 3 # anything more than 3 is treated as 3 by the game
|
minecraft:depth_strider: 3 # anything more than 3 is treated as 3 by the game
|
||||||
protection: 4
|
minecraft:protection: 4
|
||||||
fire_protection: 4
|
minecraft:fire_protection: 4
|
||||||
blast_protection: 4
|
minecraft:blast_protection: 4
|
||||||
projectile_protection: 4
|
minecraft:projectile_protection: 4
|
||||||
feather_falling: 4
|
minecraft:feather_falling: 4
|
||||||
thorns: 3
|
minecraft:thorns: 3
|
||||||
respiration: 3
|
minecraft:respiration: 3
|
||||||
sharpness: 5
|
minecraft:sharpness: 5
|
||||||
smite: 5
|
minecraft:smite: 5
|
||||||
bane_of_arthropods: 5
|
minecraft:bane_of_arthropods: 5
|
||||||
knockback: 2
|
minecraft:knockback: 2
|
||||||
fire_aspect: 2
|
minecraft:fire_aspect: 2
|
||||||
looting: 3
|
minecraft:looting: 3
|
||||||
sweeping: 3
|
minecraft:sweeping: 3
|
||||||
sweeping_edge: 3
|
minecraft:sweeping_edge: 3
|
||||||
efficiency: 5
|
minecraft:efficiency: 5
|
||||||
unbreaking: 3
|
minecraft:unbreaking: 3
|
||||||
fortune: 3
|
minecraft:fortune: 3
|
||||||
power: 5
|
minecraft:power: 5
|
||||||
punch: 2
|
minecraft:punch: 2
|
||||||
luck_of_the_sea: 3
|
minecraft:luck_of_the_sea: 3
|
||||||
lure: 3
|
minecraft:lure: 3
|
||||||
frost_walker: 2
|
minecraft:frost_walker: 2
|
||||||
impaling: 5
|
minecraft:impaling: 5
|
||||||
riptide: 3
|
minecraft:riptide: 3
|
||||||
loyalty: 3
|
minecraft:loyalty: 3
|
||||||
piercing: 4
|
minecraft:piercing: 4
|
||||||
quick_charge: 3
|
minecraft:quick_charge: 3
|
||||||
soul_speed: 3
|
minecraft:soul_speed: 3
|
||||||
swift_sneak: 3
|
minecraft:swift_sneak: 3
|
||||||
density: 5
|
|
||||||
breach: 4
|
|
||||||
wind_burst: 3
|
|
||||||
|
|
||||||
# Multipliers used to calculate the enchantment's value in repair/combining
|
# Multipliers used to calculate the enchantment's value in repair/combining
|
||||||
#
|
#
|
||||||
|
|
@ -124,135 +179,283 @@ enchant_limits:
|
||||||
# With default values protection 4 would have a value of 4 when
|
# With default values protection 4 would have a value of 4 when
|
||||||
# coming from either a book (4 * 1) or an item (4 * 1)
|
# coming from either a book (4 * 1) or an item (4 * 1)
|
||||||
enchant_values:
|
enchant_values:
|
||||||
aqua_affinity:
|
minecraft:aqua_affinity:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
bane_of_arthropods:
|
minecraft:bane_of_arthropods:
|
||||||
item: 2
|
item: 2
|
||||||
book: 1
|
book: 1
|
||||||
binding_curse:
|
minecraft:binding_curse:
|
||||||
item: 8
|
item: 8
|
||||||
book: 4
|
book: 4
|
||||||
blast_protection:
|
minecraft:blast_protection:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
channeling:
|
minecraft:channeling:
|
||||||
item: 8
|
item: 8
|
||||||
book: 4
|
book: 4
|
||||||
depth_strider:
|
minecraft:depth_strider:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
efficiency:
|
minecraft:efficiency:
|
||||||
item: 1
|
item: 1
|
||||||
book: 1
|
book: 1
|
||||||
flame:
|
minecraft:flame:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
feather_falling:
|
minecraft:feather_falling:
|
||||||
item: 2
|
item: 2
|
||||||
book: 1
|
book: 1
|
||||||
fire_aspect:
|
minecraft:fire_aspect:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
fire_protection:
|
minecraft:fire_protection:
|
||||||
item: 2
|
item: 2
|
||||||
book: 1
|
book: 1
|
||||||
fortune:
|
minecraft:fortune:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
frost_walker:
|
minecraft:frost_walker:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
impaling:
|
minecraft:impaling:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
infinity:
|
minecraft:infinity:
|
||||||
item: 8
|
item: 8
|
||||||
book: 4
|
book: 4
|
||||||
knockback:
|
minecraft:knockback:
|
||||||
item: 2
|
item: 2
|
||||||
book: 1
|
book: 1
|
||||||
looting:
|
minecraft:looting:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
loyalty:
|
minecraft:loyalty:
|
||||||
item: 1
|
item: 1
|
||||||
book: 1
|
book: 1
|
||||||
luck_of_the_sea:
|
minecraft:luck_of_the_sea:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
lure:
|
minecraft:lure:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
mending:
|
minecraft:mending:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
multishot:
|
minecraft:multishot:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
piercing:
|
minecraft:piercing:
|
||||||
item: 1
|
item: 1
|
||||||
book: 1
|
book: 1
|
||||||
power:
|
minecraft:power:
|
||||||
item: 1
|
item: 1
|
||||||
book: 1
|
book: 1
|
||||||
projectile_protection:
|
minecraft:projectile_protection:
|
||||||
item: 2
|
item: 2
|
||||||
book: 1
|
book: 1
|
||||||
protection:
|
minecraft:protection:
|
||||||
item: 1
|
item: 1
|
||||||
book: 1
|
book: 1
|
||||||
punch:
|
minecraft:punch:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
quick_charge:
|
minecraft:quick_charge:
|
||||||
item: 2
|
item: 2
|
||||||
book: 1
|
book: 1
|
||||||
respiration:
|
minecraft:respiration:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
riptide:
|
minecraft:riptide:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
silk_touch:
|
minecraft:silk_touch:
|
||||||
item: 8
|
item: 8
|
||||||
book: 4
|
book: 4
|
||||||
sharpness:
|
minecraft:sharpness:
|
||||||
item: 1
|
item: 1
|
||||||
book: 1
|
book: 1
|
||||||
smite:
|
minecraft:smite:
|
||||||
item: 2
|
item: 2
|
||||||
book: 1
|
book: 1
|
||||||
soul_speed:
|
minecraft:soul_speed:
|
||||||
item: 8
|
item: 8
|
||||||
book: 4
|
book: 4
|
||||||
swift_sneak:
|
minecraft:swift_sneak:
|
||||||
item: 8
|
item: 8
|
||||||
book: 4
|
book: 4
|
||||||
sweeping:
|
minecraft:sweeping:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
sweeping_edge:
|
minecraft:sweeping_edge:
|
||||||
item: 4
|
item: 4
|
||||||
book: 2
|
book: 2
|
||||||
thorns:
|
minecraft:thorns:
|
||||||
item: 8
|
item: 8
|
||||||
book: 4
|
book: 4
|
||||||
unbreaking:
|
minecraft:unbreaking:
|
||||||
item: 2
|
item: 2
|
||||||
book: 1
|
book: 1
|
||||||
vanishing_curse:
|
minecraft:vanishing_curse:
|
||||||
item: 8
|
item: 8
|
||||||
book: 4
|
book: 4
|
||||||
density:
|
|
||||||
item: 1
|
# Disable enchantment merging for level above the set value
|
||||||
book: 1
|
# Enchantment merging is when, for example, 2 unbreaking II book combine to give sharpness III
|
||||||
breach:
|
# But Enchantment above this value can still be applied. following the previous example, we could still apply a unbreaking III book to a sword
|
||||||
item: 4
|
# Even if disable-merge-over of unbreaking is set to 2
|
||||||
book: 2
|
# -1 mean enchantment merge for this enchantment is not disabled. default to -1 if absent.
|
||||||
wind_burst:
|
disable-merge-over:
|
||||||
item: 4
|
# Sharpness is set to -1. it equivalent to it not being set to anything (and work as vanilla on default configuration)
|
||||||
book: 2
|
minecraft:sharpness: -1
|
||||||
|
# If uncommented. 2 unbreaking II book would not give an unbreaking III book. but unbreaking III book can still be applied
|
||||||
|
# minecraft:unbreaking: 2
|
||||||
|
|
||||||
|
# The maximum number of enchantment an item can get. -1 for infinity
|
||||||
|
# Use eco enchant enchant_limit if present by default unless "default" is not equal to -1
|
||||||
|
enchantment_count_limit:
|
||||||
|
default: -1
|
||||||
|
# Limit for specific items. example bellow is an example with stick
|
||||||
|
# Per item enchantment limit override eco enchant enchant_limit and default limit
|
||||||
|
items:
|
||||||
|
stick: -1
|
||||||
|
|
||||||
|
# Settings for lore modification
|
||||||
|
lore_edit:
|
||||||
|
book_and_quil:
|
||||||
|
# Permission is ca.lore_edit.book
|
||||||
|
use_permission: true
|
||||||
|
append:
|
||||||
|
# If adding lore using book & quil is enabled
|
||||||
|
enabled: false
|
||||||
|
# Cost used every time
|
||||||
|
fixed_cost: 1
|
||||||
|
# Cost used for every lore line added
|
||||||
|
per_line_cost: 0
|
||||||
|
# Use left item vanilla cost penalty if any
|
||||||
|
shared_increase: false
|
||||||
|
# Increase shared left item cost penalty
|
||||||
|
shared_additive: false
|
||||||
|
# If adding the lore consume the book & quil
|
||||||
|
do_consume: false
|
||||||
|
# Allow using color code and hexadecimal color when editing lore via book & quil
|
||||||
|
#
|
||||||
|
# Color code are prefixed by "&" and hexadecimal color by "#"
|
||||||
|
# Color code will not be applied if it colors nothing. "&&" can be used to write "&"
|
||||||
|
# For minimessage see minimessage formating https://docs.papermc.io/adventure/minimessage/format/
|
||||||
|
#
|
||||||
|
# Note that currently minimessage would disable hex code when adding color
|
||||||
|
allow_color_code: true
|
||||||
|
allow_hexadecimal_color: false
|
||||||
|
allow_minimessage: true
|
||||||
|
|
||||||
|
remove:
|
||||||
|
# If removing lore using book & quil is enabled
|
||||||
|
enabled: false
|
||||||
|
# Cost used every time
|
||||||
|
fixed_cost: 1
|
||||||
|
# Cost used for every lore line removed
|
||||||
|
per_line_cost: 0
|
||||||
|
# Use left item vanilla cost penalty if any
|
||||||
|
shared_increase: false
|
||||||
|
# Increase shared left item cost penalty
|
||||||
|
shared_additive: false
|
||||||
|
# If removing the lore consume the book & quil
|
||||||
|
do_consume: false
|
||||||
|
# Cost of replacing colors
|
||||||
|
remove_color_cost: 0
|
||||||
|
# Allowed some color and tags to be reverted to plain text
|
||||||
|
# Custom anvil will prioritise format that result is a smaller resulting text
|
||||||
|
# Note that not allowing certain format will lead to some lost of color or tags.
|
||||||
|
# If configuration are exact as append appending this book should result in the exact same color
|
||||||
|
#
|
||||||
|
# Color code will be prefixed by "&" and hexadecimal color by "#".
|
||||||
|
# If color code is allowed, "&" in the text will get converted to "&&"
|
||||||
|
# For minimessage see minimessage formating https://docs.papermc.io/adventure/minimessage/format/
|
||||||
|
allow_color_code: true
|
||||||
|
allow_hexadecimal_color: false
|
||||||
|
allow_minimessage: true
|
||||||
|
|
||||||
|
paper:
|
||||||
|
# Permission is ca.lore_edit.paper
|
||||||
|
use_permission: true
|
||||||
|
# what order should the lines should get added/removed (start/end, if invalid or not present will be end)
|
||||||
|
order: end
|
||||||
|
|
||||||
|
append_line:
|
||||||
|
# If adding lore line using paper is enabled
|
||||||
|
enabled: false
|
||||||
|
# Cost used every time
|
||||||
|
fixed_cost: 1
|
||||||
|
# Use left item vanilla cost penalty if any
|
||||||
|
shared_increase: false
|
||||||
|
# Increase shared left item cost penalty
|
||||||
|
shared_additive: false
|
||||||
|
# If adding the lore line consume the paper
|
||||||
|
do_consume: false
|
||||||
|
# Allow using color code and hexadecimal color when editing lore via book & quil
|
||||||
|
#
|
||||||
|
# Color code are prefixed by "&" and hexadecimal color by "#"
|
||||||
|
# Color code will not be applied if it colors nothing. "&&" can be used to write "&"
|
||||||
|
# For minimessage see minimessage formating https://docs.papermc.io/adventure/minimessage/format/
|
||||||
|
#
|
||||||
|
# Note that currently minimessage would disable hex code when adding color
|
||||||
|
allow_color_code: true
|
||||||
|
allow_hexadecimal_color: false
|
||||||
|
allow_minimessage: true
|
||||||
|
color_use_cost: 0
|
||||||
|
|
||||||
|
remove_line:
|
||||||
|
# If removing lore line using paper is enabled
|
||||||
|
enabled: false
|
||||||
|
# Cost used every time
|
||||||
|
fixed_cost: 1
|
||||||
|
# Use left item vanilla cost penalty if any
|
||||||
|
shared_increase: false
|
||||||
|
# Increase shared left item cost penalty
|
||||||
|
shared_additive: false
|
||||||
|
# If removing the lore line consume the paper
|
||||||
|
do_consume: false
|
||||||
|
# Cost of replacing colors
|
||||||
|
remove_color_cost: 0
|
||||||
|
# Allowed some color and tags to be reverted to plain text
|
||||||
|
# Custom anvil will prioritise format that result is a smaller resulting text
|
||||||
|
# Note that not allowing certain format will lead to some lost of color or tags.
|
||||||
|
# If configuration are exact as append appending this paper should result in the exact same color
|
||||||
|
#
|
||||||
|
# Color code will be prefixed by "&" and hexadecimal color by "#".
|
||||||
|
# If color code is allowed, "&" in the text will get converted to "&&"
|
||||||
|
# For minimessage see minimessage formating https://docs.papermc.io/adventure/minimessage/format/
|
||||||
|
allow_color_code: true
|
||||||
|
allow_hexadecimal_color: false
|
||||||
|
allow_minimessage: true
|
||||||
|
|
||||||
|
# Allow to replace the xp cost by a monetary cost
|
||||||
|
# If enabled it will not be bound to the experience level limits
|
||||||
|
#
|
||||||
|
# It also requires to enable dialog rename (set "enable_dialog_rename: false" a bit higher)
|
||||||
|
# If dialog rename permission is enabled and player do not have the permission merge will fall back to vanilla xp cost
|
||||||
|
#
|
||||||
|
# If you are using custom craft I recommend using Linear Xp Cost with Exact Linear Xp as normal Xp Cost will act "weird"
|
||||||
|
# But Linear Xp will act as 1$ time global multiplier. In other word: like you expect
|
||||||
|
#
|
||||||
|
# As this feature require dialog rename, it can only be enabled starting with paper 1.21.6 and later
|
||||||
|
monetary_cost:
|
||||||
|
enabled: false
|
||||||
|
# If using vault unlocked this allow to specify what currency should be used for anvil usage
|
||||||
|
# default being the default currency
|
||||||
|
currency: default
|
||||||
|
# multiply the anvil cost by a value to allow to have price a big bigger than like 40
|
||||||
|
multipliers:
|
||||||
|
# global multipliers. all usage type will be multiplied by this value
|
||||||
|
global: 1.0
|
||||||
|
# usage specific type. it will only apply for specific xp "reason"
|
||||||
|
enchantment: 1.0 # related to enchantments level
|
||||||
|
repair: 1.0 # for repairing via unit repair (per unit)
|
||||||
|
rename: 1.0 # for renaming the item
|
||||||
|
lore_edit: 1.0 # for changing the lore of the item (only if lore edit is enabled)
|
||||||
|
work_penalty: 1.0 # for work penalty (aka use penalty)
|
||||||
|
recipe: 1.0 # for custom anvil recipe cost
|
||||||
|
|
||||||
# Whether to show debug logging
|
# Whether to show debug logging
|
||||||
debug_log: false
|
debug_log: false
|
||||||
|
|
@ -260,5 +463,4 @@ debug_log: false
|
||||||
# Whether to show verbose debug logging
|
# Whether to show verbose debug logging
|
||||||
debug_log_verbose: false
|
debug_log_verbose: false
|
||||||
|
|
||||||
configVersion: 1.4.5
|
configVersion: 1.11.0
|
||||||
lowMinecraftVersion: 1.21
|
|
||||||
|
|
@ -17,278 +17,163 @@
|
||||||
# ----------------------------------------------------
|
# ----------------------------------------------------
|
||||||
|
|
||||||
restriction_aqua_affinity:
|
restriction_aqua_affinity:
|
||||||
enchantments:
|
enchantments: [ minecraft:aqua_affinity ]
|
||||||
- aqua_affinity
|
notAffectedGroups: [ enchanted_book, helmets ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- helmets
|
|
||||||
|
|
||||||
restriction_bane_of_arthropods:
|
restriction_bane_of_arthropods:
|
||||||
enchantments:
|
enchantments: [ minecraft:bane_of_arthropods ]
|
||||||
- bane_of_arthropods
|
notAffectedGroups: [ enchanted_book, melee_weapons ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- melee_weapons
|
|
||||||
- mace
|
|
||||||
|
|
||||||
restriction_blast_protection:
|
restriction_blast_protection:
|
||||||
enchantments:
|
enchantments: [ minecraft:blast_protection ]
|
||||||
- blast_protection
|
notAffectedGroups: [ enchanted_book, armors ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- armors
|
|
||||||
|
|
||||||
restriction_channeling:
|
restriction_channeling:
|
||||||
enchantments:
|
enchantments: [ minecraft:channeling ]
|
||||||
- channeling
|
notAffectedGroups: [ enchanted_book, trident ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- trident
|
|
||||||
|
|
||||||
restriction_binding_curse:
|
restriction_binding_curse:
|
||||||
enchantments:
|
enchantments: [ minecraft:binding_curse ]
|
||||||
- binding_curse
|
notAffectedGroups: [ enchanted_book, wearable ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- wearable
|
|
||||||
|
|
||||||
restriction_vanishing_curse:
|
restriction_vanishing_curse:
|
||||||
enchantments:
|
enchantments: [ minecraft:vanishing_curse ]
|
||||||
- vanishing_curse
|
notAffectedGroups: [ enchanted_book, can_vanish ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- can_vanish
|
|
||||||
|
|
||||||
restriction_depth_strider:
|
restriction_depth_strider:
|
||||||
enchantments:
|
enchantments: [ minecraft:depth_strider ]
|
||||||
- depth_strider
|
notAffectedGroups: [ enchanted_book, boots ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- boots
|
|
||||||
|
|
||||||
restriction_efficiency:
|
restriction_efficiency:
|
||||||
enchantments:
|
enchantments: [ minecraft:efficiency ]
|
||||||
- efficiency
|
notAffectedGroups: [ enchanted_book, tools, shears ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- tools
|
|
||||||
- shears
|
|
||||||
|
|
||||||
restriction_feather_falling:
|
restriction_feather_falling:
|
||||||
enchantments:
|
enchantments: [ minecraft:feather_falling ]
|
||||||
- feather_falling
|
notAffectedGroups: [ enchanted_book, boots ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- boots
|
|
||||||
|
|
||||||
restriction_fire_aspect:
|
restriction_fire_aspect:
|
||||||
enchantments:
|
enchantments: [ minecraft:fire_aspect ]
|
||||||
- fire_aspect
|
notAffectedGroups: [ enchanted_book, swords ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- swords
|
|
||||||
- mace
|
|
||||||
|
|
||||||
restriction_fire_protection:
|
restriction_fire_protection:
|
||||||
enchantments:
|
enchantments: [ minecraft:fire_protection ]
|
||||||
- fire_protection
|
notAffectedGroups: [ enchanted_book, armors ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- armors
|
|
||||||
|
|
||||||
restriction_flame:
|
restriction_flame:
|
||||||
enchantments:
|
enchantments: [ minecraft:flame ]
|
||||||
- flame
|
notAffectedGroups: [ enchanted_book, bow ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- bow
|
|
||||||
|
|
||||||
restriction_fortune:
|
restriction_fortune:
|
||||||
enchantments:
|
enchantments: [ minecraft:fortune ]
|
||||||
- fortune
|
notAffectedGroups: [ enchanted_book, tools ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- tools
|
|
||||||
|
|
||||||
restriction_frost_walker:
|
restriction_frost_walker:
|
||||||
enchantments:
|
enchantments: [ minecraft:frost_walker ]
|
||||||
- frost_walker
|
notAffectedGroups: [ enchanted_book, boots ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- boots
|
|
||||||
|
|
||||||
restriction_impaling:
|
restriction_impaling:
|
||||||
enchantments:
|
enchantments: [ minecraft:impaling ]
|
||||||
- impaling
|
notAffectedGroups: [ enchanted_book, trident ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- trident
|
|
||||||
|
|
||||||
restriction_infinity:
|
restriction_infinity:
|
||||||
enchantments:
|
enchantments: [ minecraft:infinity ]
|
||||||
- infinity
|
notAffectedGroups: [ enchanted_book, bow ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- bow
|
|
||||||
|
|
||||||
restriction_knockback:
|
restriction_knockback:
|
||||||
enchantments:
|
enchantments: [ minecraft:knockback ]
|
||||||
- knockback
|
notAffectedGroups: [ enchanted_book, swords ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- swords
|
|
||||||
|
|
||||||
restriction_looting:
|
restriction_looting:
|
||||||
enchantments:
|
enchantments: [ minecraft:looting ]
|
||||||
- looting
|
notAffectedGroups: [ enchanted_book, swords ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- swords
|
|
||||||
|
|
||||||
restriction_loyalty:
|
restriction_loyalty:
|
||||||
enchantments:
|
enchantments: [ minecraft:loyalty ]
|
||||||
- loyalty
|
notAffectedGroups: [ enchanted_book, trident ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
restriction_luck_of_the_sea:
|
||||||
- trident
|
enchantments: [ minecraft:luck_of_the_sea ]
|
||||||
|
notAffectedGroups: [ enchanted_book, fishing_rod ]
|
||||||
|
|
||||||
restriction_lure:
|
restriction_lure:
|
||||||
enchantments:
|
enchantments: [ minecraft:lure ]
|
||||||
- lure
|
notAffectedGroups: [ enchanted_book, fishing_rod ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- fishing_rod
|
|
||||||
|
|
||||||
restriction_mending:
|
restriction_mending:
|
||||||
enchantments:
|
enchantments: [ minecraft:mending ]
|
||||||
- mending
|
notAffectedGroups: [ enchanted_book, can_unbreak ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- can_unbreak
|
|
||||||
|
|
||||||
restriction_multishot:
|
restriction_minecraft_multishot:
|
||||||
enchantments:
|
enchantments: [ minecraft:multishot ]
|
||||||
- multishot
|
notAffectedGroups: [ enchanted_book, crossbow ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- crossbow
|
|
||||||
|
|
||||||
restriction_piercing:
|
restriction_piercing:
|
||||||
enchantments:
|
enchantments: [ minecraft:piercing ]
|
||||||
- piercing
|
notAffectedGroups: [ enchanted_book, crossbow ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- crossbow
|
|
||||||
|
|
||||||
restriction_power:
|
restriction_power:
|
||||||
enchantments:
|
enchantments: [ minecraft:power ]
|
||||||
- power
|
notAffectedGroups: [ enchanted_book, bow ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- bow
|
|
||||||
|
|
||||||
restriction_projectile_protection:
|
restriction_projectile_protection:
|
||||||
enchantments:
|
enchantments: [ minecraft:projectile_protection ]
|
||||||
- projectile_protection
|
notAffectedGroups: [ enchanted_book, armors ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- armors
|
|
||||||
|
|
||||||
restriction_protection:
|
restriction_protection:
|
||||||
enchantments:
|
enchantments: [ minecraft:protection ]
|
||||||
- protection
|
notAffectedGroups: [ enchanted_book, armors ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- armors
|
|
||||||
|
|
||||||
restriction_punch:
|
restriction_punch:
|
||||||
enchantments:
|
enchantments: [ minecraft:punch ]
|
||||||
- punch
|
notAffectedGroups: [ enchanted_book, bow ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- bow
|
|
||||||
|
|
||||||
restriction_quick_charge:
|
restriction_quick_charge:
|
||||||
enchantments:
|
enchantments: [ minecraft:quick_charge ]
|
||||||
- quick_charge
|
notAffectedGroups: [ enchanted_book, crossbow ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- crossbow
|
|
||||||
|
|
||||||
restriction_respiration:
|
restriction_respiration:
|
||||||
enchantments:
|
enchantments: [ minecraft:respiration ]
|
||||||
- respiration
|
notAffectedGroups: [ enchanted_book, helmets ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- helmets
|
|
||||||
|
|
||||||
restriction_riptide:
|
restriction_riptide:
|
||||||
enchantments:
|
enchantments: [ minecraft:riptide ]
|
||||||
- riptide
|
notAffectedGroups: [ enchanted_book, trident ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- trident
|
|
||||||
|
|
||||||
restriction_sharpness:
|
restriction_sharpness:
|
||||||
enchantments:
|
enchantments: [ minecraft:sharpness ]
|
||||||
- sharpness
|
notAffectedGroups: [ enchanted_book, melee_weapons ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- melee_weapons
|
|
||||||
|
|
||||||
restriction_silk_touch:
|
restriction__silk_touch:
|
||||||
enchantments:
|
enchantments: [ minecraft:silk_touch ]
|
||||||
- silk_touch
|
notAffectedGroups: [ enchanted_book, tools ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- tools
|
|
||||||
|
|
||||||
restriction_smite:
|
restriction_smite:
|
||||||
enchantments:
|
enchantments: [ minecraft:smite ]
|
||||||
- smite
|
notAffectedGroups: [ enchanted_book, melee_weapons ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- melee_weapons
|
|
||||||
- mace
|
|
||||||
|
|
||||||
restriction_soul_speed:
|
restriction_soul_speed:
|
||||||
enchantments:
|
enchantments: [ minecraft:soul_speed ]
|
||||||
- soul_speed
|
notAffectedGroups: [ enchanted_book, boots ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- boots
|
|
||||||
|
|
||||||
restriction_sweeping_edge:
|
restriction_sweeping_edge:
|
||||||
enchantments:
|
enchantments: [ minecraft:sweeping, minecraft:sweeping_edge ]
|
||||||
- sweeping
|
notAffectedGroups: [ enchanted_book, swords ]
|
||||||
- sweeping_edge
|
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- swords
|
|
||||||
|
|
||||||
# Do not exist in 1.18, that mean useInFuture will be set to true
|
# Do not exist in 1.18, that mean useInFuture will be set to true
|
||||||
# useInFuture set to true also mean it will not warn if there is an issue
|
# useInFuture set to true also mean it will not warn if there is an issue
|
||||||
restriction_swift_sneak:
|
restriction_swift_sneak:
|
||||||
useInFuture: true
|
useInFuture: true
|
||||||
enchantments:
|
enchantments: [ minecraft:swift_sneak ]
|
||||||
- swift_sneak
|
notAffectedGroups: [ enchanted_book, leggings ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- leggings
|
|
||||||
|
|
||||||
restriction_thorns:
|
restriction_thorns:
|
||||||
enchantments:
|
enchantments: [ minecraft:thorns ]
|
||||||
- thorns
|
notAffectedGroups: [ enchanted_book, armors ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- armors
|
|
||||||
|
|
||||||
restriction_unbreaking:
|
restriction__unbreaking:
|
||||||
enchantments:
|
enchantments: [ minecraft:unbreaking ]
|
||||||
- unbreaking
|
notAffectedGroups: [ enchanted_book, can_unbreak ]
|
||||||
notAffectedGroups:
|
|
||||||
- enchanted_book
|
|
||||||
- can_unbreak
|
|
||||||
|
|
||||||
# ----------------------------------------------------
|
# ----------------------------------------------------
|
||||||
# Now we have conflicts about enchantment Incompatibility
|
# Now we have conflicts about enchantment Incompatibility
|
||||||
|
|
@ -299,83 +184,61 @@ restriction_unbreaking:
|
||||||
|
|
||||||
sword_enchant_conflict:
|
sword_enchant_conflict:
|
||||||
enchantments:
|
enchantments:
|
||||||
- bane_of_arthropods
|
- minecraft:bane_of_arthropods
|
||||||
- smite
|
- minecraft:smite
|
||||||
- sharpness
|
- minecraft:sharpness
|
||||||
notAffectedGroups: []
|
notAffectedGroups: [ ]
|
||||||
maxEnchantmentBeforeConflict: 1
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
protection_enchant_conflict:
|
protection_enchant_conflict:
|
||||||
enchantments:
|
enchantments:
|
||||||
- blast_protection
|
- minecraft:blast_protection
|
||||||
- fire_protection
|
- minecraft:fire_protection
|
||||||
- projectile_protection
|
- minecraft:projectile_protection
|
||||||
- protection
|
- minecraft:protection
|
||||||
notAffectedGroups: []
|
notAffectedGroups: [ ]
|
||||||
maxEnchantmentBeforeConflict: 1
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
trident_conflict1:
|
trident_conflict1:
|
||||||
enchantments:
|
enchantments:
|
||||||
- channeling
|
- minecraft:channeling
|
||||||
- riptide
|
- minecraft:riptide
|
||||||
notAffectedGroups: []
|
notAffectedGroups: [ ]
|
||||||
maxEnchantmentBeforeConflict: 1
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
trident_conflict2:
|
trident_conflict2:
|
||||||
enchantments:
|
enchantments:
|
||||||
- loyalty
|
- minecraft:loyalty
|
||||||
- riptide
|
- minecraft:riptide
|
||||||
notAffectedGroups: []
|
notAffectedGroups: [ ]
|
||||||
maxEnchantmentBeforeConflict: 1
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
boot_conflict:
|
boot_conflict:
|
||||||
enchantments:
|
enchantments:
|
||||||
- depth_strider
|
- minecraft:depth_strider
|
||||||
- frost_walker
|
- minecraft:frost_walker
|
||||||
notAffectedGroups: []
|
notAffectedGroups: [ ]
|
||||||
maxEnchantmentBeforeConflict: 1
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
tool_conflict:
|
tool_conflict:
|
||||||
enchantments:
|
enchantments:
|
||||||
- fortune
|
- minecraft:fortune
|
||||||
- silk_touch
|
- minecraft:silk_touch
|
||||||
notAffectedGroups: []
|
notAffectedGroups: [ ]
|
||||||
maxEnchantmentBeforeConflict: 1
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
bow_conflict:
|
bow_conflict:
|
||||||
enchantments:
|
enchantments:
|
||||||
- mending
|
- minecraft:mending
|
||||||
- infinity
|
- minecraft:infinity
|
||||||
notAffectedGroups: []
|
notAffectedGroups: [ ]
|
||||||
maxEnchantmentBeforeConflict: 1
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
crossbow_conflict:
|
crossbow_conflict:
|
||||||
enchantments:
|
enchantments:
|
||||||
- multishot
|
- minecraft:multishot
|
||||||
- piercing
|
- minecraft:piercing
|
||||||
notAffectedGroups: []
|
notAffectedGroups: [ ]
|
||||||
maxEnchantmentBeforeConflict: 1
|
|
||||||
restriction_density:
|
|
||||||
enchantments:
|
|
||||||
- density
|
|
||||||
notAffectedGroups:
|
|
||||||
- mace
|
|
||||||
restriction_breach:
|
|
||||||
enchantments:
|
|
||||||
- breach
|
|
||||||
notAffectedGroups:
|
|
||||||
- mace
|
|
||||||
restriction_wind_burst:
|
|
||||||
enchantments:
|
|
||||||
- wind_burst
|
|
||||||
notAffectedGroups:
|
|
||||||
- mace
|
|
||||||
mace_enchant_conflict:
|
|
||||||
enchantments:
|
|
||||||
- density
|
|
||||||
- breach
|
|
||||||
- smite
|
|
||||||
- bane_of_arthropods
|
|
||||||
maxEnchantmentBeforeConflict: 1
|
maxEnchantmentBeforeConflict: 1
|
||||||
|
|
||||||
# ----------------------------------------------------
|
# ----------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -20,16 +20,16 @@ nothing:
|
||||||
example_include:
|
example_include:
|
||||||
type: include
|
type: include
|
||||||
items:
|
items:
|
||||||
- stone
|
- stone
|
||||||
- polished_granite
|
- polished_granite
|
||||||
|
|
||||||
# This group contain everything except polished granite and elements of example_include
|
# This group contain everything except polished granite and elements of example_include
|
||||||
example_exclude:
|
example_exclude:
|
||||||
type: exclude
|
type: exclude
|
||||||
items:
|
items:
|
||||||
- polished_granite
|
- polished_granite
|
||||||
groups:
|
groups:
|
||||||
- example_include
|
- example_include
|
||||||
|
|
||||||
# Default configuration should be vanilla enchantment conflict group
|
# Default configuration should be vanilla enchantment conflict group
|
||||||
# there may have error, if you find one you can fix it !
|
# there may have error, if you find one you can fix it !
|
||||||
|
|
@ -38,176 +38,173 @@ example_exclude:
|
||||||
swords:
|
swords:
|
||||||
type: include
|
type: include
|
||||||
items:
|
items:
|
||||||
- wooden_sword
|
- wooden_sword
|
||||||
- stone_sword
|
- stone_sword
|
||||||
- iron_sword
|
- iron_sword
|
||||||
- diamond_sword
|
- diamond_sword
|
||||||
- golden_sword
|
- golden_sword
|
||||||
- netherite_sword
|
- netherite_sword
|
||||||
|
|
||||||
axes:
|
axes:
|
||||||
type: include
|
type: include
|
||||||
items:
|
items:
|
||||||
- wooden_axe
|
- wooden_axe
|
||||||
- stone_axe
|
- stone_axe
|
||||||
- iron_axe
|
- iron_axe
|
||||||
- diamond_axe
|
- diamond_axe
|
||||||
- golden_axe
|
- golden_axe
|
||||||
- netherite_axe
|
- netherite_axe
|
||||||
|
|
||||||
melee_weapons:
|
melee_weapons:
|
||||||
type: include
|
type: include
|
||||||
groups:
|
groups:
|
||||||
- swords
|
- swords
|
||||||
- axes
|
- axes
|
||||||
|
|
||||||
helmets:
|
helmets:
|
||||||
type: include
|
type: include
|
||||||
items:
|
items:
|
||||||
- leather_helmet
|
- leather_helmet
|
||||||
- chainmail_helmet
|
- chainmail_helmet
|
||||||
- iron_helmet
|
- iron_helmet
|
||||||
- diamond_helmet
|
- diamond_helmet
|
||||||
- golden_helmet
|
- golden_helmet
|
||||||
- netherite_helmet
|
- netherite_helmet
|
||||||
- turtle_helmet
|
- turtle_helmet
|
||||||
|
|
||||||
chestplate:
|
chestplate:
|
||||||
type: include
|
type: include
|
||||||
items:
|
items:
|
||||||
- leather_chestplate
|
- leather_chestplate
|
||||||
- chainmail_chestplate
|
- chainmail_chestplate
|
||||||
- iron_chestplate
|
- iron_chestplate
|
||||||
- diamond_chestplate
|
- diamond_chestplate
|
||||||
- golden_chestplate
|
- golden_chestplate
|
||||||
- netherite_chestplate
|
- netherite_chestplate
|
||||||
|
|
||||||
leggings:
|
leggings:
|
||||||
type: include
|
type: include
|
||||||
items:
|
items:
|
||||||
- leather_leggings
|
- leather_leggings
|
||||||
- chainmail_leggings
|
- chainmail_leggings
|
||||||
- iron_leggings
|
- iron_leggings
|
||||||
- diamond_leggings
|
- diamond_leggings
|
||||||
- golden_leggings
|
- golden_leggings
|
||||||
- netherite_leggings
|
- netherite_leggings
|
||||||
|
|
||||||
boots:
|
boots:
|
||||||
type: include
|
type: include
|
||||||
items:
|
items:
|
||||||
- leather_boots
|
- leather_boots
|
||||||
- chainmail_boots
|
- chainmail_boots
|
||||||
- iron_boots
|
- iron_boots
|
||||||
- diamond_boots
|
- diamond_boots
|
||||||
- golden_boots
|
- golden_boots
|
||||||
- netherite_boots
|
- netherite_boots
|
||||||
|
|
||||||
armors:
|
armors:
|
||||||
type: include
|
type: include
|
||||||
groups:
|
groups:
|
||||||
- helmets
|
- helmets
|
||||||
- chestplate
|
- chestplate
|
||||||
- leggings
|
- leggings
|
||||||
- boots
|
- boots
|
||||||
|
|
||||||
wearable:
|
wearable:
|
||||||
type: include
|
type: include
|
||||||
items:
|
items:
|
||||||
- elytra
|
- elytra
|
||||||
- carved_pumpkin
|
- carved_pumpkin
|
||||||
- skeleton_skull
|
- skeleton_skull
|
||||||
- wither_skeleton_skull
|
- wither_skeleton_skull
|
||||||
- zombie_head
|
- zombie_head
|
||||||
- player_head
|
- player_head
|
||||||
- creeper_head
|
- creeper_head
|
||||||
- dragon_head
|
- dragon_head
|
||||||
- piglin_head
|
# do not exist in 1.18 but exist in future update
|
||||||
|
- piglin_head
|
||||||
groups:
|
groups:
|
||||||
- armors
|
- armors
|
||||||
|
|
||||||
tools:
|
tools:
|
||||||
type: include
|
type: include
|
||||||
items:
|
items:
|
||||||
- wooden_pickaxe
|
- wooden_pickaxe
|
||||||
- stone_pickaxe
|
- stone_pickaxe
|
||||||
- iron_pickaxe
|
- iron_pickaxe
|
||||||
- diamond_pickaxe
|
- diamond_pickaxe
|
||||||
- golden_pickaxe
|
- golden_pickaxe
|
||||||
- netherite_pickaxe
|
- netherite_pickaxe
|
||||||
- wooden_shovel
|
- wooden_shovel
|
||||||
- stone_shovel
|
- stone_shovel
|
||||||
- iron_shovel
|
- iron_shovel
|
||||||
- diamond_shovel
|
- diamond_shovel
|
||||||
- golden_shovel
|
- golden_shovel
|
||||||
- netherite_shovel
|
- netherite_shovel
|
||||||
- wooden_hoe
|
- wooden_hoe
|
||||||
- stone_hoe
|
- stone_hoe
|
||||||
- iron_hoe
|
- iron_hoe
|
||||||
- diamond_hoe
|
- diamond_hoe
|
||||||
- golden_hoe
|
- golden_hoe
|
||||||
- netherite_hoe
|
- netherite_hoe
|
||||||
groups:
|
groups:
|
||||||
- axes
|
- axes
|
||||||
|
|
||||||
enchanted_book:
|
enchanted_book:
|
||||||
type: include
|
type: include
|
||||||
items:
|
items:
|
||||||
- enchanted_book
|
- enchanted_book
|
||||||
|
|
||||||
trident:
|
trident:
|
||||||
type: include
|
type: include
|
||||||
items:
|
items:
|
||||||
- trident
|
- trident
|
||||||
|
|
||||||
bow:
|
bow:
|
||||||
type: include
|
type: include
|
||||||
items:
|
items:
|
||||||
- bow
|
- bow
|
||||||
|
|
||||||
crossbow:
|
crossbow:
|
||||||
type: include
|
type: include
|
||||||
items:
|
items:
|
||||||
- crossbow
|
- crossbow
|
||||||
|
|
||||||
fishing_rod:
|
fishing_rod:
|
||||||
type: include
|
type: include
|
||||||
items:
|
items:
|
||||||
- fishing_rod
|
- fishing_rod
|
||||||
|
|
||||||
shears:
|
shears:
|
||||||
type: include
|
type: include
|
||||||
items:
|
items:
|
||||||
- shears
|
- shears
|
||||||
|
|
||||||
can_unbreak:
|
can_unbreak:
|
||||||
type: include
|
type: include
|
||||||
items:
|
items:
|
||||||
- elytra
|
- elytra
|
||||||
- flint_and_steel
|
- flint_and_steel
|
||||||
- shield
|
- shield
|
||||||
- carrot_on_a_stick
|
- carrot_on_a_stick
|
||||||
- warped_fungus_on_a_stick
|
- warped_fungus_on_a_stick
|
||||||
- brush
|
# do not exist in 1.18 but exist in future update
|
||||||
|
- brush
|
||||||
groups:
|
groups:
|
||||||
- melee_weapons
|
- melee_weapons
|
||||||
- tools
|
- tools
|
||||||
- armors
|
- armors
|
||||||
- trident
|
- trident
|
||||||
- bow
|
- bow
|
||||||
- crossbow
|
- crossbow
|
||||||
- fishing_rod
|
- fishing_rod
|
||||||
- shears
|
- shears
|
||||||
- mace
|
|
||||||
|
|
||||||
can_vanish:
|
can_vanish:
|
||||||
type: include
|
type: include
|
||||||
items:
|
items:
|
||||||
- compass
|
- compass
|
||||||
groups:
|
groups:
|
||||||
- wearable
|
- wearable
|
||||||
- can_unbreak
|
- can_unbreak
|
||||||
mace:
|
|
||||||
type: include
|
|
||||||
items:
|
|
||||||
- mace
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
### Default Plugin's Configurations
|
### Default Plugin's Configurations
|
||||||
For 1.18 to 1.20.6 use [1.18 configurations](https://github.com/alexcrea/CustomAnvil/tree/master/defaultconfigs/1.18) \
|
From 1.18 to 1.20.6 use [1.18 configurations](https://github.com/alexcrea/CustomAnvil/tree/master/defaultconfigs/1.18) \
|
||||||
For 1.21 use [1.21 configurations](https://github.com/alexcrea/CustomAnvil/tree/master/defaultconfigs/1.21)
|
From 1.21 to 1.21.8 use [1.21 configurations](https://github.com/alexcrea/CustomAnvil/tree/master/defaultconfigs/1.21) \
|
||||||
|
From 1.21.9 to 1.21.10 use [1.21.9 configurations](https://github.com/alexcrea/CustomAnvil/tree/master/defaultconfigs/1.21.9) \
|
||||||
|
From 1.21.11 use [1.21.11 configurations](https://github.com/alexcrea/CustomAnvil/tree/master/defaultconfigs/1.21.11)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,13 @@
|
||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
|
|
||||||
# Signing
|
# Signing
|
||||||
signing.gnupg.executable=gpg
|
signing.secretKeyRingFile=~/.gnupg/secring.gpg
|
||||||
signing.gnupg.useLegacyGpg=true
|
|
||||||
signing.gnupg.keyName=B0DBF91F
|
kotlin.daemon.jvmargs=-Xmx8G
|
||||||
|
|
||||||
|
# list of nms
|
||||||
|
subprojects.reobfnms=v1_17R1,v1_18R1,v1_18R2,v1_19R1,v1_19R2,v1_19R3,v1_20R1,v1_20R2,v1_20R3,v1_20R4,v1_21R1,v1_21R2,v1_21R3,v1_21R4,v1_21R5,v1_21R6,v1_21R7
|
||||||
|
|
||||||
|
# list of version for hangar release
|
||||||
|
paperVersion=1.18-26.2
|
||||||
|
|
||||||
|
|
|
||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
|
@ -1,5 +1,5 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
|
||||||
0
gradlew
vendored
Normal file → Executable file
0
gradlew
vendored
Normal file → Executable file
17
impl/ExcellentEnchant5_4/build.gradle.kts
Normal file
17
impl/ExcellentEnchant5_4/build.gradle.kts
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
group = rootProject.group
|
||||||
|
version = rootProject.version
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
kotlin("jvm") version "2.3.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
// ExcellentEnchants
|
||||||
|
maven(url = "https://repo.nightexpressdev.com/releases")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
// Excellent Enchant
|
||||||
|
compileOnly("su.nightexpress.excellentenchants:Core:5.4.3")
|
||||||
|
compileOnly("su.nightexpress.nightcore:main:2.16.2")
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package xyz.alexcrea.cuanvil.dependency.plugins;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import su.nightexpress.excellentenchants.api.enchantment.CustomEnchantment;
|
||||||
|
import su.nightexpress.excellentenchants.enchantment.EnchantRegistry;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
public class ExcellentEnchant5_3Registry {
|
||||||
|
|
||||||
|
public static @NotNull Set<CustomEnchantment> getRegistered(){
|
||||||
|
return EnchantRegistry.getRegistered();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package xyz.alexcrea.cuanvil.dependency.plugins;
|
||||||
|
|
||||||
|
import su.nightexpress.excellentenchants.EnchantsAPI;
|
||||||
|
|
||||||
|
public class ExcellentEnchant5_4EnchantSettings {
|
||||||
|
|
||||||
|
|
||||||
|
public static int anvilLimit() {
|
||||||
|
return EnchantsAPI.getEnchantManager().getSettings().getAnvilEnchantsLimit();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
1
impl/LegacyEcoEnchant/.gitignore
vendored
Normal file
1
impl/LegacyEcoEnchant/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
.lastDeploymentsId
|
||||||
13
impl/LegacyEcoEnchant/build.gradle.kts
Normal file
13
impl/LegacyEcoEnchant/build.gradle.kts
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
group = rootProject.group
|
||||||
|
version = rootProject.version
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
kotlin("jvm") version "2.3.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Imitate needed class and method to support legacy version of EcoEnchant
|
||||||
|
dependencies {
|
||||||
|
// Spigot api
|
||||||
|
compileOnly("org.spigotmc:spigot-api:1.18-R0.1-SNAPSHOT")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.willfp.ecoenchants.enchantments;
|
||||||
|
|
||||||
|
import com.willfp.ecoenchants.enchantments.meta.EnchantmentTarget;
|
||||||
|
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||||
|
import org.bukkit.enchantments.Enchantment;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mock class for legacy package of eco enchants
|
||||||
|
*/
|
||||||
|
public class EcoEnchant {
|
||||||
|
|
||||||
|
public boolean conflictsWith(@NotNull Enchantment enchant) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Set<EnchantmentTarget> getTargets() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnchantmentType getType() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.willfp.ecoenchants.enchantments;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mock class for legacy package of eco enchants
|
||||||
|
*/
|
||||||
|
public class EcoEnchants {
|
||||||
|
|
||||||
|
public static List<EcoEnchant> values(){
|
||||||
|
return null; // We don't care here.
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.willfp.ecoenchants.enchantments.meta;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mock class for legacy package of eco enchants
|
||||||
|
*/
|
||||||
|
public class EnchantmentTarget {
|
||||||
|
|
||||||
|
public Set<Material> getMaterials() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.willfp.ecoenchants.enchantments.meta;
|
||||||
|
|
||||||
|
public class EnchantmentType {
|
||||||
|
|
||||||
|
public boolean isSingular() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
BIN
libs/AxPlayerWarps-1.10.3.jar
Normal file
BIN
libs/AxPlayerWarps-1.10.3.jar
Normal file
Binary file not shown.
BIN
libs/Disenchantment-6.1.5.jar
Normal file
BIN
libs/Disenchantment-6.1.5.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
libs/ExcellentEnchants-4.1.0-striped.jar
Normal file
BIN
libs/ExcellentEnchants-4.1.0-striped.jar
Normal file
Binary file not shown.
BIN
libs/ExcellentEnchants-4.3.3-striped.jar
Normal file
BIN
libs/ExcellentEnchants-4.3.3-striped.jar
Normal file
Binary file not shown.
BIN
libs/HavenBags-1.31.0.1760.jar
Normal file
BIN
libs/HavenBags-1.31.0.1760.jar
Normal file
Binary file not shown.
BIN
libs/SuperEnchants-4.6.2-all.jar
Normal file
BIN
libs/SuperEnchants-4.6.2-all.jar
Normal file
Binary file not shown.
BIN
libs/nightcore-2.7.3.jar
Normal file
BIN
libs/nightcore-2.7.3.jar
Normal file
Binary file not shown.
BIN
libs/toolstats-1.9.6-stripped.jar
Normal file
BIN
libs/toolstats-1.9.6-stripped.jar
Normal file
Binary file not shown.
1
nms/nms-common/.gitignore
vendored
Normal file
1
nms/nms-common/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
.lastDeploymentsId
|
||||||
35
nms/nms-common/build.gradle.kts
Normal file
35
nms/nms-common/build.gradle.kts
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
|
group = rootProject.group
|
||||||
|
version = rootProject.version
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("io.papermc.paperweight.userdev")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
// Used for nms
|
||||||
|
paperweight.paperDevBundle("1.21.10-R0.1-SNAPSHOT")
|
||||||
|
|
||||||
|
// Protocolib
|
||||||
|
compileOnly("net.dmulloy2:ProtocolLib:5.4.0")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("https://repo.papermc.io/repository/maven-public/")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set target version
|
||||||
|
tasks.withType<JavaCompile>().configureEach {
|
||||||
|
sourceCompatibility = "16"
|
||||||
|
targetCompatibility = "16"
|
||||||
|
|
||||||
|
options.encoding = "UTF-8"
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
compilerOptions {
|
||||||
|
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_2)
|
||||||
|
jvmTarget.set(JvmTarget.JVM_16)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package xyz.alexcrea.cuanvil.dependency.packet
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player
|
||||||
|
|
||||||
|
class NoPacketManager: PacketManager {
|
||||||
|
|
||||||
|
override val canSetInstantBuild: Boolean
|
||||||
|
get() = false
|
||||||
|
|
||||||
|
override fun setInstantBuild(player: Player, instantBuild: Boolean) {
|
||||||
|
// ProtocoLib not installed and not in a supported version: We do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package xyz.alexcrea.cuanvil.dependency.packet
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player
|
||||||
|
|
||||||
|
interface PacketManager {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the provided packet manager if able to set instant build.
|
||||||
|
*/
|
||||||
|
val canSetInstantBuild: Boolean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Try to set instant build properties
|
||||||
|
*/
|
||||||
|
fun setInstantBuild(player: Player, instantBuild: Boolean)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package xyz.alexcrea.cuanvil.dependency.packet
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player
|
||||||
|
import org.bukkit.event.Listener
|
||||||
|
|
||||||
|
abstract class PacketManagerBase() : PacketManager, Listener {
|
||||||
|
|
||||||
|
override val canSetInstantBuild: Boolean
|
||||||
|
get() = false
|
||||||
|
|
||||||
|
override fun setInstantBuild(player: Player, instantBuild: Boolean) {
|
||||||
|
// Default implementation is empty.
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package xyz.alexcrea.cuanvil.dependency.protocolib
|
package xyz.alexcrea.cuanvil.dependency.packet
|
||||||
|
|
||||||
import com.comphenix.protocol.PacketType
|
import com.comphenix.protocol.PacketType
|
||||||
import com.comphenix.protocol.ProtocolLibrary
|
import com.comphenix.protocol.ProtocolLibrary
|
||||||
|
|
@ -11,7 +11,7 @@ class ProtocoLibWrapper: PacketManager {
|
||||||
|
|
||||||
private val protocolManager: ProtocolManager = ProtocolLibrary.getProtocolManager();
|
private val protocolManager: ProtocolManager = ProtocolLibrary.getProtocolManager();
|
||||||
|
|
||||||
override val isProtocoLibInstalled: Boolean
|
override val canSetInstantBuild: Boolean
|
||||||
get() = true
|
get() = true
|
||||||
|
|
||||||
override fun setInstantBuild(player: Player, instantBuild: Boolean) {
|
override fun setInstantBuild(player: Player, instantBuild: Boolean) {
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package xyz.alexcrea.cuanvil.dependency.scheduler
|
||||||
|
|
||||||
|
import org.bukkit.entity.Entity
|
||||||
|
import org.bukkit.plugin.Plugin
|
||||||
|
|
||||||
|
interface TaskScheduler {
|
||||||
|
|
||||||
|
fun scheduleGlobally(plugin: Plugin, task: Runnable, time: Long): Any?
|
||||||
|
fun scheduleGlobally(plugin: Plugin, task: Runnable): Any?{
|
||||||
|
return scheduleGlobally(plugin, task, 0L)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun scheduleOnEntity(plugin: Plugin, entity: Entity, task: Runnable, time: Long): Any?
|
||||||
|
fun scheduleOnEntity(plugin: Plugin, entity: Entity, task: Runnable): Any?{
|
||||||
|
return scheduleOnEntity(plugin, entity, task, 0L)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,102 @@
|
||||||
|
package xyz.alexcrea.cuanvil.dependency.util
|
||||||
|
|
||||||
|
import net.kyori.adventure.text.Component
|
||||||
|
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer
|
||||||
|
import org.bukkit.inventory.ItemStack
|
||||||
|
import org.bukkit.inventory.meta.ItemMeta
|
||||||
|
|
||||||
|
// Mostly made for paper, spigot and folia support
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
|
object PlatformUtil {
|
||||||
|
|
||||||
|
private fun hasClass(className: String): Boolean {
|
||||||
|
try {
|
||||||
|
Class.forName(className)
|
||||||
|
return true
|
||||||
|
} catch (_: ClassNotFoundException) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun hasMethod(clazz: Class<*>, name: String, vararg parameterTypes: Class<*>): Boolean {
|
||||||
|
try {
|
||||||
|
clazz.getDeclaredMethod(name, *parameterTypes)
|
||||||
|
return true
|
||||||
|
} catch (_: NoSuchMethodException) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val isPaper = hasClass("com.destroystokyo.paper.PaperConfig") ||
|
||||||
|
hasClass("io.papermc.paper.configuration.Configuration")
|
||||||
|
|
||||||
|
val isFolia = hasClass("io.papermc.paper.threadedregions.RegionizedServer")
|
||||||
|
|
||||||
|
private val legacy_mm = LegacyComponentSerializer.legacySection()
|
||||||
|
|
||||||
|
// Lore
|
||||||
|
fun ItemMeta.componentLore(): MutableList<Component> {
|
||||||
|
val lore: List<Component>?
|
||||||
|
if(isPaper){
|
||||||
|
lore = this.lore()
|
||||||
|
} else {
|
||||||
|
val legacyLores = this.lore ?: return ArrayList()
|
||||||
|
|
||||||
|
lore = ArrayList(legacyLores.size)
|
||||||
|
for (legacyLore in legacyLores) {
|
||||||
|
lore.add(legacy_mm.deserialize(legacyLore))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return lore ?: ArrayList()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun ItemMeta.setComponentLore(lore: List<Component?>) {
|
||||||
|
if(isPaper){
|
||||||
|
this.lore(lore)
|
||||||
|
} else {
|
||||||
|
val legacyLore = ArrayList<String?>(lore.size)
|
||||||
|
for (component in lore) {
|
||||||
|
legacyLore.add(if(component == null) null
|
||||||
|
else legacy_mm.serialize(component))
|
||||||
|
}
|
||||||
|
|
||||||
|
this.lore = legacyLore
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Display name
|
||||||
|
private val useCustomName = hasMethod(ItemStack::class.java, "customName")
|
||||||
|
|
||||||
|
fun ItemMeta.componentDisplayName(): Component? {
|
||||||
|
if(useCustomName){
|
||||||
|
if(!this.hasCustomName()) return null
|
||||||
|
return this.customName()
|
||||||
|
}else if(isPaper){
|
||||||
|
if(!this.hasDisplayName()) return null
|
||||||
|
return this.displayName()
|
||||||
|
} else {
|
||||||
|
if(!this.hasDisplayName()) return null
|
||||||
|
|
||||||
|
val legacy = this.displayName
|
||||||
|
return legacy_mm.deserialize(legacy)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun ItemMeta.setComponentDisplayName(component: Component?) {
|
||||||
|
if(useCustomName){
|
||||||
|
this.customName(component)
|
||||||
|
}else if(isPaper){
|
||||||
|
this.displayName(component)
|
||||||
|
} else {
|
||||||
|
if(component == null){
|
||||||
|
this.setDisplayName(null)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
val legacy = legacy_mm.serialize(component)
|
||||||
|
this.setDisplayName(legacy)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package xyz.alexcrea.cuanvil.dialog
|
||||||
|
|
||||||
|
import org.bukkit.NamespacedKey
|
||||||
|
import org.bukkit.entity.HumanEntity
|
||||||
|
import org.bukkit.event.inventory.PrepareAnvilEvent
|
||||||
|
|
||||||
|
interface AnvilRenameDialog {
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
val PCD_KEEP_RENAME_TEXT_KEY = NamespacedKey.fromString("customanvil:last_rename_text")!!
|
||||||
|
}
|
||||||
|
|
||||||
|
fun canSendDialog(): Boolean
|
||||||
|
|
||||||
|
fun tryShowDialog(player: HumanEntity, event: PrepareAnvilEvent)
|
||||||
|
|
||||||
|
fun closeInventory(player: HumanEntity)
|
||||||
|
|
||||||
|
fun currentText(player: HumanEntity): String?
|
||||||
|
|
||||||
|
fun isOpenFor(player: HumanEntity): Boolean
|
||||||
|
|
||||||
|
}
|
||||||
1
nms/nms-paper/.gitignore
vendored
Normal file
1
nms/nms-paper/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
.lastDeploymentsId
|
||||||
35
nms/nms-paper/build.gradle.kts
Normal file
35
nms/nms-paper/build.gradle.kts
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
|
group = rootProject.group
|
||||||
|
version = rootProject.version
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("io.papermc.paperweight.userdev")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":nms:nms-common"))
|
||||||
|
|
||||||
|
// Used for nms
|
||||||
|
paperweight.paperDevBundle("1.21.7-R0.1-SNAPSHOT")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("https://repo.papermc.io/repository/maven-public/")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set target version
|
||||||
|
tasks.withType<JavaCompile>().configureEach {
|
||||||
|
sourceCompatibility = "18"
|
||||||
|
targetCompatibility = "18"
|
||||||
|
|
||||||
|
options.encoding = "UTF-8"
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
compilerOptions {
|
||||||
|
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_2)
|
||||||
|
jvmTarget.set(JvmTarget.JVM_18)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
package xyz.alexcrea.cuanvil.dependency.datapack
|
||||||
|
|
||||||
|
import io.papermc.paper.datapack.Datapack
|
||||||
|
import org.bukkit.Bukkit
|
||||||
|
import org.bukkit.packs.DataPack
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
|
object DataPackTester {
|
||||||
|
val legacyNames: List<String>
|
||||||
|
get() = Bukkit.getDataPackManager().dataPacks
|
||||||
|
.stream().filter { obj -> obj.isEnabled }
|
||||||
|
.map { pack -> pack.key.key }
|
||||||
|
.toList()
|
||||||
|
|
||||||
|
val enabledPacks: List<String>
|
||||||
|
get() {
|
||||||
|
try {
|
||||||
|
// will throw error if do not exist
|
||||||
|
Bukkit::class.java.getDeclaredMethod("getDatapackManager")
|
||||||
|
|
||||||
|
return Bukkit.getDatapackManager().enabledPacks
|
||||||
|
.stream().map { obj: Datapack -> obj.name }
|
||||||
|
.toList()
|
||||||
|
} catch (e: NoSuchMethodException) {
|
||||||
|
try {
|
||||||
|
DataPack::class.java.getDeclaredMethod("getKey")
|
||||||
|
} catch (e: NoSuchMethodException) {
|
||||||
|
System.err.println("Could not find compatible datapack manager")
|
||||||
|
System.err.println("If you are using a datapack that should be compatible with CustomAnvil. It will not get detected...")
|
||||||
|
return emptyList()
|
||||||
|
}
|
||||||
|
return legacyNames
|
||||||
|
} catch (e: Exception){
|
||||||
|
// Assume cause UnimplementedOperationException on mock server
|
||||||
|
return Collections.emptyList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package xyz.alexcrea.cuanvil.dependency.packet.versions
|
||||||
|
|
||||||
|
import net.minecraft.network.protocol.game.ClientboundPlayerAbilitiesPacket
|
||||||
|
import net.minecraft.world.entity.player.Abilities
|
||||||
|
import org.bukkit.craftbukkit.entity.CraftPlayer
|
||||||
|
import org.bukkit.entity.Player
|
||||||
|
import xyz.alexcrea.cuanvil.dependency.packet.PacketManager
|
||||||
|
import xyz.alexcrea.cuanvil.dependency.packet.PacketManagerBase
|
||||||
|
|
||||||
|
class PaperPacketManager : PacketManagerBase(), PacketManager {
|
||||||
|
override val canSetInstantBuild: Boolean
|
||||||
|
get() = true
|
||||||
|
|
||||||
|
override fun setInstantBuild(player: Player, instantBuild: Boolean) {
|
||||||
|
val nmsPlayer = (player as CraftPlayer).handle
|
||||||
|
val playerAbilities = nmsPlayer.abilities
|
||||||
|
val sendedAbilities: Abilities
|
||||||
|
if (playerAbilities.instabuild == instantBuild) {
|
||||||
|
sendedAbilities = playerAbilities
|
||||||
|
} else {
|
||||||
|
sendedAbilities = Abilities()
|
||||||
|
sendedAbilities.invulnerable = playerAbilities.invulnerable
|
||||||
|
sendedAbilities.flying = playerAbilities.flying
|
||||||
|
sendedAbilities.mayfly = playerAbilities.mayfly
|
||||||
|
sendedAbilities.instabuild = instantBuild
|
||||||
|
sendedAbilities.mayBuild = playerAbilities.mayBuild
|
||||||
|
sendedAbilities.setFlyingSpeed(playerAbilities.getFlyingSpeed())
|
||||||
|
sendedAbilities.setWalkingSpeed(playerAbilities.getWalkingSpeed())
|
||||||
|
}
|
||||||
|
val packet = ClientboundPlayerAbilitiesPacket(sendedAbilities)
|
||||||
|
nmsPlayer.connection.send(packet)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
package xyz.alexcrea.cuanvil.dependency.scheduler
|
||||||
|
|
||||||
|
import io.papermc.paper.threadedregions.scheduler.ScheduledTask
|
||||||
|
import org.bukkit.Bukkit
|
||||||
|
import org.bukkit.entity.Entity
|
||||||
|
import org.bukkit.plugin.Plugin
|
||||||
|
import java.util.function.Consumer
|
||||||
|
|
||||||
|
class FoliaScheduler : TaskScheduler {
|
||||||
|
override fun scheduleGlobally(plugin: Plugin, task: Runnable, time: Long): Any? {
|
||||||
|
if(time < 1){
|
||||||
|
return Bukkit.getGlobalRegionScheduler().run(
|
||||||
|
plugin
|
||||||
|
) { scheduledTask: ScheduledTask? -> task.run() }
|
||||||
|
}
|
||||||
|
return Bukkit.getGlobalRegionScheduler().runDelayed(
|
||||||
|
plugin,
|
||||||
|
{ scheduledTask: ScheduledTask? -> task.run() },
|
||||||
|
time
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override fun scheduleOnEntity(plugin: Plugin, entity: Entity, task: Runnable, time: Long): Any? {
|
||||||
|
if(time < 1){
|
||||||
|
return entity.scheduler.run(
|
||||||
|
plugin,
|
||||||
|
{ scheduledTask: ScheduledTask? -> task.run() },
|
||||||
|
{}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return entity.scheduler.runDelayed(
|
||||||
|
plugin,
|
||||||
|
{ scheduledTask: ScheduledTask? -> task.run() },
|
||||||
|
{},
|
||||||
|
time
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,236 @@
|
||||||
|
package xyz.alexcrea.cuanvil.dialog
|
||||||
|
|
||||||
|
import io.papermc.paper.dialog.Dialog
|
||||||
|
import io.papermc.paper.registry.data.dialog.ActionButton
|
||||||
|
import io.papermc.paper.registry.data.dialog.DialogBase
|
||||||
|
import io.papermc.paper.registry.data.dialog.action.DialogAction
|
||||||
|
import io.papermc.paper.registry.data.dialog.body.DialogBody
|
||||||
|
import io.papermc.paper.registry.data.dialog.input.DialogInput
|
||||||
|
import io.papermc.paper.registry.data.dialog.type.DialogType
|
||||||
|
import io.papermc.paper.threadedregions.scheduler.ScheduledTask
|
||||||
|
import net.kyori.adventure.text.Component
|
||||||
|
import net.kyori.adventure.text.event.ClickCallback
|
||||||
|
import net.kyori.adventure.text.format.TextColor
|
||||||
|
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer
|
||||||
|
import net.minecraft.world.inventory.AnvilMenu
|
||||||
|
import org.bukkit.craftbukkit.event.CraftEventFactory
|
||||||
|
import org.bukkit.craftbukkit.inventory.CraftInventoryView
|
||||||
|
import org.bukkit.craftbukkit.inventory.view.CraftAnvilView
|
||||||
|
import org.bukkit.entity.HumanEntity
|
||||||
|
import org.bukkit.event.inventory.PrepareAnvilEvent
|
||||||
|
import org.bukkit.inventory.InventoryView
|
||||||
|
import org.bukkit.inventory.ItemStack
|
||||||
|
import org.bukkit.persistence.PersistentDataType
|
||||||
|
import org.bukkit.plugin.Plugin
|
||||||
|
import java.util.*
|
||||||
|
import java.util.function.BiFunction
|
||||||
|
import java.util.function.Consumer
|
||||||
|
import java.util.function.Supplier
|
||||||
|
|
||||||
|
@Suppress("UnstableApiUsage")
|
||||||
|
class AnvilRenameDialogImpl(
|
||||||
|
val fromFormated: BiFunction<HumanEntity, Component?, String?>,
|
||||||
|
val keepUserPreviousDialog: Supplier<Boolean>,
|
||||||
|
val maxLength: Supplier<Int>,
|
||||||
|
val plugin: Plugin,
|
||||||
|
) : AnvilRenameDialog {
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
private const val RENAME_TEXT_KEY = "rename"
|
||||||
|
|
||||||
|
private const val MAX_WIDTH = 512
|
||||||
|
|
||||||
|
private val PLAIN_TEXT_SERIALIZER = PlainTextComponentSerializer.plainText()
|
||||||
|
|
||||||
|
// Need to be able to translate it later !
|
||||||
|
private val USER_FACING_RENAME_TITLE = Component.text("Rename Your Item")
|
||||||
|
private val USER_FACING_WARNING = Component.text(
|
||||||
|
"Note that the repair text will appear blank after Confirm\n" +
|
||||||
|
"But the name will be correctly applied"
|
||||||
|
)
|
||||||
|
private val USER_FACING_CONFIRM = Component.text("Confirm").color(TextColor.fromHexString("#40FF40"))
|
||||||
|
private val USER_FACING_CANCEL = Component.text("Cancel").color(TextColor.fromHexString("#FF4040"))
|
||||||
|
|
||||||
|
fun itemDefaultName(item: ItemStack?): String? {
|
||||||
|
return PLAIN_TEXT_SERIALIZER.serializeOrNull(item?.effectiveName())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private val lastNames = HashMap<UUID, String>()
|
||||||
|
private val lastRenames = HashMap<UUID, String>()
|
||||||
|
|
||||||
|
|
||||||
|
private val lastLeftItem = HashMap<UUID, String>()
|
||||||
|
private val runTaskMap = HashMap<UUID, ScheduledTask>()
|
||||||
|
|
||||||
|
// For monetary cost
|
||||||
|
val hasUiOpen = HashSet<UUID>()
|
||||||
|
|
||||||
|
private val containerField = CraftInventoryView::class.java.getDeclaredField("container")
|
||||||
|
|
||||||
|
init {
|
||||||
|
containerField.setAccessible(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun canSendDialog(): Boolean {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
fun makeDialog(playerID: UUID, initial: String?, callback: Consumer<String?>): Dialog {
|
||||||
|
val maxLength = this.maxLength.get()
|
||||||
|
val initialFinal = initial?.take(maxLength)
|
||||||
|
|
||||||
|
val baseBuilder = DialogBase.builder(USER_FACING_RENAME_TITLE)
|
||||||
|
.canCloseWithEscape(true)
|
||||||
|
.afterAction(DialogBase.DialogAfterAction.CLOSE)
|
||||||
|
.inputs(
|
||||||
|
listOf(
|
||||||
|
DialogInput.text(RENAME_TEXT_KEY, Component.text("Rename text"))
|
||||||
|
.maxLength(maxLength)
|
||||||
|
.initial(initialFinal ?: "")
|
||||||
|
.labelVisible(false)
|
||||||
|
.width(MAX_WIDTH)
|
||||||
|
.build(),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
baseBuilder.body(
|
||||||
|
listOf(
|
||||||
|
DialogBody.plainMessage(USER_FACING_WARNING, MAX_WIDTH)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
return Dialog.create { builder ->
|
||||||
|
builder.empty()
|
||||||
|
.base(baseBuilder.build())
|
||||||
|
.type(
|
||||||
|
DialogType.confirmation(
|
||||||
|
ActionButton.builder(USER_FACING_CONFIRM)
|
||||||
|
.action(DialogAction.customClick({ response, _ ->
|
||||||
|
hasUiOpen.remove(playerID)
|
||||||
|
val text = response.getText(RENAME_TEXT_KEY)!!
|
||||||
|
callback.accept(text)
|
||||||
|
}, ClickCallback.Options.builder().build()))
|
||||||
|
.build(),
|
||||||
|
ActionButton.builder(USER_FACING_CANCEL)
|
||||||
|
.action(DialogAction.customClick({ response, _ ->
|
||||||
|
hasUiOpen.remove(playerID)
|
||||||
|
}, ClickCallback.Options.builder().build()))
|
||||||
|
.build(),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setResult(player: HumanEntity, view: InventoryView, result: String?) {
|
||||||
|
val defaultName = itemDefaultName(view.getItem(0))
|
||||||
|
if (defaultName == result) {
|
||||||
|
setName(player, view, "", null)
|
||||||
|
if (defaultName != null) lastNames[player.uniqueId] = defaultName
|
||||||
|
} else setName(player, view, result, result)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setName(player: HumanEntity, view: InventoryView, name: String?, rename: String?) {
|
||||||
|
val menu = (containerField.get(view) as AnvilMenu)
|
||||||
|
val isSameName = menu.itemName == name
|
||||||
|
menu.itemName = rename
|
||||||
|
|
||||||
|
if (name == null)
|
||||||
|
lastNames.remove(player.uniqueId)
|
||||||
|
else
|
||||||
|
lastNames[player.uniqueId] = name
|
||||||
|
|
||||||
|
if (rename == null)
|
||||||
|
lastRenames.remove(player.uniqueId)
|
||||||
|
else
|
||||||
|
lastRenames[player.uniqueId] = rename
|
||||||
|
|
||||||
|
if (!isSameName)
|
||||||
|
CraftEventFactory.callPrepareResultEvent(menu, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun nameFromItem(player: HumanEntity, item: ItemStack?): String? {
|
||||||
|
// Already has text
|
||||||
|
if (item?.hasItemMeta() != true || !item.itemMeta.hasCustomName())
|
||||||
|
return PLAIN_TEXT_SERIALIZER.serializeOrNull(item?.effectiveName())
|
||||||
|
|
||||||
|
if (keepUserPreviousDialog.get() && item.hasItemMeta()) {
|
||||||
|
val lastName = item.itemMeta.persistentDataContainer.get(
|
||||||
|
AnvilRenameDialog.PCD_KEEP_RENAME_TEXT_KEY,
|
||||||
|
PersistentDataType.STRING
|
||||||
|
)
|
||||||
|
|
||||||
|
if (lastName != null) return lastName
|
||||||
|
}
|
||||||
|
|
||||||
|
return fromFormated.apply(player, item.effectiveName())
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun tryShowDialogScheduled(player: HumanEntity, event: PrepareAnvilEvent) {
|
||||||
|
val view = event.view
|
||||||
|
if (view !is CraftAnvilView) return
|
||||||
|
|
||||||
|
val renameText = view.renameText
|
||||||
|
val leftItem = view.getItem(0)
|
||||||
|
val leftItemStr = leftItem?.toString()
|
||||||
|
|
||||||
|
val lastName = lastNames.getOrDefault(player.uniqueId, null)
|
||||||
|
val lastRename = lastRenames.getOrDefault(player.uniqueId, null)
|
||||||
|
|
||||||
|
if (lastLeftItem.getOrDefault(player.uniqueId, null) != leftItemStr) {
|
||||||
|
if (leftItemStr == null)
|
||||||
|
lastLeftItem.remove(player.uniqueId)
|
||||||
|
else lastLeftItem[player.uniqueId] = leftItemStr
|
||||||
|
|
||||||
|
setName(player, view, renameText, nameFromItem(player, leftItem))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lastName == renameText || lastRename == renameText)
|
||||||
|
return
|
||||||
|
|
||||||
|
if (renameText?.isBlank() == true || renameText == itemDefaultName(leftItem)) {
|
||||||
|
setName(player, view, lastName, lastRename)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
val dialog = makeDialog(player.uniqueId, lastRename)
|
||||||
|
{ result -> setResult(player, view, result) }
|
||||||
|
player.showDialog(dialog)
|
||||||
|
|
||||||
|
hasUiOpen.add(player.uniqueId)
|
||||||
|
}
|
||||||
|
|
||||||
|
// We need to wait for a short time as changing item will change the name BEFORE the item change
|
||||||
|
// no guaranty both of them came in the same tick too so let's wait 2 tick....
|
||||||
|
override fun tryShowDialog(player: HumanEntity, event: PrepareAnvilEvent) {
|
||||||
|
runTaskMap.remove(player.uniqueId)?.cancel()
|
||||||
|
|
||||||
|
val task = player.scheduler.runDelayed(
|
||||||
|
plugin,
|
||||||
|
{ _ ->
|
||||||
|
run { tryShowDialogScheduled(player, event) }
|
||||||
|
},
|
||||||
|
{},
|
||||||
|
2
|
||||||
|
)
|
||||||
|
if (task == null) return
|
||||||
|
|
||||||
|
runTaskMap[player.uniqueId] = task
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun closeInventory(player: HumanEntity) {
|
||||||
|
lastNames.remove(player.uniqueId)
|
||||||
|
lastRenames.remove(player.uniqueId)
|
||||||
|
lastLeftItem.remove(player.uniqueId)
|
||||||
|
runTaskMap.remove(player.uniqueId)?.cancel()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun currentText(player: HumanEntity): String? {
|
||||||
|
return lastNames[player.uniqueId]
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun isOpenFor(player: HumanEntity): Boolean {
|
||||||
|
return hasUiOpen.contains(player.uniqueId)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
package xyz.alexcrea.cuanvil.util
|
||||||
|
|
||||||
|
import io.papermc.paper.threadedregions.scheduler.ScheduledTask
|
||||||
|
import org.bukkit.entity.HumanEntity
|
||||||
|
import org.bukkit.inventory.InventoryView
|
||||||
|
import org.bukkit.plugin.Plugin
|
||||||
|
import xyz.alexcrea.cuanvil.dialog.AnvilRenameDialog
|
||||||
|
import java.util.HashMap
|
||||||
|
import java.util.UUID
|
||||||
|
|
||||||
|
object AnvilTitleUtil {
|
||||||
|
|
||||||
|
private val runTaskMap = HashMap<UUID, ScheduledTask>()
|
||||||
|
|
||||||
|
private fun actualRename(view: InventoryView, name: String, player: HumanEntity, anvilDialog: AnvilRenameDialog) {
|
||||||
|
runTaskMap.remove(player.uniqueId)
|
||||||
|
if (view.title == name) return
|
||||||
|
|
||||||
|
// We assume rename impl is used
|
||||||
|
if (anvilDialog.isOpenFor(player)) return
|
||||||
|
|
||||||
|
view.title = name
|
||||||
|
}
|
||||||
|
|
||||||
|
// We don't want to rename instantly it is causing issue with rename text
|
||||||
|
// especially as it can "override" current ui when it is rename ui time but rename ui also need some delay
|
||||||
|
fun rename(view: InventoryView, name: String, player: HumanEntity, anvilDialog: AnvilRenameDialog, plugin: Plugin) {
|
||||||
|
runTaskMap.remove(player.uniqueId)?.cancel()
|
||||||
|
|
||||||
|
val task = player.scheduler.runDelayed(
|
||||||
|
plugin,
|
||||||
|
{ _ ->
|
||||||
|
run { actualRename(view, name, player, anvilDialog) }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
runTaskMap.remove(player.uniqueId)
|
||||||
|
},
|
||||||
|
2
|
||||||
|
)
|
||||||
|
|
||||||
|
if (task == null) return
|
||||||
|
runTaskMap[player.uniqueId] = task
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
1
nms/v1_17R1/.gitignore
vendored
Normal file
1
nms/v1_17R1/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
.lastDeploymentsId
|
||||||
35
nms/v1_17R1/build.gradle.kts
Normal file
35
nms/v1_17R1/build.gradle.kts
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
|
group = rootProject.group
|
||||||
|
version = rootProject.version
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("io.papermc.paperweight.userdev")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":nms:nms-common"))
|
||||||
|
|
||||||
|
// Used for nms
|
||||||
|
paperweight.paperDevBundle("1.17.1-R0.1-SNAPSHOT")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("https://repo.papermc.io/repository/maven-public/")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set target version
|
||||||
|
tasks.withType<JavaCompile>().configureEach {
|
||||||
|
sourceCompatibility = "16"
|
||||||
|
targetCompatibility = "16"
|
||||||
|
|
||||||
|
options.encoding = "UTF-8"
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
compilerOptions {
|
||||||
|
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_2)
|
||||||
|
jvmTarget.set(JvmTarget.JVM_16)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package xyz.alexcrea.cuanvil.dependency.packet.versions
|
||||||
|
|
||||||
|
import net.minecraft.network.protocol.game.ClientboundPlayerAbilitiesPacket
|
||||||
|
import net.minecraft.world.entity.player.Abilities
|
||||||
|
import org.bukkit.craftbukkit.v1_17_R1.entity.CraftPlayer
|
||||||
|
import org.bukkit.entity.Player
|
||||||
|
import xyz.alexcrea.cuanvil.dependency.packet.PacketManager
|
||||||
|
import xyz.alexcrea.cuanvil.dependency.packet.PacketManagerBase
|
||||||
|
|
||||||
|
class V1_17R1_PacketManager : PacketManagerBase(), PacketManager {
|
||||||
|
override val canSetInstantBuild: Boolean
|
||||||
|
get() = true
|
||||||
|
|
||||||
|
override fun setInstantBuild(player: Player, instantBuild: Boolean) {
|
||||||
|
val nmsPlayer = (player as CraftPlayer).handle
|
||||||
|
val playerAbilities = nmsPlayer.abilities
|
||||||
|
val sendedAbilities: Abilities
|
||||||
|
if (playerAbilities.instabuild == instantBuild) {
|
||||||
|
sendedAbilities = playerAbilities
|
||||||
|
} else {
|
||||||
|
sendedAbilities = Abilities()
|
||||||
|
sendedAbilities.invulnerable = playerAbilities.invulnerable
|
||||||
|
sendedAbilities.flying = playerAbilities.flying
|
||||||
|
sendedAbilities.mayfly = playerAbilities.mayfly
|
||||||
|
sendedAbilities.instabuild = instantBuild
|
||||||
|
sendedAbilities.mayBuild = playerAbilities.mayBuild
|
||||||
|
sendedAbilities.flyingSpeed = playerAbilities.flyingSpeed
|
||||||
|
sendedAbilities.walkingSpeed = playerAbilities.walkingSpeed
|
||||||
|
}
|
||||||
|
val packet = ClientboundPlayerAbilitiesPacket(sendedAbilities)
|
||||||
|
nmsPlayer.connection.send(packet)
|
||||||
|
}
|
||||||
|
}
|
||||||
1
nms/v1_18R1/.gitignore
vendored
Normal file
1
nms/v1_18R1/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
.lastDeploymentsId
|
||||||
35
nms/v1_18R1/build.gradle.kts
Normal file
35
nms/v1_18R1/build.gradle.kts
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
|
group = rootProject.group
|
||||||
|
version = rootProject.version
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("io.papermc.paperweight.userdev")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":nms:nms-common"))
|
||||||
|
|
||||||
|
// Used for nms
|
||||||
|
paperweight.paperDevBundle("1.18.1-R0.1-SNAPSHOT")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("https://repo.papermc.io/repository/maven-public/")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set target version
|
||||||
|
tasks.withType<JavaCompile>().configureEach {
|
||||||
|
sourceCompatibility = "17"
|
||||||
|
targetCompatibility = "17"
|
||||||
|
|
||||||
|
options.encoding = "UTF-8"
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
compilerOptions {
|
||||||
|
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_2)
|
||||||
|
jvmTarget.set(JvmTarget.JVM_17)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package xyz.alexcrea.cuanvil.dependency.packet.versions
|
||||||
|
|
||||||
|
import net.minecraft.network.protocol.game.ClientboundPlayerAbilitiesPacket
|
||||||
|
import net.minecraft.world.entity.player.Abilities
|
||||||
|
import org.bukkit.craftbukkit.v1_18_R1.entity.CraftPlayer
|
||||||
|
import org.bukkit.entity.Player
|
||||||
|
import xyz.alexcrea.cuanvil.dependency.packet.PacketManager
|
||||||
|
import xyz.alexcrea.cuanvil.dependency.packet.PacketManagerBase
|
||||||
|
|
||||||
|
class V1_18R1_PacketManager : PacketManagerBase(), PacketManager {
|
||||||
|
override val canSetInstantBuild: Boolean
|
||||||
|
get() = true
|
||||||
|
|
||||||
|
override fun setInstantBuild(player: Player, instantBuild: Boolean) {
|
||||||
|
val nmsPlayer = (player as CraftPlayer).handle
|
||||||
|
val playerAbilities = nmsPlayer.abilities
|
||||||
|
val sendedAbilities: Abilities
|
||||||
|
if (playerAbilities.instabuild == instantBuild) {
|
||||||
|
sendedAbilities = playerAbilities
|
||||||
|
} else {
|
||||||
|
sendedAbilities = Abilities()
|
||||||
|
sendedAbilities.invulnerable = playerAbilities.invulnerable
|
||||||
|
sendedAbilities.flying = playerAbilities.flying
|
||||||
|
sendedAbilities.mayfly = playerAbilities.mayfly
|
||||||
|
sendedAbilities.instabuild = instantBuild
|
||||||
|
sendedAbilities.mayBuild = playerAbilities.mayBuild
|
||||||
|
sendedAbilities.flyingSpeed = playerAbilities.flyingSpeed
|
||||||
|
sendedAbilities.walkingSpeed = playerAbilities.walkingSpeed
|
||||||
|
}
|
||||||
|
val packet = ClientboundPlayerAbilitiesPacket(sendedAbilities)
|
||||||
|
nmsPlayer.connection.send(packet)
|
||||||
|
}
|
||||||
|
}
|
||||||
1
nms/v1_18R2/.gitignore
vendored
Normal file
1
nms/v1_18R2/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
.lastDeploymentsId
|
||||||
35
nms/v1_18R2/build.gradle.kts
Normal file
35
nms/v1_18R2/build.gradle.kts
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
|
group = rootProject.group
|
||||||
|
version = rootProject.version
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("io.papermc.paperweight.userdev")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":nms:nms-common"))
|
||||||
|
|
||||||
|
// Used for nms
|
||||||
|
paperweight.paperDevBundle("1.18.2-R0.1-SNAPSHOT")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("https://repo.papermc.io/repository/maven-public/")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set target version
|
||||||
|
tasks.withType<JavaCompile>().configureEach {
|
||||||
|
sourceCompatibility = "17"
|
||||||
|
targetCompatibility = "17"
|
||||||
|
|
||||||
|
options.encoding = "UTF-8"
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
compilerOptions {
|
||||||
|
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_2)
|
||||||
|
jvmTarget.set(JvmTarget.JVM_17)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package xyz.alexcrea.cuanvil.dependency.packet.versions
|
||||||
|
|
||||||
|
import net.minecraft.network.protocol.game.ClientboundPlayerAbilitiesPacket
|
||||||
|
import net.minecraft.world.entity.player.Abilities
|
||||||
|
import org.bukkit.craftbukkit.v1_18_R2.entity.CraftPlayer
|
||||||
|
import org.bukkit.entity.Player
|
||||||
|
import xyz.alexcrea.cuanvil.dependency.packet.PacketManager
|
||||||
|
import xyz.alexcrea.cuanvil.dependency.packet.PacketManagerBase
|
||||||
|
|
||||||
|
class V1_18R2_PacketManager : PacketManagerBase(), PacketManager {
|
||||||
|
override val canSetInstantBuild: Boolean
|
||||||
|
get() = true
|
||||||
|
|
||||||
|
override fun setInstantBuild(player: Player, instantBuild: Boolean) {
|
||||||
|
val nmsPlayer = (player as CraftPlayer).handle
|
||||||
|
val playerAbilities = nmsPlayer.abilities
|
||||||
|
val sendedAbilities: Abilities
|
||||||
|
if (playerAbilities.instabuild == instantBuild) {
|
||||||
|
sendedAbilities = playerAbilities
|
||||||
|
} else {
|
||||||
|
sendedAbilities = Abilities()
|
||||||
|
sendedAbilities.invulnerable = playerAbilities.invulnerable
|
||||||
|
sendedAbilities.flying = playerAbilities.flying
|
||||||
|
sendedAbilities.mayfly = playerAbilities.mayfly
|
||||||
|
sendedAbilities.instabuild = instantBuild
|
||||||
|
sendedAbilities.mayBuild = playerAbilities.mayBuild
|
||||||
|
sendedAbilities.flyingSpeed = playerAbilities.flyingSpeed
|
||||||
|
sendedAbilities.walkingSpeed = playerAbilities.walkingSpeed
|
||||||
|
}
|
||||||
|
val packet = ClientboundPlayerAbilitiesPacket(sendedAbilities)
|
||||||
|
nmsPlayer.connection.send(packet)
|
||||||
|
}
|
||||||
|
}
|
||||||
1
nms/v1_19R1/.gitignore
vendored
Normal file
1
nms/v1_19R1/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
.lastDeploymentsId
|
||||||
35
nms/v1_19R1/build.gradle.kts
Normal file
35
nms/v1_19R1/build.gradle.kts
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
|
group = rootProject.group
|
||||||
|
version = rootProject.version
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("io.papermc.paperweight.userdev")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":nms:nms-common"))
|
||||||
|
|
||||||
|
// Used for nms
|
||||||
|
paperweight.paperDevBundle("1.19.2-R0.1-SNAPSHOT")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("https://repo.papermc.io/repository/maven-public/")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set target version
|
||||||
|
tasks.withType<JavaCompile>().configureEach {
|
||||||
|
sourceCompatibility = "17"
|
||||||
|
targetCompatibility = "17"
|
||||||
|
|
||||||
|
options.encoding = "UTF-8"
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
compilerOptions {
|
||||||
|
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_2)
|
||||||
|
jvmTarget.set(JvmTarget.JVM_17)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package xyz.alexcrea.cuanvil.dependency.packet.versions
|
||||||
|
|
||||||
|
import net.minecraft.network.protocol.game.ClientboundPlayerAbilitiesPacket
|
||||||
|
import net.minecraft.world.entity.player.Abilities
|
||||||
|
import org.bukkit.craftbukkit.v1_19_R1.entity.CraftPlayer
|
||||||
|
import org.bukkit.entity.Player
|
||||||
|
import xyz.alexcrea.cuanvil.dependency.packet.PacketManager
|
||||||
|
import xyz.alexcrea.cuanvil.dependency.packet.PacketManagerBase
|
||||||
|
|
||||||
|
class V1_19R1_PacketManager : PacketManagerBase(), PacketManager {
|
||||||
|
override val canSetInstantBuild: Boolean
|
||||||
|
get() = true
|
||||||
|
|
||||||
|
override fun setInstantBuild(player: Player, instantBuild: Boolean) {
|
||||||
|
val nmsPlayer = (player as CraftPlayer).handle
|
||||||
|
val playerAbilities = nmsPlayer.abilities
|
||||||
|
val sendedAbilities: Abilities
|
||||||
|
if (playerAbilities.instabuild == instantBuild) {
|
||||||
|
sendedAbilities = playerAbilities
|
||||||
|
} else {
|
||||||
|
sendedAbilities = Abilities()
|
||||||
|
sendedAbilities.invulnerable = playerAbilities.invulnerable
|
||||||
|
sendedAbilities.flying = playerAbilities.flying
|
||||||
|
sendedAbilities.mayfly = playerAbilities.mayfly
|
||||||
|
sendedAbilities.instabuild = instantBuild
|
||||||
|
sendedAbilities.mayBuild = playerAbilities.mayBuild
|
||||||
|
sendedAbilities.flyingSpeed = playerAbilities.flyingSpeed
|
||||||
|
sendedAbilities.walkingSpeed = playerAbilities.walkingSpeed
|
||||||
|
}
|
||||||
|
val packet = ClientboundPlayerAbilitiesPacket(sendedAbilities)
|
||||||
|
nmsPlayer.connection.send(packet)
|
||||||
|
}
|
||||||
|
}
|
||||||
1
nms/v1_19R2/.gitignore
vendored
Normal file
1
nms/v1_19R2/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
.lastDeploymentsId
|
||||||
35
nms/v1_19R2/build.gradle.kts
Normal file
35
nms/v1_19R2/build.gradle.kts
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
|
group = rootProject.group
|
||||||
|
version = rootProject.version
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("io.papermc.paperweight.userdev")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":nms:nms-common"))
|
||||||
|
|
||||||
|
// Used for nms
|
||||||
|
paperweight.paperDevBundle("1.19.3-R0.1-SNAPSHOT")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("https://repo.papermc.io/repository/maven-public/")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set target version
|
||||||
|
tasks.withType<JavaCompile>().configureEach {
|
||||||
|
sourceCompatibility = "17"
|
||||||
|
targetCompatibility = "17"
|
||||||
|
|
||||||
|
options.encoding = "UTF-8"
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
compilerOptions {
|
||||||
|
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_2)
|
||||||
|
jvmTarget.set(JvmTarget.JVM_17)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package xyz.alexcrea.cuanvil.dependency.packet.versions
|
||||||
|
|
||||||
|
import net.minecraft.network.protocol.game.ClientboundPlayerAbilitiesPacket
|
||||||
|
import net.minecraft.world.entity.player.Abilities
|
||||||
|
import org.bukkit.craftbukkit.v1_19_R2.entity.CraftPlayer
|
||||||
|
import org.bukkit.entity.Player
|
||||||
|
import xyz.alexcrea.cuanvil.dependency.packet.PacketManager
|
||||||
|
import xyz.alexcrea.cuanvil.dependency.packet.PacketManagerBase
|
||||||
|
|
||||||
|
class V1_19R2_PacketManager : PacketManagerBase(), PacketManager {
|
||||||
|
override val canSetInstantBuild: Boolean
|
||||||
|
get() = true
|
||||||
|
|
||||||
|
override fun setInstantBuild(player: Player, instantBuild: Boolean) {
|
||||||
|
val nmsPlayer = (player as CraftPlayer).handle
|
||||||
|
val playerAbilities = nmsPlayer.abilities
|
||||||
|
val sendedAbilities: Abilities
|
||||||
|
if (playerAbilities.instabuild == instantBuild) {
|
||||||
|
sendedAbilities = playerAbilities
|
||||||
|
} else {
|
||||||
|
sendedAbilities = Abilities()
|
||||||
|
sendedAbilities.invulnerable = playerAbilities.invulnerable
|
||||||
|
sendedAbilities.flying = playerAbilities.flying
|
||||||
|
sendedAbilities.mayfly = playerAbilities.mayfly
|
||||||
|
sendedAbilities.instabuild = instantBuild
|
||||||
|
sendedAbilities.mayBuild = playerAbilities.mayBuild
|
||||||
|
sendedAbilities.flyingSpeed = playerAbilities.flyingSpeed
|
||||||
|
sendedAbilities.walkingSpeed = playerAbilities.walkingSpeed
|
||||||
|
}
|
||||||
|
val packet = ClientboundPlayerAbilitiesPacket(sendedAbilities)
|
||||||
|
nmsPlayer.connection.send(packet)
|
||||||
|
}
|
||||||
|
}
|
||||||
1
nms/v1_19R3/.gitignore
vendored
Normal file
1
nms/v1_19R3/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
.lastDeploymentsId
|
||||||
35
nms/v1_19R3/build.gradle.kts
Normal file
35
nms/v1_19R3/build.gradle.kts
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
|
group = rootProject.group
|
||||||
|
version = rootProject.version
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("io.papermc.paperweight.userdev")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":nms:nms-common"))
|
||||||
|
|
||||||
|
// Used for nms
|
||||||
|
paperweight.paperDevBundle("1.19.4-R0.1-SNAPSHOT")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("https://repo.papermc.io/repository/maven-public/")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set target version
|
||||||
|
tasks.withType<JavaCompile>().configureEach {
|
||||||
|
sourceCompatibility = "17"
|
||||||
|
targetCompatibility = "17"
|
||||||
|
|
||||||
|
options.encoding = "UTF-8"
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
compilerOptions {
|
||||||
|
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_2)
|
||||||
|
jvmTarget.set(JvmTarget.JVM_17)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package xyz.alexcrea.cuanvil.dependency.packet.versions
|
||||||
|
|
||||||
|
import net.minecraft.network.protocol.game.ClientboundPlayerAbilitiesPacket
|
||||||
|
import net.minecraft.world.entity.player.Abilities
|
||||||
|
import org.bukkit.craftbukkit.v1_19_R3.entity.CraftPlayer
|
||||||
|
import org.bukkit.entity.Player
|
||||||
|
import xyz.alexcrea.cuanvil.dependency.packet.PacketManager
|
||||||
|
import xyz.alexcrea.cuanvil.dependency.packet.PacketManagerBase
|
||||||
|
|
||||||
|
class V1_19R3_PacketManager : PacketManagerBase(), PacketManager {
|
||||||
|
override val canSetInstantBuild: Boolean
|
||||||
|
get() = true
|
||||||
|
|
||||||
|
override fun setInstantBuild(player: Player, instantBuild: Boolean) {
|
||||||
|
val nmsPlayer = (player as CraftPlayer).handle
|
||||||
|
val playerAbilities = nmsPlayer.abilities
|
||||||
|
val sendedAbilities: Abilities
|
||||||
|
if (playerAbilities.instabuild == instantBuild) {
|
||||||
|
sendedAbilities = playerAbilities
|
||||||
|
} else {
|
||||||
|
sendedAbilities = Abilities()
|
||||||
|
sendedAbilities.invulnerable = playerAbilities.invulnerable
|
||||||
|
sendedAbilities.flying = playerAbilities.flying
|
||||||
|
sendedAbilities.mayfly = playerAbilities.mayfly
|
||||||
|
sendedAbilities.instabuild = instantBuild
|
||||||
|
sendedAbilities.mayBuild = playerAbilities.mayBuild
|
||||||
|
sendedAbilities.flyingSpeed = playerAbilities.flyingSpeed
|
||||||
|
sendedAbilities.walkingSpeed = playerAbilities.walkingSpeed
|
||||||
|
}
|
||||||
|
val packet = ClientboundPlayerAbilitiesPacket(sendedAbilities)
|
||||||
|
nmsPlayer.connection.send(packet)
|
||||||
|
}
|
||||||
|
}
|
||||||
1
nms/v1_20R1/.gitignore
vendored
Normal file
1
nms/v1_20R1/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
.lastDeploymentsId
|
||||||
35
nms/v1_20R1/build.gradle.kts
Normal file
35
nms/v1_20R1/build.gradle.kts
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
|
group = rootProject.group
|
||||||
|
version = rootProject.version
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("io.papermc.paperweight.userdev")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":nms:nms-common"))
|
||||||
|
|
||||||
|
// Used for nms
|
||||||
|
paperweight.paperDevBundle("1.20.1-R0.1-SNAPSHOT")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("https://repo.papermc.io/repository/maven-public/")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set target version
|
||||||
|
tasks.withType<JavaCompile>().configureEach {
|
||||||
|
sourceCompatibility = "18"
|
||||||
|
targetCompatibility = "18"
|
||||||
|
|
||||||
|
options.encoding = "UTF-8"
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
compilerOptions {
|
||||||
|
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_2)
|
||||||
|
jvmTarget.set(JvmTarget.JVM_18)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package xyz.alexcrea.cuanvil.dependency.packet.versions
|
||||||
|
|
||||||
|
import net.minecraft.network.protocol.game.ClientboundPlayerAbilitiesPacket
|
||||||
|
import net.minecraft.world.entity.player.Abilities
|
||||||
|
import org.bukkit.craftbukkit.v1_20_R1.entity.CraftPlayer
|
||||||
|
import org.bukkit.entity.Player
|
||||||
|
import xyz.alexcrea.cuanvil.dependency.packet.PacketManager
|
||||||
|
import xyz.alexcrea.cuanvil.dependency.packet.PacketManagerBase
|
||||||
|
|
||||||
|
class V1_20R1_PacketManager : PacketManagerBase(), PacketManager {
|
||||||
|
override val canSetInstantBuild: Boolean
|
||||||
|
get() = true
|
||||||
|
|
||||||
|
override fun setInstantBuild(player: Player, instantBuild: Boolean) {
|
||||||
|
val nmsPlayer = (player as CraftPlayer).handle
|
||||||
|
val playerAbilities = nmsPlayer.abilities
|
||||||
|
val sendedAbilities: Abilities
|
||||||
|
if (playerAbilities.instabuild == instantBuild) {
|
||||||
|
sendedAbilities = playerAbilities
|
||||||
|
} else {
|
||||||
|
sendedAbilities = Abilities()
|
||||||
|
sendedAbilities.invulnerable = playerAbilities.invulnerable
|
||||||
|
sendedAbilities.flying = playerAbilities.flying
|
||||||
|
sendedAbilities.mayfly = playerAbilities.mayfly
|
||||||
|
sendedAbilities.instabuild = instantBuild
|
||||||
|
sendedAbilities.mayBuild = playerAbilities.mayBuild
|
||||||
|
sendedAbilities.flyingSpeed = playerAbilities.flyingSpeed
|
||||||
|
sendedAbilities.walkingSpeed = playerAbilities.walkingSpeed
|
||||||
|
}
|
||||||
|
val packet = ClientboundPlayerAbilitiesPacket(sendedAbilities)
|
||||||
|
nmsPlayer.connection.send(packet)
|
||||||
|
}
|
||||||
|
}
|
||||||
1
nms/v1_20R2/.gitignore
vendored
Normal file
1
nms/v1_20R2/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
.lastDeploymentsId
|
||||||
35
nms/v1_20R2/build.gradle.kts
Normal file
35
nms/v1_20R2/build.gradle.kts
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
|
group = rootProject.group
|
||||||
|
version = rootProject.version
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("io.papermc.paperweight.userdev")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":nms:nms-common"))
|
||||||
|
|
||||||
|
// Used for nms
|
||||||
|
paperweight.paperDevBundle("1.20.2-R0.1-SNAPSHOT")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("https://repo.papermc.io/repository/maven-public/")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set target version
|
||||||
|
tasks.withType<JavaCompile>().configureEach {
|
||||||
|
sourceCompatibility = "18"
|
||||||
|
targetCompatibility = "18"
|
||||||
|
|
||||||
|
options.encoding = "UTF-8"
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
compilerOptions {
|
||||||
|
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_2)
|
||||||
|
jvmTarget.set(JvmTarget.JVM_18)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package xyz.alexcrea.cuanvil.dependency.packet.versions
|
||||||
|
|
||||||
|
import net.minecraft.network.protocol.game.ClientboundPlayerAbilitiesPacket
|
||||||
|
import net.minecraft.world.entity.player.Abilities
|
||||||
|
import org.bukkit.craftbukkit.v1_20_R2.entity.CraftPlayer
|
||||||
|
import org.bukkit.entity.Player
|
||||||
|
import xyz.alexcrea.cuanvil.dependency.packet.PacketManager
|
||||||
|
import xyz.alexcrea.cuanvil.dependency.packet.PacketManagerBase
|
||||||
|
|
||||||
|
class V1_20R2_PacketManager : PacketManagerBase(), PacketManager {
|
||||||
|
override val canSetInstantBuild: Boolean
|
||||||
|
get() = true
|
||||||
|
|
||||||
|
override fun setInstantBuild(player: Player, instantBuild: Boolean) {
|
||||||
|
val nmsPlayer = (player as CraftPlayer).handle
|
||||||
|
val playerAbilities = nmsPlayer.abilities
|
||||||
|
val sendedAbilities: Abilities
|
||||||
|
if (playerAbilities.instabuild == instantBuild) {
|
||||||
|
sendedAbilities = playerAbilities
|
||||||
|
} else {
|
||||||
|
sendedAbilities = Abilities()
|
||||||
|
sendedAbilities.invulnerable = playerAbilities.invulnerable
|
||||||
|
sendedAbilities.flying = playerAbilities.flying
|
||||||
|
sendedAbilities.mayfly = playerAbilities.mayfly
|
||||||
|
sendedAbilities.instabuild = instantBuild
|
||||||
|
sendedAbilities.mayBuild = playerAbilities.mayBuild
|
||||||
|
sendedAbilities.flyingSpeed = playerAbilities.flyingSpeed
|
||||||
|
sendedAbilities.walkingSpeed = playerAbilities.walkingSpeed
|
||||||
|
}
|
||||||
|
val packet = ClientboundPlayerAbilitiesPacket(sendedAbilities)
|
||||||
|
nmsPlayer.connection.send(packet)
|
||||||
|
}
|
||||||
|
}
|
||||||
1
nms/v1_20R3/.gitignore
vendored
Normal file
1
nms/v1_20R3/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
.lastDeploymentsId
|
||||||
35
nms/v1_20R3/build.gradle.kts
Normal file
35
nms/v1_20R3/build.gradle.kts
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
|
group = rootProject.group
|
||||||
|
version = rootProject.version
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("io.papermc.paperweight.userdev")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":nms:nms-common"))
|
||||||
|
|
||||||
|
// Used for nms
|
||||||
|
paperweight.paperDevBundle("1.20.4-R0.1-SNAPSHOT")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("https://repo.papermc.io/repository/maven-public/")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set target version
|
||||||
|
tasks.withType<JavaCompile>().configureEach {
|
||||||
|
sourceCompatibility = "18"
|
||||||
|
targetCompatibility = "18"
|
||||||
|
|
||||||
|
options.encoding = "UTF-8"
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
compilerOptions {
|
||||||
|
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_2)
|
||||||
|
jvmTarget.set(JvmTarget.JVM_18)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package xyz.alexcrea.cuanvil.dependency.packet.versions
|
||||||
|
|
||||||
|
import net.minecraft.network.protocol.game.ClientboundPlayerAbilitiesPacket
|
||||||
|
import net.minecraft.world.entity.player.Abilities
|
||||||
|
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftPlayer
|
||||||
|
import org.bukkit.entity.Player
|
||||||
|
import xyz.alexcrea.cuanvil.dependency.packet.PacketManager
|
||||||
|
import xyz.alexcrea.cuanvil.dependency.packet.PacketManagerBase
|
||||||
|
|
||||||
|
class V1_20R3_PacketManager : PacketManagerBase(), PacketManager {
|
||||||
|
override val canSetInstantBuild: Boolean
|
||||||
|
get() = true
|
||||||
|
|
||||||
|
override fun setInstantBuild(player: Player, instantBuild: Boolean) {
|
||||||
|
val nmsPlayer = (player as CraftPlayer).handle
|
||||||
|
val playerAbilities = nmsPlayer.abilities
|
||||||
|
val sendedAbilities: Abilities
|
||||||
|
if (playerAbilities.instabuild == instantBuild) {
|
||||||
|
sendedAbilities = playerAbilities
|
||||||
|
} else {
|
||||||
|
sendedAbilities = Abilities()
|
||||||
|
sendedAbilities.invulnerable = playerAbilities.invulnerable
|
||||||
|
sendedAbilities.flying = playerAbilities.flying
|
||||||
|
sendedAbilities.mayfly = playerAbilities.mayfly
|
||||||
|
sendedAbilities.instabuild = instantBuild
|
||||||
|
sendedAbilities.mayBuild = playerAbilities.mayBuild
|
||||||
|
sendedAbilities.flyingSpeed = playerAbilities.flyingSpeed
|
||||||
|
sendedAbilities.walkingSpeed = playerAbilities.walkingSpeed
|
||||||
|
}
|
||||||
|
val packet = ClientboundPlayerAbilitiesPacket(sendedAbilities)
|
||||||
|
nmsPlayer.connection.send(packet)
|
||||||
|
}
|
||||||
|
}
|
||||||
1
nms/v1_20R4/.gitignore
vendored
Normal file
1
nms/v1_20R4/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
.lastDeploymentsId
|
||||||
35
nms/v1_20R4/build.gradle.kts
Normal file
35
nms/v1_20R4/build.gradle.kts
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
|
group = rootProject.group
|
||||||
|
version = rootProject.version
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("io.papermc.paperweight.userdev")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":nms:nms-common"))
|
||||||
|
|
||||||
|
// Used for nms
|
||||||
|
paperweight.paperDevBundle("1.20.6-R0.1-SNAPSHOT")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("https://repo.papermc.io/repository/maven-public/")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set target version
|
||||||
|
tasks.withType<JavaCompile>().configureEach {
|
||||||
|
sourceCompatibility = "18"
|
||||||
|
targetCompatibility = "18"
|
||||||
|
|
||||||
|
options.encoding = "UTF-8"
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
compilerOptions {
|
||||||
|
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_0)
|
||||||
|
jvmTarget.set(JvmTarget.JVM_18)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package xyz.alexcrea.cuanvil.dependency.packet.versions
|
||||||
|
|
||||||
|
import net.minecraft.network.protocol.game.ClientboundPlayerAbilitiesPacket
|
||||||
|
import net.minecraft.world.entity.player.Abilities
|
||||||
|
import org.bukkit.craftbukkit.entity.CraftPlayer
|
||||||
|
import org.bukkit.entity.Player
|
||||||
|
import xyz.alexcrea.cuanvil.dependency.packet.PacketManager
|
||||||
|
import xyz.alexcrea.cuanvil.dependency.packet.PacketManagerBase
|
||||||
|
|
||||||
|
class V1_20R4_PacketManager : PacketManagerBase(), PacketManager {
|
||||||
|
override val canSetInstantBuild: Boolean
|
||||||
|
get() = true
|
||||||
|
|
||||||
|
override fun setInstantBuild(player: Player, instantBuild: Boolean) {
|
||||||
|
val nmsPlayer = (player as CraftPlayer).handle
|
||||||
|
val playerAbilities = nmsPlayer.abilities
|
||||||
|
val sendedAbilities: Abilities
|
||||||
|
if (playerAbilities.instabuild == instantBuild) {
|
||||||
|
sendedAbilities = playerAbilities
|
||||||
|
} else {
|
||||||
|
sendedAbilities = Abilities()
|
||||||
|
sendedAbilities.invulnerable = playerAbilities.invulnerable
|
||||||
|
sendedAbilities.flying = playerAbilities.flying
|
||||||
|
sendedAbilities.mayfly = playerAbilities.mayfly
|
||||||
|
sendedAbilities.instabuild = instantBuild
|
||||||
|
sendedAbilities.mayBuild = playerAbilities.mayBuild
|
||||||
|
sendedAbilities.flyingSpeed = playerAbilities.flyingSpeed
|
||||||
|
sendedAbilities.walkingSpeed = playerAbilities.walkingSpeed
|
||||||
|
}
|
||||||
|
val packet = ClientboundPlayerAbilitiesPacket(sendedAbilities)
|
||||||
|
nmsPlayer.connection.send(packet)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package xyz.alexcrea.cuanvil.util
|
||||||
|
|
||||||
|
import org.bukkit.inventory.meta.Damageable
|
||||||
|
|
||||||
|
// I LOVE support of old versions and needing to do modules like that
|
||||||
|
// That truly is my favorite activity
|
||||||
|
// TODO clean this one of legacy removal branch
|
||||||
|
object MaxDamageCheckerUtil {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return max damage or int max if not set
|
||||||
|
*/
|
||||||
|
fun getMaxDamage(meta: Damageable): Int {
|
||||||
|
if(!meta.hasMaxDamage()) return Integer.MAX_VALUE
|
||||||
|
return meta.maxDamage
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
1
nms/v1_21R1/.gitignore
vendored
Normal file
1
nms/v1_21R1/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
.lastDeploymentsId
|
||||||
35
nms/v1_21R1/build.gradle.kts
Normal file
35
nms/v1_21R1/build.gradle.kts
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
|
group = rootProject.group
|
||||||
|
version = rootProject.version
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("io.papermc.paperweight.userdev")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":nms:nms-common"))
|
||||||
|
|
||||||
|
// Used for nms
|
||||||
|
paperweight.paperDevBundle("1.21.1-R0.1-SNAPSHOT")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("https://repo.papermc.io/repository/maven-public/")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set target version
|
||||||
|
tasks.withType<JavaCompile>().configureEach {
|
||||||
|
sourceCompatibility = "21"
|
||||||
|
targetCompatibility = "21"
|
||||||
|
|
||||||
|
options.encoding = "UTF-8"
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
compilerOptions {
|
||||||
|
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_2)
|
||||||
|
jvmTarget.set(JvmTarget.JVM_21)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package xyz.alexcrea.cuanvil.dependency.packet.versions
|
||||||
|
|
||||||
|
import net.minecraft.network.protocol.game.ClientboundPlayerAbilitiesPacket
|
||||||
|
import net.minecraft.world.entity.player.Abilities
|
||||||
|
import org.bukkit.craftbukkit.entity.CraftPlayer
|
||||||
|
import org.bukkit.entity.Player
|
||||||
|
import xyz.alexcrea.cuanvil.dependency.packet.PacketManager
|
||||||
|
import xyz.alexcrea.cuanvil.dependency.packet.PacketManagerBase
|
||||||
|
|
||||||
|
class V1_21R1_PacketManager : PacketManagerBase(), PacketManager {
|
||||||
|
override val canSetInstantBuild: Boolean
|
||||||
|
get() = true
|
||||||
|
|
||||||
|
override fun setInstantBuild(player: Player, instantBuild: Boolean) {
|
||||||
|
val nmsPlayer = (player as CraftPlayer).handle
|
||||||
|
val playerAbilities = nmsPlayer.abilities
|
||||||
|
val sendedAbilities: Abilities
|
||||||
|
if (playerAbilities.instabuild == instantBuild) {
|
||||||
|
sendedAbilities = playerAbilities
|
||||||
|
} else {
|
||||||
|
sendedAbilities = Abilities()
|
||||||
|
sendedAbilities.invulnerable = playerAbilities.invulnerable
|
||||||
|
sendedAbilities.flying = playerAbilities.flying
|
||||||
|
sendedAbilities.mayfly = playerAbilities.mayfly
|
||||||
|
sendedAbilities.instabuild = instantBuild
|
||||||
|
sendedAbilities.mayBuild = playerAbilities.mayBuild
|
||||||
|
sendedAbilities.flyingSpeed = playerAbilities.flyingSpeed
|
||||||
|
sendedAbilities.walkingSpeed = playerAbilities.walkingSpeed
|
||||||
|
}
|
||||||
|
val packet = ClientboundPlayerAbilitiesPacket(sendedAbilities)
|
||||||
|
nmsPlayer.connection.send(packet)
|
||||||
|
}
|
||||||
|
}
|
||||||
1
nms/v1_21R2/.gitignore
vendored
Normal file
1
nms/v1_21R2/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
.lastDeploymentsId
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue