Skip to content

Commit

Permalink
Merge remote-tracking branch 'staartvin/staartvin'
Browse files Browse the repository at this point in the history
Conflicts:
	src/me/staartvin/plugins/pluginlibrary/PluginLibrary.java

Signed-off-by: Staartvin <[email protected]>
  • Loading branch information
Staartvin committed Aug 16, 2015
2 parents 30fc79e + d5e048a commit 22884fb
Show file tree
Hide file tree
Showing 21 changed files with 3,683 additions and 3,681 deletions.
46 changes: 23 additions & 23 deletions .project
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>PluginLibrary</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>PluginLibrary</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
24 changes: 12 additions & 12 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
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
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
95 changes: 49 additions & 46 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,47 +1,50 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>PluginLibrary</groupId>
<artifactId>PluginLibrary</artifactId>
<version>1.0</version>
<name>PluginLibrary</name>
<build>
<sourceDirectory>src</sourceDirectory>
<resources>
<resource>
<directory>src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>

<resource>
<filtering>true</filtering>
<directory>${basedir}</directory>
<includes>
<include>*.yml</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>

<repositories>

<repository>
<id>git-Staartvin</id>
<name>Staartvin's Git based repo</name>
<url>https://github.com/Staartvin/maven-repo/raw/master/</url>
</repository>

</repositories>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>PluginLibrary</groupId>
<artifactId>PluginLibrary</artifactId>
<version>1.0</version>
<name>PluginLibrary</name>
<build>
<sourceDirectory>src</sourceDirectory>
<resources>
<resource>
<directory>src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>

<resource>
<filtering>true</filtering>
<directory>${basedir}</directory>
<includes>
<include>*.yml</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>

<repositories>
<repository>
<id>Staartvin-Bitbucket-repo</id>
<url>https://bitbucket.org/Staartvin/maven-repo/raw/master/</url>
</repository>

<repository>
<id>stats-repo-snapshots</id>
<url>http://nexus.lolmewn.nl/content/repositories/snapshots/</url>
</repository>

</repositories>
</project>
122 changes: 61 additions & 61 deletions src/me/staartvin/plugins/pluginlibrary/Library.java
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
package me.staartvin.plugins.pluginlibrary;

import me.staartvin.plugins.pluginlibrary.hooks.AFKTerminatorHook;
import me.staartvin.plugins.pluginlibrary.hooks.AutorankHook;
import me.staartvin.plugins.pluginlibrary.hooks.FactionsHook;
import me.staartvin.plugins.pluginlibrary.hooks.LibraryHook;
import me.staartvin.plugins.pluginlibrary.hooks.McMMOHook;
import me.staartvin.plugins.pluginlibrary.hooks.OnTimeHook;
import me.staartvin.plugins.pluginlibrary.hooks.RoyalCommandsHook;
import me.staartvin.plugins.pluginlibrary.hooks.StatsHook;
import me.staartvin.plugins.pluginlibrary.hooks.UltimateCoreHook;

/**
* This class holds all libraries PluginLibrary has.
* <p>
* Date created: 14:12:35 12 aug. 2015
*
* @author Staartvin
*
*/
public enum Library {

AUTORANK("Autorank", new AutorankHook()),
STATS("Stats", new StatsHook()),
MCMMO("mcMMO", new McMMOHook()),
FACTIONS("Factions", new FactionsHook()),
ONTIME("OnTime", new OnTimeHook()),
AFKTERMINATOR("afkTerminator", new AFKTerminatorHook()),
ROYALCOMMANDS("RoyalCommands", new RoyalCommandsHook()),
ULTIMATECORE("UltimateCore", new UltimateCoreHook());

private String pluginName;
private LibraryHook hook;

Library(String pluginName, LibraryHook hook) {
this.pluginName = pluginName;
this.hook = hook;
}

public String getPluginName() {
return pluginName;
}

public LibraryHook getHook() {
return hook;
}

/**
* Get a library programmaticaly. This method is the same as valueOf(), but is case-insensitive.
* @param value name of the library
* @return the Library object or null if not found.
*/
public static Library getEnum(String value) {
for (Library e : Library.values()) {
if (e.getPluginName().equalsIgnoreCase(value))
return e;
}

throw new IllegalArgumentException("There is no library called '" + value + "'!");
}
}
package me.staartvin.plugins.pluginlibrary;

import me.staartvin.plugins.pluginlibrary.hooks.AFKTerminatorHook;
import me.staartvin.plugins.pluginlibrary.hooks.AutorankHook;
import me.staartvin.plugins.pluginlibrary.hooks.FactionsHook;
import me.staartvin.plugins.pluginlibrary.hooks.LibraryHook;
import me.staartvin.plugins.pluginlibrary.hooks.McMMOHook;
import me.staartvin.plugins.pluginlibrary.hooks.OnTimeHook;
import me.staartvin.plugins.pluginlibrary.hooks.RoyalCommandsHook;
import me.staartvin.plugins.pluginlibrary.hooks.StatsHook;
import me.staartvin.plugins.pluginlibrary.hooks.UltimateCoreHook;

/**
* This class holds all libraries PluginLibrary has.
* <p>
* Date created: 14:12:35 12 aug. 2015
*
* @author Staartvin
*
*/
public enum Library {

AUTORANK("Autorank", new AutorankHook()),
STATS("Stats", new StatsHook()),
MCMMO("mcMMO", new McMMOHook()),
FACTIONS("Factions", new FactionsHook()),
ONTIME("OnTime", new OnTimeHook()),
AFKTERMINATOR("afkTerminator", new AFKTerminatorHook()),
ROYALCOMMANDS("RoyalCommands", new RoyalCommandsHook()),
ULTIMATECORE("UltimateCore", new UltimateCoreHook());

private String pluginName;
private LibraryHook hook;

Library(String pluginName, LibraryHook hook) {
this.pluginName = pluginName;
this.hook = hook;
}

public String getPluginName() {
return pluginName;
}

public LibraryHook getHook() {
return hook;
}

/**
* Get a library programmaticaly. This method is the same as valueOf(), but is case-insensitive.
* @param value name of the library
* @return the Library object or null if not found.
*/
public static Library getEnum(String value) {
for (Library e : Library.values()) {
if (e.getPluginName().equalsIgnoreCase(value))
return e;
}

throw new IllegalArgumentException("There is no library called '" + value + "'!");
}
}
1 change: 0 additions & 1 deletion src/me/staartvin/plugins/pluginlibrary/PluginLibrary.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public void onEnable() {
loadedLibraries.clear();

//this is a test
// I'm just one below yours
logMessage(ChatColor.GOLD + "***== Loading libraries ==***");
logMessage(ChatColor.GOLD + "***== Loaded " + ChatColor.WHITE
+ loadLibraries() + ChatColor.GOLD + " libraries! ==***");
Expand Down
Loading

0 comments on commit 22884fb

Please sign in to comment.