diff --git a/.classpath b/.classpath deleted file mode 100644 index c4d617d..0000000 --- a/.classpath +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/.gitignore b/.gitignore index 3da7395..01ae45e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ -/target/classes/ -/target/maven-archiver/ -/target/maven-status/ +/target/ +/bin +/.settings +/.classpath +/.project +/*.iml diff --git a/.project b/.project deleted file mode 100644 index 8340c91..0000000 --- a/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - WhitelistPerm - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - - diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 6249222..0000000 --- a/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.7 diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f..0000000 --- a/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/bin/config.yml b/bin/config.yml deleted file mode 100644 index c0f1a22..0000000 --- a/bin/config.yml +++ /dev/null @@ -1,4 +0,0 @@ -Allowed: "Welcome to our server" -# This message is shown to the player when he/she joins the server. you may change the message color by using & followed by the corresponding number -Kick: "You are not whitelisted on this server" -# This is the message sent to non whitelisted players who try to join \ No newline at end of file diff --git a/bin/me/vik1395/whitelist/Whitelist.class b/bin/me/vik1395/whitelist/Whitelist.class deleted file mode 100644 index 2baa9fe..0000000 Binary files a/bin/me/vik1395/whitelist/Whitelist.class and /dev/null differ diff --git a/bin/plugin.yml b/bin/plugin.yml deleted file mode 100644 index 7af0b66..0000000 --- a/bin/plugin.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: WhitelistPerm -version: 1.2 -description: A whitelist plugin that only allows players with permission to join the server. -author: Vik1395 - -main: me.vik1395.whitelist.Whitelist - -commands: \ No newline at end of file diff --git a/pom.xml b/pom.xml index 563a6ac..10883e1 100644 --- a/pom.xml +++ b/pom.xml @@ -2,10 +2,11 @@ 4.0.0 me.vik1395 WhitelistPerm - 1.2 + 1.2.1 WhitelistPerm A whitelist plugin that only allows players with permission to join the server. + package src @@ -20,8 +21,8 @@ maven-compiler-plugin 3.1 - 1.7 - 1.7 + 8 + 8 @@ -39,7 +40,7 @@ org.spigotmc spigot-api - 1.8.3-R0.1-SNAPSHOT + 1.13.2-R0.1-SNAPSHOT - \ No newline at end of file + diff --git a/src/config.yml b/src/config.yml index c0f1a22..eafd998 100644 --- a/src/config.yml +++ b/src/config.yml @@ -1,4 +1,5 @@ -Allowed: "Welcome to our server" # This message is shown to the player when he/she joins the server. you may change the message color by using & followed by the corresponding number +Allowed: "Welcome to our server" + +# This is the message sent to non whitelisted players who try to join Kick: "You are not whitelisted on this server" -# This is the message sent to non whitelisted players who try to join \ No newline at end of file diff --git a/src/me/vik1395/whitelist/Whitelist.java b/src/me/vik1395/whitelist/Whitelist.java index 079ed7c..f49625c 100644 --- a/src/me/vik1395/whitelist/Whitelist.java +++ b/src/me/vik1395/whitelist/Whitelist.java @@ -14,7 +14,7 @@ public class Whitelist extends JavaPlugin implements Listener, CommandExecutor public void onEnable() { getServer().getPluginManager().registerEvents(this, this); - getLogger().info("WhitelistPerm has successfully started!"); + getLogger().info("WhitelistPerm v" + getDescription().getVersion() + " has successfully started!"); getLogger().info("Created by Vik1395"); saveDefaultConfig(); } @@ -31,8 +31,9 @@ public void onPlayerJoin(PlayerLoginEvent event) event.disallow(PlayerLoginEvent.Result.KICK_OTHER, format(kicked)); p.kickPlayer(format(kicked)); } - else if(p.hasPermission("whitelist.allowed")) + else if(!allowed.isEmpty()) { + event.allow(); p.sendMessage(format(allowed)); } } diff --git a/src/plugin.yml b/src/plugin.yml index 7af0b66..d04c6e6 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,8 +1,9 @@ name: WhitelistPerm -version: 1.2 +version: 1.2.1 +api-version: 1.13 description: A whitelist plugin that only allows players with permission to join the server. author: Vik1395 main: me.vik1395.whitelist.Whitelist -commands: \ No newline at end of file +commands: diff --git a/target/classes/config.yml b/target/classes/config.yml deleted file mode 100644 index c0f1a22..0000000 --- a/target/classes/config.yml +++ /dev/null @@ -1,4 +0,0 @@ -Allowed: "Welcome to our server" -# This message is shown to the player when he/she joins the server. you may change the message color by using & followed by the corresponding number -Kick: "You are not whitelisted on this server" -# This is the message sent to non whitelisted players who try to join \ No newline at end of file diff --git a/target/classes/me/vik1395/whitelist/Whitelist.class b/target/classes/me/vik1395/whitelist/Whitelist.class deleted file mode 100644 index 2baa9fe..0000000 Binary files a/target/classes/me/vik1395/whitelist/Whitelist.class and /dev/null differ diff --git a/target/classes/plugin.yml b/target/classes/plugin.yml deleted file mode 100644 index 7af0b66..0000000 --- a/target/classes/plugin.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: WhitelistPerm -version: 1.2 -description: A whitelist plugin that only allows players with permission to join the server. -author: Vik1395 - -main: me.vik1395.whitelist.Whitelist - -commands: \ No newline at end of file