commit a5a8a8f158a6cc755245a45f7ee95d62d06cd5ef Author: cybsec Date: Tue Feb 3 01:46:21 2026 -0500 Initial commit: Minecraft plugin that detects 'oye' in chat and prints it in green diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..25016af --- /dev/null +++ b/pom.xml @@ -0,0 +1,66 @@ + + 4.0.0 + + party.cybsec + oye + 1.0 + jar + + OyePlugin + A Minecraft plugin that detects "oye" in chat and prints it in green + + + 17 + 17 + UTF-8 + + + + + org.spigotmc + spigot-api + 1.21.1-R0.1-SNAPSHOT + provided + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.13.0 + + 17 + 17 + + + + org.apache.maven.plugins + maven-shade-plugin + 3.6.0 + + + package + + shade + + + false + + + + + + + + + + spigot-repo + https://hub.spigotmc.org/nexus/content/repositories/snapshots/ + + + \ No newline at end of file diff --git a/src/main/java/com/example/oye/OyePlugin.java b/src/main/java/com/example/oye/OyePlugin.java new file mode 100644 index 0000000..74d4800 --- /dev/null +++ b/src/main/java/com/example/oye/OyePlugin.java @@ -0,0 +1,36 @@ +package party.cybsec.oye; + +import org.bukkit.plugin.java.JavaPlugin; +import org.bukkit.event.Listener; +import org.bukkit.event.EventHandler; +import org.bukkit.event.player.AsyncPlayerChatEvent; +import org.bukkit.ChatColor; + +public class OyePlugin extends JavaPlugin implements Listener { + + @Override + public void onEnable() { + // register the event listener + getServer().getPluginManager().registerEvents(this, this); + getLogger().info("Oye plugin enabled!"); + } + + @Override + public void onDisable() { + getLogger().info("Oye plugin disabled!"); + } + + @EventHandler + public void onPlayerChat(AsyncPlayerChatEvent event) { + String message = event.getMessage().toLowerCase(); + + // check if the message contains "oye" + if (message.contains("oye")) { + // cancel the original message + event.setCancelled(true); + + // send a green "oye" message + getServer().broadcastMessage(ChatColor.GREEN + "oye"); + } + } +} \ No newline at end of file diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml new file mode 100644 index 0000000..2189355 --- /dev/null +++ b/src/main/resources/plugin.yml @@ -0,0 +1,4 @@ +name: OyePlugin +version: 1.0 +main: party.cybsec.oye.OyePlugin +api-version: 1.21 \ No newline at end of file diff --git a/target/classes/party/cybsec/oye/OyePlugin.class b/target/classes/party/cybsec/oye/OyePlugin.class new file mode 100644 index 0000000..e8ad398 Binary files /dev/null and b/target/classes/party/cybsec/oye/OyePlugin.class differ diff --git a/target/classes/plugin.yml b/target/classes/plugin.yml new file mode 100644 index 0000000..2189355 --- /dev/null +++ b/target/classes/plugin.yml @@ -0,0 +1,4 @@ +name: OyePlugin +version: 1.0 +main: party.cybsec.oye.OyePlugin +api-version: 1.21 \ No newline at end of file diff --git a/target/maven-archiver/pom.properties b/target/maven-archiver/pom.properties new file mode 100644 index 0000000..ce8a926 --- /dev/null +++ b/target/maven-archiver/pom.properties @@ -0,0 +1,3 @@ +artifactId=oye +groupId=party.cybsec +version=1.0 diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..cfb4394 --- /dev/null +++ b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1 @@ +party/cybsec/oye/OyePlugin.class diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..9d6762d --- /dev/null +++ b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1 @@ +/Users/jacktotonchi/Documents/oye/oye/src/main/java/com/example/oye/OyePlugin.java diff --git a/target/original-oye-1.0.jar b/target/original-oye-1.0.jar new file mode 100644 index 0000000..129e047 Binary files /dev/null and b/target/original-oye-1.0.jar differ diff --git a/target/oye-1.0.jar b/target/oye-1.0.jar new file mode 100644 index 0000000..a409c39 Binary files /dev/null and b/target/oye-1.0.jar differ