diff --git a/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlayerListener.java b/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlayerListener.java index cddae292..3c505282 100644 --- a/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlayerListener.java +++ b/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlayerListener.java @@ -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); } diff --git a/src/main/java/com/sk89q/worldguard/bukkit/resolvers/EntityResolver.java b/src/main/java/com/sk89q/worldguard/bukkit/resolvers/EntityResolver.java index 92d5d61d..f9d76f8e 100644 --- a/src/main/java/com/sk89q/worldguard/bukkit/resolvers/EntityResolver.java +++ b/src/main/java/com/sk89q/worldguard/bukkit/resolvers/EntityResolver.java @@ -5,11 +5,11 @@ * Copyright (c) the WorldGuard team and contributors * * This program is free software: you can redistribute it and/or modify it under the - * terms of the GNU Lesser General Public License as published by the Free Software + * terms of the GNU Lesser General Public License as published by the Free Software * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License along with @@ -24,8 +24,8 @@ import com.sk89q.rulelists.Resolver; public interface EntityResolver extends Resolver { - - public static final String DEFAULT = "source"; + + public static final String DEFAULT = "target"; public Entity resolve(Context context); } diff --git a/src/main/resources/builtin_rules.yml b/src/main/resources/builtin_rules.yml index 79f96b3d..2ec5b488 100644 --- a/src/main/resources/builtin_rules.yml +++ b/src/main/resources/builtin_rules.yml @@ -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