1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

Merge branch 'master' into refactoring/third-party-integrations

This commit is contained in:
Senne Van Rompaey 2020-12-10 22:02:21 +01:00 committed by GitHub
commit 3acd6926ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 26 additions and 13 deletions

View File

@ -2,7 +2,7 @@
name: Bug Report name: Bug Report
about: Report a Bug or an Issue with Slimefun 4. about: Report a Bug or an Issue with Slimefun 4.
title: '' title: ''
labels: Bug Report labels: '🐞 Bug Report'
assignees: '' assignees: ''
--- ---

View File

@ -2,9 +2,7 @@
"extends": [ "extends": [
"config:base" "config:base"
], ],
"assignees": [
],
"labels": [ "labels": [
"Dependency Update" "🚨 Dependency Update"
] ]
} }

View File

@ -26,4 +26,4 @@ jobs:
with: with:
token: ${{ secrets.ACCESS_TOKEN }} token: ${{ secrets.ACCESS_TOKEN }}
issue_number: ${{ github.event.pull_request.number }} issue_number: ${{ github.event.pull_request.number }}
labels: 'Translations Update' labels: '📄 Translations Update'

View File

@ -10,7 +10,7 @@ jobs:
name: Invalid Issues name: Invalid Issues
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: contains(github.event.issue.labels.*.name, 'Bug Report') == false && contains(github.event.issue.labels.*.name, 'Hacktoberfest') == false if: contains(github.event.issue.labels.*.name, '🐞 Bug Report') == false && contains(github.event.issue.labels.*.name, 'Hacktoberfest') == false
steps: steps:
- name: Close Issue - name: Close Issue
uses: maxkomarychev/octions/octions/issues/update@master uses: maxkomarychev/octions/octions/issues/update@master

View File

@ -18,4 +18,4 @@ jobs:
with: with:
token: ${{ secrets.ACCESS_TOKEN }} token: ${{ secrets.ACCESS_TOKEN }}
issue_number: ${{ github.event.issue.number }} issue_number: ${{ github.event.issue.number }}
labels: 'Duplicate' labels: '🚩 Duplicate'

View File

@ -14,5 +14,5 @@ jobs:
steps: steps:
- uses: mschilde/auto-label-merge-conflicts@master - uses: mschilde/auto-label-merge-conflicts@master
with: with:
CONFLICT_LABEL_NAME: 'Merge Conflicts' CONFLICT_LABEL_NAME: 'Merge Conflicts'
GITHUB_TOKEN: "${{ secrets.ACCESS_TOKEN }}" GITHUB_TOKEN: "${{ secrets.ACCESS_TOKEN }}"

View File

@ -33,6 +33,7 @@
#### Fixes #### Fixes
* Fixed a couple of compatibility issues with ItemsAdder * Fixed a couple of compatibility issues with ItemsAdder
* Fixed #2575 * Fixed #2575
* Fixed ghost blocks to some extent (ghost blocks will now drop and be replaced)
## Release Candidate 18 (03 Dec 2020) ## Release Candidate 18 (03 Dec 2020)

View File

@ -380,7 +380,7 @@
<dependency> <dependency>
<groupId>com.gmail.nossr50.mcMMO</groupId> <groupId>com.gmail.nossr50.mcMMO</groupId>
<artifactId>mcMMO</artifactId> <artifactId>mcMMO</artifactId>
<version>2.1.159</version> <version>2.1.161</version>
<scope>provided</scope> <scope>provided</scope>
<exclusions> <exclusions>
<exclusion> <exclusion>

View File

@ -38,10 +38,11 @@ import me.mrCookieSlime.Slimefun.api.Slimefun;
/** /**
* The {@link BlockListener} is responsible for listening to the {@link BlockPlaceEvent} * The {@link BlockListener} is responsible for listening to the {@link BlockPlaceEvent}
* and {@link BlockBreakEvent}. * and {@link BlockBreakEvent}.
* *
* @author TheBusyBiscuit * @author TheBusyBiscuit
* @author Linox * @author Linox
* * @author Patbox
*
* @see BlockPlaceHandler * @see BlockPlaceHandler
* @see BlockBreakHandler * @see BlockBreakHandler
* @see ToolUseHandler * @see ToolUseHandler
@ -60,7 +61,20 @@ public class BlockListener implements Listener {
* While this can cause ghost blocks it also prevents them from replacing grass * While this can cause ghost blocks it also prevents them from replacing grass
* or saplings etc... * or saplings etc...
*/ */
if (BlockStorage.hasBlockInfo(e.getBlock())) { Block block = e.getBlock();
if (e.getBlockReplacedState().getType().isAir()) {
SlimefunItem sfItem = BlockStorage.check(block);
if (sfItem != null) {
for (ItemStack item : sfItem.getDrops()) {
if (item != null && !item.getType().isAir()) {
block.getWorld().dropItemNaturally(block.getLocation(), item);
}
}
BlockStorage.clearBlockInfo(block);
}
} else if (BlockStorage.hasBlockInfo(e.getBlock())) {
e.setCancelled(true); e.setCancelled(true);
} }
} }
@ -177,7 +191,7 @@ public class BlockListener implements Listener {
* This method checks for a sensitive {@link Block}. * This method checks for a sensitive {@link Block}.
* Sensitive {@link Block Blocks} are pressure plates or saplings, which should be broken * Sensitive {@link Block Blocks} are pressure plates or saplings, which should be broken
* when the block beneath is broken as well. * when the block beneath is broken as well.
* *
* @param p * @param p
* The {@link Player} who broke this {@link Block} * The {@link Player} who broke this {@link Block}
* @param b * @param b