-
Notifications
You must be signed in to change notification settings - Fork 16
Simple Axiom Support #309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simple Axiom Support #309
Conversation
|
I'm not sure, but maybe you can get it from here https://support.modrinth.com/en/articles/8801191-modrinth-maven |
|
Very cool, thank you very much <3 Regarding the repo: You can try using this fun RepositoryHandler.modrinthMavenWorkaround(nameOrId: String, version: String, fileName: String) {
val url = "https://api.modrinth.com/maven/maven/modrinth/$nameOrId/$version/$fileName"
val group = "maven.modrinth.workaround"
ivy(url.substringBeforeLast('/')) {
name = "Modrinth Maven Workaround for $nameOrId"
patternLayout { artifact(url.substringAfterLast('/')) }
metadataSources { artifact() }
content { includeModule(group, nameOrId) }
}
}and then in Unless of course the workaround is no longer needed |
|
lgtm |
thomasmny
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Untested, but LGTM after having a quick skim over
…API for AxiomPapers availability
|
Could you please move the listener initialisation to |
|
np |
|
Thanks! |
Open for discussion
What has changed
This update prevents users with axiom permissions (e.g.
axiom.*) to modify worlds in which they normally do not have permission.Therefore I refactored the listeners in order to reduce code duplication and have a central way of dealing with World-Manipulation.
I introduce the
WorldManipulationEventwhich can be fired with theEventDispatcher.I tried to document those classes as precise as possible. It would be a duplicate to talk about them here. Please take a look at modified files.
An axiom manipulation is considered as an
Interaction, because it's not possible to differentiate axiom-manipulation between placing/breaking.What needs to change
Library management
Sadly there is no maven-repo for AxiomPaper as far as I have seen, thus I used a jar placed in
libs/.Question: Should the jar be put there or stay referenced in
libs/libs.txtThe problem I have in mind is the CI-Server, which won't have the file during compile time when not included.
Easiest solution would be to include the jar file, but I don't know if it is wished.
Second solution would be to host the src on a repo (e.g https://repo.eintosti.de/#/).
I encourage everyone who feels like it to think of other test cases or think about some deeper integration of axiom
Test Results
Environment:
Purpur 1.21.3
Bukkit plugins (3):
Player A has
*permissionsPlayer B only has
axiom.*permissionsWhen trying to test if axiom works, I make a selection of blocks and I try to move or delete them.
Further actions like free draw were not tested, because I expect that any axiom action triggers
AxiomModifyWorldEventTest 1: Builder Test (3/3)✅
A creates a public world, with Builders only setting.
B can not use Axiom ✅
B gets added to the world as builder
B can use Axiom and the world status changes from
Not startedtoIn Progress✅A archives the world
B can no longer modify the world. ✅
Test 2: partial setting test (3/3)✅
A turns
Builder onlyoff, Block Placement, Breaking and Interactions are onB can normally interact with the world and axiom can be used.
In the following test, a single setting will be turned off, the other 2 are on