summaryrefslogtreecommitdiff
path: root/src/main/java/com/redstoner/modules/warn
diff options
context:
space:
mode:
authorDavid <david@panic.tk>2018-11-07 23:50:06 +0100
committerDavid <david@panic.tk>2018-11-07 23:50:06 +0100
commit604cf01967ede98bf5024e4926bb0777fc4e8eee (patch)
treee2fa63d7e683769ee3bf3eddc75280648e92eb04 /src/main/java/com/redstoner/modules/warn
parente86c52ef7c0e1e33c6af0e8674b038976bec11cc (diff)
Converted Modules to gradle
Diffstat (limited to 'src/main/java/com/redstoner/modules/warn')
-rw-r--r--src/main/java/com/redstoner/modules/warn/Warn.cmd15
-rw-r--r--src/main/java/com/redstoner/modules/warn/Warn.java29
2 files changed, 44 insertions, 0 deletions
diff --git a/src/main/java/com/redstoner/modules/warn/Warn.cmd b/src/main/java/com/redstoner/modules/warn/Warn.cmd
new file mode 100644
index 0000000..5021e0f
--- /dev/null
+++ b/src/main/java/com/redstoner/modules/warn/Warn.cmd
@@ -0,0 +1,15 @@
+command warn {
+ [empty] {
+ run warn;
+ help Warns other players about definite lag;
+ perm utils.warn;
+ }
+}
+
+command warnp {
+ [empty] {
+ run warnp;
+ help Warns other players about possible lag;
+ perm utils.warn;
+ }
+} \ No newline at end of file
diff --git a/src/main/java/com/redstoner/modules/warn/Warn.java b/src/main/java/com/redstoner/modules/warn/Warn.java
new file mode 100644
index 0000000..c272c67
--- /dev/null
+++ b/src/main/java/com/redstoner/modules/warn/Warn.java
@@ -0,0 +1,29 @@
+package com.redstoner.modules.warn;
+
+import org.bukkit.command.CommandSender;
+
+import com.nemez.cmdmgr.Command;
+import com.redstoner.annotations.Commands;
+import com.redstoner.annotations.Version;
+import com.redstoner.misc.CommandHolderType;
+import com.redstoner.misc.Utils;
+import com.redstoner.modules.Module;
+
+@Commands(CommandHolderType.File)
+@Version(major = 4, minor = 1, revision = 0, compatible = 4)
+public class Warn implements Module
+{
+ @Command(hook = "warn")
+ public void warn_normal(CommandSender sender)
+ {
+ String name = Utils.getName(sender);
+ Utils.broadcast(null, "§2Lag incoming! - §9" + name, null);
+ }
+
+ @Command(hook = "warnp")
+ public void warn_possible(CommandSender sender)
+ {
+ String name = Utils.getName(sender);
+ Utils.broadcast(null, "§2Possible lag incoming! - §9" + name, null);
+ }
+}