diff --git a/VoidNetworkCore.iml b/VoidNetworkCore.iml new file mode 100644 index 0000000..89b7109 --- /dev/null +++ b/VoidNetworkCore.iml @@ -0,0 +1,31 @@ + + + + + + + SPIGOT + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/out/artifacts/VoidNetworkCore_jar/VoidNetworkCore.jar b/out/artifacts/VoidNetworkCore_jar/VoidNetworkCore.jar new file mode 100644 index 0000000..86a6d8c Binary files /dev/null and b/out/artifacts/VoidNetworkCore_jar/VoidNetworkCore.jar differ diff --git a/out/production/VoidNetworkCore/org/jacob/spigot/plugins/VNC/AnnounceCommand.class b/out/production/VoidNetworkCore/org/jacob/spigot/plugins/VNC/AnnounceCommand.class new file mode 100644 index 0000000..bcbbd50 Binary files /dev/null and b/out/production/VoidNetworkCore/org/jacob/spigot/plugins/VNC/AnnounceCommand.class differ diff --git a/out/production/VoidNetworkCore/org/jacob/spigot/plugins/VNC/Main.class b/out/production/VoidNetworkCore/org/jacob/spigot/plugins/VNC/Main.class new file mode 100644 index 0000000..885acf8 Binary files /dev/null and b/out/production/VoidNetworkCore/org/jacob/spigot/plugins/VNC/Main.class differ diff --git a/out/production/VoidNetworkCore/plugin.yml b/out/production/VoidNetworkCore/plugin.yml new file mode 100644 index 0000000..f50c77b --- /dev/null +++ b/out/production/VoidNetworkCore/plugin.yml @@ -0,0 +1,6 @@ +name: VoidNetworkCore +main: org.jacob.spigot.plugins.VNC.Main +version: 1.0 +api-version: "1.13" +commands: + announce: \ No newline at end of file diff --git a/src/org/jacob/spigot/plugins/VNC/AnnounceCommand.java b/src/org/jacob/spigot/plugins/VNC/AnnounceCommand.java new file mode 100644 index 0000000..83272f5 --- /dev/null +++ b/src/org/jacob/spigot/plugins/VNC/AnnounceCommand.java @@ -0,0 +1,36 @@ +package org.jacob.spigot.plugins.VNC; + +import net.md_5.bungee.api.ChatColor; +import org.bukkit.Bukkit; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; + +public class AnnounceCommand implements CommandExecutor { + @Override + public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) { + + if(s.equalsIgnoreCase("announce")) { + + if(!commandSender.hasPermission("vnc.announce")) { + commandSender.sendMessage(ChatColor.RED + "No permissions!"); + return true; + } + + if(strings.length == 0) { + commandSender.sendMessage(ChatColor.RED + "Usage: /announce "); + return true; + } + + String message = ""; + for (int i = 0; i < strings.length; i++) { + message = message + strings[i] + " "; + } + + Bukkit.broadcastMessage(ChatColor.RED + "[Voidnetwork MC] " + ChatColor.DARK_GRAY + ">> " + ChatColor.GRAY + message); + + } + + return true; + } +} diff --git a/src/org/jacob/spigot/plugins/VNC/Main.java b/src/org/jacob/spigot/plugins/VNC/Main.java new file mode 100644 index 0000000..bcf2a16 --- /dev/null +++ b/src/org/jacob/spigot/plugins/VNC/Main.java @@ -0,0 +1,12 @@ +package org.jacob.spigot.plugins.VNC; + +import org.bukkit.plugin.java.JavaPlugin; + +public class Main extends JavaPlugin { + + @Override + public void onEnable() { + + getCommand("announce").setExecutor(new AnnounceCommand()); + } +} diff --git a/src/plugin.yml b/src/plugin.yml new file mode 100644 index 0000000..f50c77b --- /dev/null +++ b/src/plugin.yml @@ -0,0 +1,6 @@ +name: VoidNetworkCore +main: org.jacob.spigot.plugins.VNC.Main +version: 1.0 +api-version: "1.13" +commands: + announce: \ No newline at end of file