Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

Commit

Permalink
Update JDs
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua authored and Joshua committed Dec 1, 2012
1 parent 96bf767 commit b9350a2
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 48 deletions.
39 changes: 19 additions & 20 deletions src/main/java/com/lordralex/antimulti/AntiMulti.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
import org.bukkit.plugin.java.JavaPlugin;

/**
* @version 3.0
* @version 3.0.0
* @author Lord_Ralex
* @since 1.0
*/
public class AntiMulti extends JavaPlugin {

Expand All @@ -22,10 +21,10 @@ public class AntiMulti extends JavaPlugin {

@Override
public void onLoad() {
getLogger().info("Beginning setup of " + getTitle());
this.getLogger().info("Beginning setup of " + getTitle());
instance = this;
AMLogger.setup(instance);
getLogger().info("Initial setup complete");
this.getLogger().info("Initial setup complete");
}

@Override
Expand Down Expand Up @@ -74,38 +73,38 @@ public String getVersion() {
}

/**
* Returns the DataManager that is being used to read and write data
* Returns a title for this plugin, formatted as "[Name]-[Version]"
*
* @return The DataManager in use
* @return The title of this plugin
*/
public DataManager getManager() {
return manager;
public String getTitle() {
return getName() + "-" + getVersion();
}

/**
* Returns the instance of this plugin
* Returns the DataManager that is being used to read and write data
*
* @return Instance of plugin
* @return The DataManager in use
*/
public static AntiMulti getPlugin() {
return instance;
public DataManager getManager() {
return manager;
}

/**
* Returns a title for this plugin, formatted as "[Name]-[Version]"
* Returns the PlayerListener that is being used for this plugin
*
* @return The title of this plugin
* @return The PlayerListener for this plugin
*/
public String getTitle() {
return getName() + "-" + getVersion();
public PlayerListener getPlayerListener() {
return pListener;
}

/**
* Returns the PlayerListener that is being used for this plugin
* Returns the instance of this plugin
*
* @return The PlayerListener for this plugin
* @return Instance of plugin
*/
public PlayerListener getPlayerListener() {
return pListener;
public static AntiMulti getPlugin() {
return instance;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
import org.bukkit.entity.Player;

/**
* @version 3.0
* @version 3.0.0
* @author Lord_Ralex
* @since 1.0
*/
public abstract class CommandManager implements CommandExecutor {

Expand All @@ -27,14 +26,14 @@ public abstract class CommandManager implements CommandExecutor {

/**
* Returns the name of this sub-command
*
*
* @return Name of command
*/
public abstract String getName();

/**
* Returns the sub-command's help line
*
*
* @return Help for this command
*/
public abstract String getHelp();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
import org.bukkit.command.CommandSender;

/**
* @version 3.0
* @version 3.0.0
* @author Lord_Ralex
* @since 1.0
*/
public class Add extends CommandManager {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
import org.bukkit.command.CommandSender;

/**
* @version 3.0
* @version 3.0.0
* @author Lord_Ralex
* @since 1.2
*/
public class Reload extends CommandManager {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
import org.bukkit.entity.Player;

/**
* @version 3.0
* @since 1.1
* @version 3.0.0
* @author Lord_Ralex
*/
public class Whitelist extends CommandManager {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
import org.bukkit.plugin.Plugin;

/**
* @version 3.0
* @version 3.0.0
* @author Lord_Ralex
* @since 1.2
*/
public class Configuration {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
import org.bukkit.configuration.file.YamlConfiguration;

/**
* @version 3.0
* @version 3.0.0
* @author Lord_Ralex
* @since 2.0.5
*/
public class FlatFileManager implements Manager {

Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/lordralex/antimulti/files/Manager.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package com.lordralex.antimulti.files;

/**
* @version 3.0
* @version 3.0.0
* @author Lord_Ralex
* @since 2.0.5
*/
public interface Manager {

Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/lordralex/antimulti/files/SQLManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
import lib.PatPeter.SQLibrary.MySQL;

/**
* @version 3.0
* @version 3.0.0
* @author Lord_Ralex
* @since 2.0.5
*/
public class SQLManager implements Manager {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
import org.bukkit.event.player.PlayerLoginEvent.Result;

/**
* @version 3.0
* @version 3.0.0
* @author Lord_Ralex
* @since 1.2
*/
public class PlayerListener implements Listener {

Expand Down Expand Up @@ -108,6 +107,7 @@ public boolean getWhitelistStatus() {
}

/**
* Checks to see if a player has a certain permission
*
* @param player The player to check
* @param permission The permission to check
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/lordralex/antimulti/logger/AMLogger.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
*
* @version 3.0
* @author Lord_Ralex
* @since 1.2
*/
public class AMLogger {

Expand Down
8 changes: 1 addition & 7 deletions src/main/java/com/lordralex/antimulti/utils/IPHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
* Handles comparison of 2 IPs. This allows checks of IPs including ranges and
* wildcards.
*
* @version 3.0
* @version 3.0.0
* @author Lord_Ralex
* @since 1.2
*/
public final class IPHandler {

Expand All @@ -22,7 +21,6 @@ public final class IPHandler {
* @param ip1 The first IP to check
* @param ip2 The second IP to check
* @return True if the ips are the same, false otherwise
* @since 1.0
*/
public static boolean contains(String ip1, String ip2) {
try {
Expand Down Expand Up @@ -86,7 +84,6 @@ public static boolean contains(String ip1, String ip2) {
* @param ip2 The second IP to check
* @return True if the IPs are the same, false otherwise
* @see contains(String, String)
* @since 1.0
*/
public static boolean contains(InetAddress ip, InetAddress ip2) {
return contains(ip.getHostAddress(), ip2.getHostAddress());
Expand All @@ -100,7 +97,6 @@ public static boolean contains(InetAddress ip, InetAddress ip2) {
* @param ip2 The second IP to check
* @return True if the IPs are the same, false otherwise
* @see contains(String, String)
* @since 3.0
*/
public static boolean contains(String ip, InetAddress ip2) {
return contains(ip, ip2.getHostAddress());
Expand All @@ -114,7 +110,6 @@ public static boolean contains(String ip, InetAddress ip2) {
* @param ip2 The second IP to check
* @return True if the IPs are the same, false otherwise
* @see contains(String, String)
* @since 3.0
*/
public static boolean contains(InetAddress ip, String ip2) {
return contains(ip.getHostAddress(), ip2);
Expand All @@ -127,7 +122,6 @@ public static boolean contains(InetAddress ip, String ip2) {
* @param list The list of IPs to check with
* @param ip The ip to attempt to find
* @return True if the list contains the IP, false otherwise
* @since 1.0
*/
public static boolean contains(List<String> list, String ip) {
for (String test : list) {
Expand Down

0 comments on commit b9350a2

Please sign in to comment.