Fix some flags being ignored

+ Bump version
This commit is contained in:
Eric 2018-11-03 21:13:06 +01:00
parent df4389ea36
commit eadc82ffe0
10 changed files with 51 additions and 19 deletions

View File

@ -21,7 +21,7 @@ How to include WorldEditWrapper into your maven project:
<dependency> <dependency>
<groupId>org.codemc.worldguardwrapper</groupId> <groupId>org.codemc.worldguardwrapper</groupId>
<artifactId>worldguardwrapper</artifactId> <artifactId>worldguardwrapper</artifactId>
<version>1.0.1-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>
``` ```

View File

@ -7,7 +7,7 @@
<parent> <parent>
<groupId>org.codemc.worldguardwrapper</groupId> <groupId>org.codemc.worldguardwrapper</groupId>
<artifactId>worldguardwrapper-parent</artifactId> <artifactId>worldguardwrapper-parent</artifactId>
<version>1.0.1-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
</parent> </parent>
<artifactId>worldguardwrapper-api</artifactId> <artifactId>worldguardwrapper-api</artifactId>

View File

@ -7,7 +7,7 @@
<parent> <parent>
<groupId>org.codemc.worldguardwrapper</groupId> <groupId>org.codemc.worldguardwrapper</groupId>
<artifactId>worldguardwrapper-implementation</artifactId> <artifactId>worldguardwrapper-implementation</artifactId>
<version>1.0.1-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
</parent> </parent>
<artifactId>worldguardwrapper-implementation-interface</artifactId> <artifactId>worldguardwrapper-implementation-interface</artifactId>
@ -18,7 +18,7 @@
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
<artifactId>worldguardwrapper-api</artifactId> <artifactId>worldguardwrapper-api</artifactId>
<version>1.0.1-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -7,7 +7,7 @@
<parent> <parent>
<groupId>org.codemc.worldguardwrapper</groupId> <groupId>org.codemc.worldguardwrapper</groupId>
<artifactId>worldguardwrapper-parent</artifactId> <artifactId>worldguardwrapper-parent</artifactId>
<version>1.0.1-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
</parent> </parent>
<artifactId>worldguardwrapper-implementation</artifactId> <artifactId>worldguardwrapper-implementation</artifactId>

View File

@ -7,7 +7,7 @@
<parent> <parent>
<groupId>org.codemc.worldguardwrapper</groupId> <groupId>org.codemc.worldguardwrapper</groupId>
<artifactId>worldguardwrapper-implementation</artifactId> <artifactId>worldguardwrapper-implementation</artifactId>
<version>1.0.1-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
</parent> </parent>
<artifactId>worldguardwrapper-implementation-v6</artifactId> <artifactId>worldguardwrapper-implementation-v6</artifactId>
@ -18,7 +18,7 @@
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
<artifactId>worldguardwrapper-implementation-interface</artifactId> <artifactId>worldguardwrapper-implementation-interface</artifactId>
<version>1.0.1-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.sk89q.worldguard</groupId> <groupId>com.sk89q.worldguard</groupId>

View File

@ -8,6 +8,7 @@ import org.bukkit.Bukkit;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.Event.Result;
import org.codemc.worldguardwrapper.event.AbstractWrappedEvent; import org.codemc.worldguardwrapper.event.AbstractWrappedEvent;
@NoArgsConstructor @NoArgsConstructor
@ -27,7 +28,12 @@ public class EventListener implements Listener {
worldGuardEvent.getBlocks(), worldGuardEvent.getBlocks(),
worldGuardEvent.getEffectiveMaterial()); worldGuardEvent.getEffectiveMaterial());
Bukkit.getServer().getPluginManager().callEvent(event); Bukkit.getServer().getPluginManager().callEvent(event);
worldGuardEvent.setResult(event.getResult());
if (event.getResult() != Result.DEFAULT) {
// DEFAULT = Result probably has not been touched by the handler,
// so don't touch the original result either.
worldGuardEvent.setResult(event.getResult());
}
} }
@EventHandler @EventHandler
@ -44,7 +50,12 @@ public class EventListener implements Listener {
worldGuardEvent.getTarget(), worldGuardEvent.getTarget(),
worldGuardEvent.getEntity()); worldGuardEvent.getEntity());
Bukkit.getServer().getPluginManager().callEvent(event); Bukkit.getServer().getPluginManager().callEvent(event);
worldGuardEvent.setResult(event.getResult());
if (event.getResult() != Result.DEFAULT) {
// DEFAULT = Result probably has not been touched by the handler,
// so don't touch the original result either.
worldGuardEvent.setResult(event.getResult());
}
} }
@EventHandler @EventHandler
@ -61,7 +72,12 @@ public class EventListener implements Listener {
worldGuardEvent.getTarget(), worldGuardEvent.getTarget(),
worldGuardEvent.getEntity()); worldGuardEvent.getEntity());
Bukkit.getServer().getPluginManager().callEvent(event); Bukkit.getServer().getPluginManager().callEvent(event);
worldGuardEvent.setResult(event.getResult());
if (event.getResult() != Result.DEFAULT) {
// DEFAULT = Result probably has not been touched by the handler,
// so don't touch the original result either.
worldGuardEvent.setResult(event.getResult());
}
} }
} }

View File

@ -7,7 +7,7 @@
<parent> <parent>
<groupId>org.codemc.worldguardwrapper</groupId> <groupId>org.codemc.worldguardwrapper</groupId>
<artifactId>worldguardwrapper-implementation</artifactId> <artifactId>worldguardwrapper-implementation</artifactId>
<version>1.0.1-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
</parent> </parent>
<artifactId>worldguardwrapper-implementation-v7</artifactId> <artifactId>worldguardwrapper-implementation-v7</artifactId>
@ -18,7 +18,7 @@
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
<artifactId>worldguardwrapper-implementation-interface</artifactId> <artifactId>worldguardwrapper-implementation-interface</artifactId>
<version>1.0.1-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.sk89q.worldguard</groupId> <groupId>com.sk89q.worldguard</groupId>

View File

@ -8,6 +8,7 @@ import org.bukkit.Bukkit;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.Event.Result;
import org.codemc.worldguardwrapper.event.AbstractWrappedEvent; import org.codemc.worldguardwrapper.event.AbstractWrappedEvent;
@NoArgsConstructor @NoArgsConstructor
@ -27,7 +28,12 @@ public class EventListener implements Listener {
worldGuardEvent.getBlocks(), worldGuardEvent.getBlocks(),
worldGuardEvent.getEffectiveMaterial()); worldGuardEvent.getEffectiveMaterial());
Bukkit.getServer().getPluginManager().callEvent(event); Bukkit.getServer().getPluginManager().callEvent(event);
worldGuardEvent.setResult(event.getResult());
if (event.getResult() != Result.DEFAULT) {
// DEFAULT = Result probably has not been touched by the handler,
// so don't touch the original result either.
worldGuardEvent.setResult(event.getResult());
}
} }
@EventHandler @EventHandler
@ -44,7 +50,12 @@ public class EventListener implements Listener {
worldGuardEvent.getTarget(), worldGuardEvent.getTarget(),
worldGuardEvent.getEntity()); worldGuardEvent.getEntity());
Bukkit.getServer().getPluginManager().callEvent(event); Bukkit.getServer().getPluginManager().callEvent(event);
worldGuardEvent.setResult(event.getResult());
if (event.getResult() != Result.DEFAULT) {
// DEFAULT = Result probably has not been touched by the handler,
// so don't touch the original result either.
worldGuardEvent.setResult(event.getResult());
}
} }
@EventHandler @EventHandler
@ -61,7 +72,12 @@ public class EventListener implements Listener {
worldGuardEvent.getTarget(), worldGuardEvent.getTarget(),
worldGuardEvent.getEntity()); worldGuardEvent.getEntity());
Bukkit.getServer().getPluginManager().callEvent(event); Bukkit.getServer().getPluginManager().callEvent(event);
worldGuardEvent.setResult(event.getResult());
if (event.getResult() != Result.DEFAULT) {
// DEFAULT = Result probably has not been touched by the handler,
// so don't touch the original result either.
worldGuardEvent.setResult(event.getResult());
}
} }
} }

View File

@ -7,7 +7,7 @@
<parent> <parent>
<groupId>org.codemc.worldguardwrapper</groupId> <groupId>org.codemc.worldguardwrapper</groupId>
<artifactId>worldguardwrapper-parent</artifactId> <artifactId>worldguardwrapper-parent</artifactId>
<version>1.0.1-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
</parent> </parent>
<artifactId>worldguardwrapper</artifactId> <artifactId>worldguardwrapper</artifactId>
@ -18,13 +18,13 @@
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
<artifactId>worldguardwrapper-implementation-v6</artifactId> <artifactId>worldguardwrapper-implementation-v6</artifactId>
<version>1.0.1-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
<artifactId>worldguardwrapper-implementation-v7</artifactId> <artifactId>worldguardwrapper-implementation-v7</artifactId>
<version>1.0.1-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -6,7 +6,7 @@
<groupId>org.codemc.worldguardwrapper</groupId> <groupId>org.codemc.worldguardwrapper</groupId>
<artifactId>worldguardwrapper-parent</artifactId> <artifactId>worldguardwrapper-parent</artifactId>
<version>1.0.1-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<modules> <modules>