File tree Expand file tree Collapse file tree
java/com/github/crashdemons/aprilfools Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Eclipse stuff
2+ /.classpath
3+ /.project
4+ /.settings
5+
6+ # netbeans
7+ /nbproject
8+ * .versionsBackup
9+
10+ # maven
11+ /build.xml
12+ /target
13+ /pom.xml.versionsBackup
14+
15+ # vim
16+ . * .sw [a-p ]
17+
18+ # various other potential build files
19+ /build
20+ /bin
21+ /dist
22+ /manifest.mf
23+
24+ /world
25+
26+ # Mac filesystem dust
27+ /.DS_Store
28+
29+ # intellij
30+ * .iml
31+ * .ipr
32+ * .iws
33+ .idea /
34+
35+ # personal
36+ /test-in-spigot.bat
37+ /private
38+
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <project-shared-configuration >
3+ <!--
4+ This file contains additional configuration written by modules in the NetBeans IDE.
5+ The configuration is intended to be shared among all the users of project and
6+ therefore it is assumed to be part of version control checkout.
7+ Without this configuration present, some functionality in the IDE may be limited or fail altogether.
8+ -->
9+ <properties xmlns =" http://www.netbeans.org/ns/maven-properties-data/1" >
10+ <!--
11+ Properties that influence various parts of the IDE, especially code formatting and the like.
12+ You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
13+ That way multiple projects can share the same settings (useful for formatting rules for example).
14+ Any value defined here will override the pom.xml file value but is only applicable to the current project.
15+ -->
16+ <netbeans .hint.jdkPlatform>JDK_1.8_u181_x64</netbeans .hint.jdkPlatform>
17+ </properties >
18+ </project-shared-configuration >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
3+ <modelVersion >4.0.0</modelVersion >
4+ <groupId >com.github.crashdemons</groupId >
5+ <artifactId >AprilFools</artifactId >
6+ <version >0.0.9-SNAPSHOT</version >
7+ <packaging >jar</packaging >
8+ <properties >
9+ <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
10+ <maven .compiler.source>1.8</maven .compiler.source>
11+ <maven .compiler.target>1.8</maven .compiler.target>
12+ </properties >
13+
14+ <repositories >
15+ <repository >
16+ <id >spigot-repo</id >
17+ <url >https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url >
18+ </repository >
19+ </repositories >
20+ <dependencies >
21+ <dependency >
22+ <groupId >org.bukkit</groupId >
23+ <artifactId >bukkit</artifactId >
24+ <version >[1.15.2-R0.1-SNAPSHOT]</version >
25+ <scope >compile</scope >
26+ </dependency >
27+ <dependency >
28+ <groupId >org.jetbrains</groupId >
29+ <artifactId >annotations</artifactId >
30+ <version >15.0</version >
31+ </dependency >
32+ </dependencies >
33+
34+ <build >
35+ <plugins >
36+ <plugin >
37+ <groupId >org.apache.maven.plugins</groupId >
38+ <artifactId >maven-compiler-plugin</artifactId >
39+ <version >2.0.2</version >
40+ <configuration >
41+ <source >1.8</source >
42+ <target >1.8</target >
43+ </configuration >
44+ </plugin >
45+ </plugins >
46+ <finalName >${project.name} -${project.version} </finalName >
47+ <resources >
48+ <resource >
49+ <directory >${basedir} /src/main/resources</directory >
50+ <filtering >true</filtering >
51+ </resource >
52+ </resources >
53+ </build >
54+
55+ </project >
Original file line number Diff line number Diff line change 1+ /*
2+ * To change this license header, choose License Headers in Project Properties.
3+ * To change this template file, choose Tools | Templates
4+ * and open the template in the editor.
5+ */
6+ package com .github .crashdemons .aprilfools ;
7+
8+ import org .bukkit .Material ;
9+ import org .bukkit .entity .Projectile ;
10+ import org .bukkit .entity .ThrowableProjectile ;
11+ import org .bukkit .event .EventHandler ;
12+ import org .bukkit .event .Listener ;
13+ import org .bukkit .event .entity .ProjectileLaunchEvent ;
14+ import org .bukkit .inventory .ItemStack ;
15+ import org .bukkit .plugin .java .JavaPlugin ;
16+
17+ /**
18+ *
19+ * @author crashdemons (crashenator at gmail.com)
20+ */
21+ public class Plugin extends JavaPlugin implements Listener {
22+
23+ @ Override
24+ public void onEnable (){
25+ this .getServer ().getPluginManager ().registerEvents (this , this );
26+ }
27+
28+
29+ @ EventHandler (ignoreCancelled =true )
30+ public void onProjectile (ProjectileLaunchEvent event ){
31+ Projectile proj = event .getEntity ();
32+ if (proj instanceof ThrowableProjectile ){
33+ ThrowableProjectile tproj = (ThrowableProjectile ) proj ;
34+ tproj .setItem (new ItemStack (Material .DIAMOND ));
35+ }
36+ }
37+ }
Original file line number Diff line number Diff line change 1+ name : AprilFools
2+ version : ${project.version}
3+ description : nah
4+ authors : [crashdemons]
5+
6+ api-version : 1.13
7+
8+ main : com.github.crashdemons.aprilfools.Plugin
You can’t perform that action at this time.
0 commit comments