Compare commits

..

1 Commits

10 changed files with 38 additions and 39 deletions

View File

@ -2,6 +2,7 @@ name: Announce release on discord
on: on:
release: release:
types: [published] types: [published]
jobs: jobs:
send_announcement: send_announcement:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -11,7 +12,7 @@ jobs:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DISCORD_USERNAME: PlotSquared Release DISCORD_USERNAME: PlotSquared Release
DISCORD_AVATAR: https://raw.githubusercontent.com/IntellectualSites/Assets/main/plugins/PlotSquared/PlotSquared.png DISCORD_AVATAR: https://raw.githubusercontent.com/IntellectualSites/Assets/main/plugins/PlotSquared/PlotSquared.png
uses: Ilshidur/action-discord@08d9328877d6954120eef2b07abbc79249bb6210 # ratchet:Ilshidur/action-discord@0.3.2 uses: Ilshidur/action-discord@0.3.2
with: with:
args: | args: |
"<@&525015541815967744> <@&679322738552471574> <@&699293353862496266>" "<@&525015541815967744> <@&679322738552471574> <@&699293353862496266>"

View File

@ -1,17 +1,19 @@
name: Build PR name: Build PR
on: [pull_request]
on: [ pull_request ]
jobs: jobs:
build_pr: build_pr:
if: github.repository_owner == 'IntellectualSites' if: github.repository_owner == 'IntellectualSites'
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest, macos-latest] os: [ ubuntu-latest, windows-latest, macos-latest ]
steps: steps:
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Validate Gradle Wrapper - name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6 # v1 uses: gradle/wrapper-validation-action@v1
- name: Setup Java - name: Setup Java
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:

View File

@ -1,8 +1,10 @@
name: build name: build
on: on:
push: push:
branches: branches:
- v6 - v6
jobs: jobs:
build: build:
if: github.repository_owner == 'IntellectualSites' if: github.repository_owner == 'IntellectualSites'
@ -11,7 +13,7 @@ jobs:
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Validate Gradle Wrapper - name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6 # v1 uses: gradle/wrapper-validation-action@v1
- name: Setup Java - name: Setup Java
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:
@ -43,7 +45,7 @@ jobs:
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }} ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
- name: Publish core javadoc - name: Publish core javadoc
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6'}} if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6'}}
uses: cpina/github-action-push-to-another-repository@0a14457bb28b04dfa1652e0ffdfda866d2845c73 # main uses: cpina/github-action-push-to-another-repository@main
env: env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }} SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with: with:
@ -55,7 +57,7 @@ jobs:
target-directory: core target-directory: core
- name: Publish bukkit javadoc - name: Publish bukkit javadoc
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6'}} if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6'}}
uses: cpina/github-action-push-to-another-repository@0a14457bb28b04dfa1652e0ffdfda866d2845c73 # main uses: cpina/github-action-push-to-another-repository@main
env: env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }} SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with: with:

View File

@ -1,8 +1,10 @@
name: "CodeQL" name: "CodeQL"
on: on:
pull_request: pull_request:
# The branches below must be a subset of the branches above # The branches below must be a subset of the branches above
branches: [v6] branches: [ v6 ]
jobs: jobs:
analyze: analyze:
name: Analyze name: Analyze
@ -11,18 +13,23 @@ jobs:
actions: read actions: read
contents: read contents: read
security-events: write security-events: write
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
language: ['java'] language: [ 'java' ]
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@32dc499307d133bb5085bae78498c0ac2cf762d5 # v2 uses: github/codeql-action/init@v2
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
- name: Autobuild - name: Autobuild
uses: github/codeql-action/autobuild@32dc499307d133bb5085bae78498c0ac2cf762d5 # v2 uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@32dc499307d133bb5085bae78498c0ac2cf762d5 # v2 uses: github/codeql-action/analyze@v2

View File

@ -1,12 +1,14 @@
name: draft release name: draft release
on: on:
push: push:
branches: branches:
- v6 - v6
pull_request: pull_request:
types: [opened, reopened, synchronize] types: [ opened, reopened, synchronize ]
pull_request_target: pull_request_target:
types: [opened, reopened, synchronize] types: [ opened, reopened, synchronize ]
jobs: jobs:
update_release_draft: update_release_draft:
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }} if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}

View File

@ -71,7 +71,6 @@ import org.bukkit.block.BlockFace;
import org.bukkit.block.BlockState; import org.bukkit.block.BlockState;
import org.bukkit.block.data.BlockData; import org.bukkit.block.data.BlockData;
import org.bukkit.block.data.type.Dispenser; import org.bukkit.block.data.type.Dispenser;
import org.bukkit.block.data.type.Farmland;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.entity.Fireball; import org.bukkit.entity.Fireball;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -710,33 +709,20 @@ public class BlockEventListener implements Listener {
Block block = event.getBlock(); Block block = event.getBlock();
Location location = BukkitUtil.adapt(block.getLocation()); Location location = BukkitUtil.adapt(block.getLocation());
PlotArea area = location.getPlotArea(); PlotArea area = location.getPlotArea();
if (area == null) { if (area == null) {
return; return;
} }
Plot plot = area.getOwnedPlot(location); Plot plot = area.getOwnedPlot(location);
if (plot == null) { if (plot == null) {
event.setCancelled(true); event.setCancelled(true);
return; return;
} }
Material blockType = block.getType();
if (block.getBlockData() instanceof Farmland farmland && event.getNewState().getBlockData() instanceof Farmland newFarmland) { if (blockType == Material.FARMLAND) {
int currentMoisture = farmland.getMoisture(); if (!plot.getFlag(SoilDryFlag.class)) {
int newMoisture = newFarmland.getMoisture(); plot.debug("Soil could not dry because soil-dry = false");
event.setCancelled(true);
// farmland gets moisturizes
if (newMoisture > currentMoisture) {
return;
} }
if (plot.getFlag(SoilDryFlag.class)) {
return;
}
plot.debug("Soil could not dry because soil-dry = false");
event.setCancelled(true);
} }
} }

View File

@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
## Enforcement ## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at contact<at>intellectualsites.com. All reported by contacting the project team at contact@intellectualsites.com. All
complaints will be reviewed and investigated and will result in a response that complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident. obligated to maintain confidentiality with regard to the reporter of an incident.

View File

@ -155,7 +155,7 @@ subprojects {
id.set("NotMyFault") id.set("NotMyFault")
name.set("Alexander Brandes") name.set("Alexander Brandes")
organization.set("IntellectualSites") organization.set("IntellectualSites")
email.set("contact(at)notmyfault.dev") email.set("contact@notmyfault.dev")
} }
developer { developer {
id.set("SirYwell") id.set("SirYwell")

View File

@ -11,7 +11,7 @@ essentialsx = "2.19.7"
mvdwapi = "3.1.1" mvdwapi = "3.1.1"
# Third party # Third party
prtree = "2.0.1" prtree = "2.0.0"
aopalliance = "1.0" aopalliance = "1.0"
cloud-services = "1.8.2" cloud-services = "1.8.2"
arkitektonika = "2.1.2" arkitektonika = "2.1.2"

View File

@ -4,7 +4,6 @@
"config:base", "config:base",
":semanticCommitsDisabled" ":semanticCommitsDisabled"
], ],
"labels": ["dependencies"], "labels": ["Renovate"],
"rebaseWhen": "conflicted", "rebaseWhen": "conflicted"
"schedule": ["on the first day of the week"]
} }