Skip to content
Browse files

Added missing command and permissions definitions, show version number

on startup
  • Loading branch information...
1 parent 9ef54a6 commit bffd0a5e2eba14a67bf7cd432c8711274cd1b7fd @Evenprime committed
View
46 Instructions.txt
@@ -21,28 +21,64 @@
NoPwnage will assign each message of each player a certain "suspicion" value,
based on numerous properties, circumstances etc.
-
+
If a message of a player reaches a specific suspicion level, the player may
get warned to change his behaviour. If he reaches an even higher suspicion
level, he will get banned (by default) or otherwise handled, depending on the
config file.
-
+
In addition to that, players that rejoin the game after leaving it really fast
will also be subjected to warnings and finally penalties.
You have control about how much suspicion each property of the message will
"earn". For most properties you have the option:
-
+
- enabled: should this property be considered at all
-
+
- weight: how much suspicion is given for full-filling the conditions
-
+
- timeout: how much time in milliseconds (1000 = 1 second) has to pass before
this property becomes reset/ignored (depends on the property).
################################################################################
# #
+# Permissions #
+# #
+################################################################################
+
+ NoPwnage allows you to give players special permissions to e.g. bypass the
+ checks or to administrate the plugin.
+
+ nopwnage.admin:
+ The player can use the "nopwnage" command to switch the plugin on/off
+
+ nopwnage.spam:
+ The player will be ignored by the spam checking part of NoPwnage. Only
+ give this to trusted users and NOT to new users that didn't visit your
+ server before.
+
+ nopwnage.login:
+ The player will be ignored by the "relog" checking part of NoPwnage. Only
+ give this to trusted users and NOT to new users that didn't visit your
+ server before.
+
+
+################################################################################
+# #
+# Commands #
+# #
+################################################################################
+
+ NoPwnage currently only has one command.
+
+ "/nopwnage" (in chat) or "nopwnage" (in console)
+
+ Toggle NoPwnage on/off
+
+
+################################################################################
+# #
# All available config settings #
# #
################################################################################
View
18 plugin.yml
@@ -6,3 +6,21 @@ description: ${project.description}
author: Evenprime
main: cc.co.evenprime.bukkit.nopwnage.NoPwnage
+
+commands:
+ nopwnage:
+ description: NoPwnage command
+ permission: nopwnage.admin
+ usage: |
+ /<command> : Turn NoPwnage on/off
+
+permissions:
+ nopwnage:
+ description: Allow a player to do everything related to NoPwnage
+ children:
+ nopwnage.admin:
+ description: Give a player access to the "/nopwnage" command
+ nopwnage.login:
+ description: Don't monitor the players relogging behaviour
+ nopwnage.spam:
+ description: Don't monitor the players chat messages at all
View
2 pom.xml
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>cc.co.evenprime.bukkit</groupId>
<artifactId>NoPwnage</artifactId>
- <version>1.0.0</version>
+ <version>1.1.0</version>
<packaging>jar</packaging>
<name>NoPwnage</name>
<properties>
View
4 src/cc/co/evenprime/bukkit/nopwnage/NoPwnage.java
@@ -37,7 +37,7 @@ public void onEnable() {
data.setLocation(l);
}
- log("NoPwnage has been enabled!");
+ System.out.println("[NoPwnage] version ["+this.getDescription().getVersion() + "] has been enabled!");
}
public void onDisable() {
@@ -70,7 +70,7 @@ public NoPwnageConfiguration getNPconfig() {
@Override
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
- if(commandLabel.equalsIgnoreCase("pwnage")) {
+ if(commandLabel.equalsIgnoreCase("nopwnage")) {
if(sender.hasPermission(Permissions.ADMIN)) {
enabled = !enabled;
if(enabled) {
View
6 src/cc/co/evenprime/bukkit/nopwnage/Permissions.java
@@ -2,7 +2,7 @@
public class Permissions {
- public static final String SPAM = "antipwnage.spam";
- public static final String ADMIN = "antipwnage.admin";
- public static final String LOGIN = "antipwnage.login";;
+ public static final String SPAM = "nopwnage.spam";
+ public static final String ADMIN = "nopwnage.admin";
+ public static final String LOGIN = "nopwnage.login";;
}

0 comments on commit bffd0a5

Please sign in to comment.
Something went wrong with that request. Please try again.