Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 0 additions & 47 deletions .github/workflows/gradle-publish.yml

This file was deleted.

18 changes: 14 additions & 4 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
name: Java CI with Gradle

on:
- push
- pull_request
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
Expand Down Expand Up @@ -36,7 +46,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Package
path: build/libs/Zones*.jar
path: build/libs/zones*.jar

- name: Release dev build
uses: marvinpinto/action-automatic-releases@master
Expand All @@ -45,7 +55,7 @@ jobs:
title: Development Build
automatic_release_tag: latest-dev
prerelease: true
files: build/libs/Zones*.jar
files: build/libs/zones*.jar
repo_token: ${{ secrets.GITHUB_TOKEN }}

# NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html).
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,5 @@ runs/

# Include Project icon
!.idea/icon.svg

**/.profileconfig.json
63 changes: 42 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,17 @@ The plugin provides the following commands:
* Only shows regions the player is a member of, unless the player has the `zones.list.other` permission
* `/zone cancel`: Cancels the current region selection.
* Usage: `/zone cancel`
* `/zone set`: Sets a permission for a member of a region.
* Usage: `/zone set <regionKey> <who> <permission> <value>`
* `<regionKey>` is the key of the region.
* `<who>` who to set the permission for.
* e.g., `Player1` - to create or modify a group, use `+group-GROUPNAME`, where GROUPNAME can be any name.
* `<permission>` is the permission to set (e.g., `role`, `break`, `place`, `interact`).
* `<value>` is the value to set for the permission (
* e.g., `owner`, `true`, `false`, `*`, `!*`, `GRASS_BLOCK`, `!GRASS_BLOCK`).
* `/zone perm`: Manage region permissions.
* Usage:
* `/zone perm allow <regionKey> <target> <permission> <value>`
* `/zone perm deny <regionKey> <target> <permission> <value>`
* `/zone perm unset <regionKey> <target> <permission> <value>`
* `/zone perm clear <regionKey> <target> <permission>`
* `<target>` can be a player name/UUID, `+universal`, `group:<name>`, or `player:<name|uuid>`.
* For pattern-based permissions (e.g. `break`/`place`/`interact`), `<value>` supports `*` wildcards (glob, not
regex).
Use `*` or `all` for "everything".
* For membership permissions, `role`/`group` use `<value>` as a role/group name.
* `/zone rename`: Renames a region.
* Usage: `/zone rename <regionKey> <newName>`
* `<regionKey>` is the key of the region, `<newName>` is the new name of the region.
Expand Down Expand Up @@ -103,19 +106,20 @@ The plugin provides the following commands:

### Setting Permissions

1. Use the `/zone set <regionKey> <player> <permission> <value>` command to set permissions for a member of a region.
* Example: `/zone set <key> Player1 break true` allows "Player1" to break blocks in the specified region.
* Example: `/zone set <key> Player2 break GRASS_BLOCK` allows "Player2" to break only `GRASS_BLOCK` blocks
in the specified region.
* Example: `/zone set <key> Player3 interact !OAK_DOOR` denies "Player3" to interact with `OAK_DOOR`in
the specified region.
* Example: `/zone set <key> Player4 place *` allows "Player4" to place all blocks in the specified region.
* Example: `/zone set <key> Player5 break !*` denies "Player5" to break all blocks in the specified region.
* Groups:
* To assign a group, set the value of the permission `group` to the group name.
* e.g.: Create a group and assign permission: `/zone set <regionKey> +group-some-group-name break true`
* e.g. `/zone set <regionKey> ExamplePlayer group some-group-name`
* ExamplePlayer now inherits the permission `break` from the group `some-group-name`
1. Use `/zone perm ...` to add/remove rules for players, groups, or universal.

* Allow everyone to break everything in a region: `/zone perm allow <key> +universal break *`
* Allow Player1 to break everything in a region: `/zone perm allow <key> Player1 break all`
* Allow only grass blocks: `/zone perm allow <key> Player2 break grass_block`
* Deny interacting with oak doors: `/zone perm deny <key> Player3 interact oak_door`
* Allow placing everything: `/zone perm allow <key> Player4 place all`
* Deny breaking everything: `/zone perm deny <key> Player5 break all`

2. Groups:

* Create/edit a group subject: `/zone perm allow <key> group:builders break *`
* Group inheritance (group includes group): `/zone perm allow <key> group:builders group members`
* Add a player to a group: `/zone perm allow <key> ExamplePlayer group builders`

### Viewing Region Information

Expand Down Expand Up @@ -167,6 +171,23 @@ region the player is standing in. It currently supports the following placeholde
responsive.
* **Caching:** The plugin uses a caching system to improve performance when checking permissions.

## Developers

Zones exposes a lot of internals for plugin developers to use (e.g. for custom flags, integrations, etc.).
Artifacts are available at https://maven.t14d3.de/#/snapshots/de/t14d3/zones/

Example:

```kotlin
repositories {
maven("https://maven.t14d3.de/snapshots")
}

dependencies {
compileOnly("de.t14d3.zones:zones-api:<version>")
}

```
## Contributing

Contributions to the plugin are welcome! If you have any ideas for new features, bug fixes, or improvements, please feel
Expand Down
16 changes: 7 additions & 9 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@ plugins {

repositories {
mavenCentral()
maven {
name = "JitPack"
url = uri("https://jitpack.io")
}
}

dependencies {
compileOnly("org.apache.logging.log4j:log4j-core:2.24.3")
compileOnly("it.unimi.dsi:fastutil:8.5.8")
compileOnly(rootProject.libs.log4j.core)
compileOnly(rootProject.libs.fastutil)

compileOnly("com.h2database:h2:2.3.232")
compileOnly("org.postgresql:postgresql:42.7.2")
compileOnly(rootProject.libs.h2)
compileOnly(rootProject.libs.postgresql)

implementation("com.github.Carleslc.Simple-YAML:Simple-Yaml:1.8.4")

compileOnly(rootProject.libs.rapunzellib.api)
compileOnly(rootProject.libs.rapunzellib.events)
}
Loading
Loading