forked from clone/WorldGuardWrapper
Fix some flags being ignored
+ Bump version
This commit is contained in:
parent
df4389ea36
commit
eadc82ffe0
|
@ -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>
|
||||||
```
|
```
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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,8 +28,13 @@ public class EventListener implements Listener {
|
||||||
worldGuardEvent.getBlocks(),
|
worldGuardEvent.getBlocks(),
|
||||||
worldGuardEvent.getEffectiveMaterial());
|
worldGuardEvent.getEffectiveMaterial());
|
||||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
|
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());
|
worldGuardEvent.setResult(event.getResult());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onUseEntity(UseEntityEvent worldGuardEvent) {
|
public void onUseEntity(UseEntityEvent worldGuardEvent) {
|
||||||
|
@ -44,8 +50,13 @@ public class EventListener implements Listener {
|
||||||
worldGuardEvent.getTarget(),
|
worldGuardEvent.getTarget(),
|
||||||
worldGuardEvent.getEntity());
|
worldGuardEvent.getEntity());
|
||||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
|
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());
|
worldGuardEvent.setResult(event.getResult());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onDamageEntity(DamageEntityEvent worldGuardEvent) {
|
public void onDamageEntity(DamageEntityEvent worldGuardEvent) {
|
||||||
|
@ -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);
|
||||||
|
|
||||||
|
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());
|
worldGuardEvent.setResult(event.getResult());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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,8 +28,13 @@ public class EventListener implements Listener {
|
||||||
worldGuardEvent.getBlocks(),
|
worldGuardEvent.getBlocks(),
|
||||||
worldGuardEvent.getEffectiveMaterial());
|
worldGuardEvent.getEffectiveMaterial());
|
||||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
|
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());
|
worldGuardEvent.setResult(event.getResult());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onUseEntity(UseEntityEvent worldGuardEvent) {
|
public void onUseEntity(UseEntityEvent worldGuardEvent) {
|
||||||
|
@ -44,8 +50,13 @@ public class EventListener implements Listener {
|
||||||
worldGuardEvent.getTarget(),
|
worldGuardEvent.getTarget(),
|
||||||
worldGuardEvent.getEntity());
|
worldGuardEvent.getEntity());
|
||||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
|
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());
|
worldGuardEvent.setResult(event.getResult());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onDamageEntity(DamageEntityEvent worldGuardEvent) {
|
public void onDamageEntity(DamageEntityEvent worldGuardEvent) {
|
||||||
|
@ -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);
|
||||||
|
|
||||||
|
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());
|
worldGuardEvent.setResult(event.getResult());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user