mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-03 15:08:02 +01:00
Standardize the default resolver of entities/blocks to 'target'.
This commit is contained in:
parent
69940f2fac
commit
cbcc524798
@ -284,7 +284,7 @@ public void onPlayerJoin(PlayerJoinEvent event) {
|
||||
// RuleLists
|
||||
RuleSet rules = wcfg.getRuleList().get(KnownAttachment.PLAYER_JOIN);
|
||||
BukkitContext context = new BukkitContext(event);
|
||||
context.setSourceEntity(player);
|
||||
context.setTargetEntity(player);
|
||||
rules.process(context);
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
public interface EntityResolver extends Resolver {
|
||||
|
||||
public static final String DEFAULT = "source";
|
||||
public static final String DEFAULT = "target";
|
||||
|
||||
public Entity resolve(Context context);
|
||||
}
|
||||
|
@ -5,6 +5,7 @@
|
||||
- ?has-permission: worldguard.auto-invincible
|
||||
then:
|
||||
- ?: update-entity
|
||||
entity: target
|
||||
set-invincible: true
|
||||
|
||||
# ----------------------------------------------
|
||||
@ -17,9 +18,13 @@
|
||||
- when: block-break
|
||||
if:
|
||||
- ?: match-item
|
||||
entity: source
|
||||
item: held
|
||||
has-data: true
|
||||
then:
|
||||
- ?: update-item
|
||||
entity: source
|
||||
item: held
|
||||
set-data: 0
|
||||
- setting: protection.disable-xp-orb-drops
|
||||
rules:
|
||||
@ -72,6 +77,7 @@
|
||||
- when: block-physics
|
||||
if:
|
||||
- ?match-block: gravel
|
||||
block: target
|
||||
then:
|
||||
- ?: cancel
|
||||
- setting: physics.no-physics-sand
|
||||
@ -79,6 +85,7 @@
|
||||
- when: block-physics
|
||||
if:
|
||||
- ?match-block: sand
|
||||
block: target
|
||||
then:
|
||||
- ?: cancel
|
||||
- setting: physics.no-physics-portal
|
||||
@ -86,6 +93,7 @@
|
||||
- when: block-physics
|
||||
if:
|
||||
- ?match-block: portal
|
||||
block: target
|
||||
then:
|
||||
- ?: cancel
|
||||
- setting: physics.disable-water-damage-blocks
|
||||
@ -148,7 +156,7 @@
|
||||
- ?match-entity: [player]
|
||||
entity: source
|
||||
- ?match-item: lighter
|
||||
slot: held
|
||||
# context.item
|
||||
- ?has-permission: worldguard.override.lighter
|
||||
negate: true
|
||||
then:
|
||||
@ -351,7 +359,6 @@
|
||||
- when: entity-spawn
|
||||
if:
|
||||
- ?match-spawn: plugin
|
||||
entity: target
|
||||
then:
|
||||
- ?: cancel
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user