Skip to content

Commit 6efdd9e

Browse files
committed
first commit
0 parents  commit 6efdd9e

File tree

7 files changed

+489
-0
lines changed

7 files changed

+489
-0
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/nbproject/private/
2+
/dist/lib/
3+
/test-in-spigot.bat
4+
/lib/
5+
/target/
6+
/build/
7+
/dist/

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# WGItemFrameBreakFlags
2+
3+
Requires Worldguard 7 and a 1.16+ server. Other configurations are untested.
4+
5+
This plugin was specifically made because if the following behavior in spigot https://hub.spigotmc.org/jira/browse/SPIGOT-3999
6+
which means Worldguard does not catch Physics events causes by Boats, as well as other Removal Causes ( https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/hanging/HangingBreakEvent.RemoveCause.html )
7+
8+
This plugin serves to cover these specific cases by adding flags for each but cannot and will not implement any more exhaustive checks on the source of the event.
9+
10+
11+
Adds:
12+
13+
* `default-item-frame-destroy` for unknown causes
14+
* `explosion-item-frame-destroy` for explosion-caused item frame destruction
15+
* `obstruction-item-frame-destroy` for when block placement would cause the item frame to break
16+
* `physics-item-frame-destroy` for when physics or bounding boxes (like those of a Boat) cause the item frame to break.

licenseheader.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/*
2+
* This Source Code Form is subject to the terms of the Mozilla Public
3+
* License, v. 2.0. If a copy of the MPL was not distributed with this
4+
* file, You can obtain one at http://mozilla.org/MPL/2.0/ .
5+
*/

pom.xml

Lines changed: 238 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,238 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<groupId>com.github.crashdemons</groupId>
6+
<artifactId>WGItemFrameBreakFlags</artifactId>
7+
<version>0.0.1-SNAPSHOT</version>
8+
<packaging>jar</packaging>
9+
10+
<name>WGItemFrameBreakFlags</name>
11+
12+
<properties>
13+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
14+
</properties>
15+
16+
<repositories>
17+
<repository>
18+
<id>mojang</id>
19+
<name>Mojang's Repository</name>
20+
<url>https://libraries.minecraft.net/</url>
21+
</repository>
22+
<repository>
23+
<id>spigot-repo</id>
24+
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
25+
</repository>
26+
<repository>
27+
<id>md_5-releases</id>
28+
<url>http://repo.md-5.net/content/repositories/releases/</url>
29+
</repository>
30+
<repository>
31+
<id>spigot-group-repo</id>
32+
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
33+
</repository>
34+
<repository>
35+
<id>crashdemons-repo</id>
36+
<url>https://meme.tips/java-repos/</url>
37+
</repository>
38+
<repository>
39+
<id>sk89q-repo</id>
40+
<url>http://maven.sk89q.com/repo/</url>
41+
</repository>
42+
</repositories>
43+
44+
<dependencies>
45+
<dependency>
46+
<groupId>org.spigotmc</groupId>
47+
<artifactId>spigot-api</artifactId>
48+
<version>1.16.5-R0.1-SNAPSHOT</version>
49+
<!--
50+
<exclusions>
51+
<exclusion>
52+
<groupId>*</groupId>
53+
<artifactId>*</artifactId>
54+
</exclusion>
55+
</exclusions>
56+
-->
57+
</dependency>
58+
<dependency>
59+
<groupId>com.sk89q.worldguard</groupId>
60+
<artifactId>worldguard-bukkit</artifactId>
61+
<version>7.0.4</version>
62+
<exclusions>
63+
<exclusion>
64+
<groupId>org.bukkit</groupId>
65+
<artifactId>bukkit</artifactId>
66+
</exclusion>
67+
<exclusion>
68+
<groupId>org.spigotmc</groupId>
69+
<artifactId>spigot-api</artifactId>
70+
</exclusion>
71+
</exclusions>
72+
</dependency>
73+
74+
75+
<dependency>
76+
<groupId>org.jetbrains</groupId>
77+
<artifactId>annotations-java5</artifactId>
78+
<version>15.0</version>
79+
</dependency>
80+
<dependency>
81+
<groupId>junit</groupId>
82+
<artifactId>junit</artifactId>
83+
<version>4.13.1</version>
84+
<type>jar</type>
85+
<scope>test</scope>
86+
</dependency>
87+
<dependency>
88+
<groupId>org.powermock</groupId>
89+
<artifactId>powermock-module-junit4</artifactId>
90+
<version>2.0.7</version>
91+
<type>jar</type>
92+
<scope>test</scope>
93+
</dependency>
94+
<dependency>
95+
<groupId>org.powermock</groupId>
96+
<artifactId>powermock-api-mockito2</artifactId>
97+
<version>2.0.7</version>
98+
<type>jar</type>
99+
<scope>test</scope>
100+
</dependency>
101+
<dependency>
102+
<groupId>org.mockito</groupId>
103+
<artifactId>mockito-core</artifactId>
104+
<version>3.5.11</version>
105+
<scope>test</scope>
106+
</dependency>
107+
<dependency>
108+
<groupId>org.powermock</groupId>
109+
<artifactId>powermock-api-mockito-common</artifactId>
110+
<version>1.7.4</version>
111+
<scope>test</scope>
112+
</dependency>
113+
</dependencies>
114+
115+
116+
117+
<build>
118+
<finalName>${project.name}-${project.version}</finalName>
119+
<resources>
120+
<resource>
121+
<directory>${basedir}/src/main/resources</directory>
122+
<filtering>true</filtering>
123+
</resource>
124+
</resources>
125+
126+
<plugins>
127+
<plugin>
128+
<groupId>org.apache.maven.plugins</groupId>
129+
<artifactId>maven-compiler-plugin</artifactId>
130+
<version>3.8.1</version>
131+
<configuration>
132+
<source>1.8</source>
133+
<target>1.8</target>
134+
<useIncrementalCompilation>true</useIncrementalCompilation>
135+
<excludes>
136+
<exclude>**/package-info.java</exclude>
137+
</excludes>
138+
<testExcludes>
139+
<exclude>**/package-info.java</exclude>
140+
</testExcludes>
141+
<compilerArgs>
142+
<arg>-Xlint:all</arg>
143+
</compilerArgs>
144+
</configuration>
145+
</plugin>
146+
<plugin>
147+
<artifactId>maven-jar-plugin</artifactId>
148+
<version>3.2.0</version>
149+
<configuration>
150+
<archive>
151+
<manifestEntries>
152+
<Built-By>Maven</Built-By>
153+
<Implementation-Title>${project.name}</Implementation-Title>
154+
<Implementation-Version>${project.version}</Implementation-Version>
155+
<Implementation-Vendor-Id>${project.groupId}</Implementation-Vendor-Id>
156+
<Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
157+
</manifestEntries>
158+
</archive>
159+
</configuration>
160+
</plugin>
161+
162+
163+
<plugin>
164+
<groupId>org.codehaus.mojo</groupId>
165+
<artifactId>versions-maven-plugin</artifactId>
166+
<version>2.2</version>
167+
<configuration>
168+
<includes>
169+
<include>org.bukkit</include>
170+
<include>org.spigotmc</include>
171+
</includes>
172+
</configuration>
173+
<executions>
174+
<execution>
175+
<id>versions</id>
176+
<phase>validate</phase>
177+
<configuration>
178+
<allowSnapshots>true</allowSnapshots>
179+
</configuration>
180+
<goals>
181+
<goal>use-latest-versions</goal>
182+
</goals>
183+
</execution>
184+
</executions>
185+
</plugin>
186+
187+
<plugin>
188+
<artifactId>maven-antrun-plugin</artifactId>
189+
<version>1.8</version>
190+
<executions>
191+
<execution>
192+
<phase>package</phase>
193+
<configuration>
194+
<target>
195+
<copy file="${project.build.directory}/${project.build.finalName}.${project.packaging}"
196+
tofile="${project.build.directory}/${project.name}.${project.packaging}"/>
197+
</target>
198+
</configuration>
199+
<goals>
200+
<goal>run</goal>
201+
</goals>
202+
</execution>
203+
</executions>
204+
</plugin>
205+
</plugins>
206+
<pluginManagement>
207+
<plugins>
208+
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
209+
<plugin>
210+
<groupId>org.eclipse.m2e</groupId>
211+
<artifactId>lifecycle-mapping</artifactId>
212+
<version>1.0.0</version>
213+
<configuration>
214+
<lifecycleMappingMetadata>
215+
<pluginExecutions>
216+
<pluginExecution>
217+
<pluginExecutionFilter>
218+
<groupId>org.codehaus.mojo</groupId>
219+
<artifactId>versions-maven-plugin</artifactId>
220+
<versionRange>[2.2,)</versionRange>
221+
<goals>
222+
<goal>use-latest-versions</goal>
223+
</goals>
224+
</pluginExecutionFilter>
225+
<action>
226+
<ignore/>
227+
</action>
228+
</pluginExecution>
229+
</pluginExecutions>
230+
</lifecycleMappingMetadata>
231+
</configuration>
232+
</plugin>
233+
</plugins>
234+
</pluginManagement>
235+
236+
</build>
237+
238+
</project>

0 commit comments

Comments
 (0)