Spigot 1.8.3-Update

+ Moved Metrics
+ Temporary disabled Worldedit-Integration
This commit is contained in:
Jascha Starke 2015-04-10 23:02:32 +02:00
parent c387bcbf55
commit 648ef2070e
3 changed files with 33 additions and 11 deletions

22
pom.xml
View file

@ -66,6 +66,11 @@
<id>md5</id> <id>md5</id>
<url>http://repo.md-5.net/content/groups/public/</url> <url>http://repo.md-5.net/content/groups/public/</url>
</repository> </repository>
<!-- https://github.com/Hidendra/Plugin-Metrics/wiki/Usage -->
<repository>
<id>Plugin Metrics</id>
<url>http://repo.mcstats.org/content/repositories/public</url>
</repository>
</repositories> </repositories>
<dependencies> <dependencies>
@ -128,6 +133,13 @@
<artifactId>coreprotect</artifactId> <artifactId>coreprotect</artifactId>
<version>2.0.8</version> <version>2.0.8</version>
</dependency> </dependency>
<dependency>
<!-- https://github.com/Hidendra/Plugin-Metrics/wiki/Usage -->
<groupId>org.mcstats.bukkit</groupId>
<artifactId>metrics</artifactId>
<version>R7</version>
<scope>compile</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
@ -146,6 +158,9 @@
<!-- Needed to fetch DocComments from Source --> <!-- Needed to fetch DocComments from Source -->
<annotationProcessor>de.jaschastarke.maven.AnnotationProcessor</annotationProcessor> <annotationProcessor>de.jaschastarke.maven.AnnotationProcessor</annotationProcessor>
</annotationProcessors> </annotationProcessors>
<excludes>
<exclude>**/de/jaschastarke/minecraft/limitedcreative/blockstate/worldedit/*</exclude>
</excludes>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
@ -196,6 +211,7 @@
<artifactSet> <artifactSet>
<includes> <includes>
<include>de.jaschastarke:plib</include> <include>de.jaschastarke:plib</include>
<include>org.mcstats.*:*</include>
</includes> </includes>
</artifactSet> </artifactSet>
<filters> <filters>
@ -207,6 +223,12 @@
</excludes> </excludes>
</filter> </filter>
</filters> </filters>
<relocations>
<relocation>
<pattern>org.mcstats</pattern>
<shadedPattern>de.jaschastarke.minecraft.limitedcreative.metrics</shadedPattern>
</relocation>
</relocations>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>

View file

@ -3,11 +3,10 @@ package de.jaschastarke.minecraft.limitedcreative;
import java.io.IOException; import java.io.IOException;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.mcstats.Metrics;
import de.jaschastarke.bukkit.lib.CoreModule; import de.jaschastarke.bukkit.lib.CoreModule;
import de.jaschastarke.bukkit.tools.stats.IStatistics; import de.jaschastarke.bukkit.tools.stats.IStatistics;
import de.jaschastarke.bukkit.tools.stats.MCStatsMetrics;
import de.jaschastarke.bukkit.tools.stats.MCStatsMetrics.Graph;
import de.jaschastarke.bukkit.tools.stats.PiwikStatistics; import de.jaschastarke.bukkit.tools.stats.PiwikStatistics;
import de.jaschastarke.modularize.IModule; import de.jaschastarke.modularize.IModule;
import de.jaschastarke.modularize.ModuleEntry; import de.jaschastarke.modularize.ModuleEntry;
@ -18,7 +17,7 @@ public class FeatureMetrics extends CoreModule<LimitedCreative> implements Liste
super(plugin); super(plugin);
} }
private IStatistics metric; private IStatistics metric;
private MCStatsMetrics mcstats = null; private Metrics mcstats = null;
@Override @Override
public void onEnable() { public void onEnable() {
@ -26,12 +25,12 @@ public class FeatureMetrics extends CoreModule<LimitedCreative> implements Liste
metric = new PiwikStatistics(plugin); metric = new PiwikStatistics(plugin);
if (mcstats == null) { if (mcstats == null) {
try { try {
mcstats = new MCStatsMetrics(plugin); mcstats = new Metrics(plugin);
Graph moduleGraph = mcstats.createGraph("Module Usage"); Metrics.Graph moduleGraph = mcstats.createGraph("Module Usage");
for (final ModuleEntry<IModule> mod : plugin.getModules()) { for (final ModuleEntry<IModule> mod : plugin.getModules()) {
if (mod.getModule() instanceof CoreModule<?>) { if (mod.getModule() instanceof CoreModule<?>) {
moduleGraph.addPlotter(new MCStatsMetrics.Plotter(((CoreModule<?>) mod.getModule()).getName()) { moduleGraph.addPlotter(new Metrics.Plotter(((CoreModule<?>) mod.getModule()).getName()) {
@Override @Override
public int getValue() { public int getValue() {
return mod.getState() == ModuleState.ENABLED ? 1 : 0; return mod.getState() == ModuleState.ENABLED ? 1 : 0;
@ -39,9 +38,9 @@ public class FeatureMetrics extends CoreModule<LimitedCreative> implements Liste
}); });
} }
} }
Graph depGraph = mcstats.createGraph("Dependencies"); Metrics.Graph depGraph = mcstats.createGraph("Dependencies");
for (final String dep : plugin.getDescription().getSoftDepend()) { for (final String dep : plugin.getDescription().getSoftDepend()) {
depGraph.addPlotter(new MCStatsMetrics.Plotter(dep) { depGraph.addPlotter(new Metrics.Plotter(dep) {
@Override @Override
public int getValue() { public int getValue() {
return plugin.getServer().getPluginManager().isPluginEnabled(dep) ? 1 : 0; return plugin.getServer().getPluginManager().isPluginEnabled(dep) ? 1 : 0;

View file

@ -17,7 +17,7 @@ import de.jaschastarke.minecraft.limitedcreative.blockstate.HangingListener;
import de.jaschastarke.minecraft.limitedcreative.blockstate.PlayerListener; import de.jaschastarke.minecraft.limitedcreative.blockstate.PlayerListener;
import de.jaschastarke.minecraft.limitedcreative.blockstate.SyncronizedModel; import de.jaschastarke.minecraft.limitedcreative.blockstate.SyncronizedModel;
import de.jaschastarke.minecraft.limitedcreative.blockstate.ThreadedModel; import de.jaschastarke.minecraft.limitedcreative.blockstate.ThreadedModel;
import de.jaschastarke.minecraft.limitedcreative.blockstate.worldedit.LCEditSessionFactory; //import de.jaschastarke.minecraft.limitedcreative.blockstate.worldedit.LCEditSessionFactory;
import de.jaschastarke.modularize.IModule; import de.jaschastarke.modularize.IModule;
import de.jaschastarke.modularize.ModuleEntry; import de.jaschastarke.modularize.ModuleEntry;
@ -77,11 +77,12 @@ public class ModBlockStates extends CoreModule<LimitedCreative> {
new BukkitRunnable() { new BukkitRunnable() {
@Override @Override
public void run() { public void run() {
try { getLog().warn("WorldEdit Integration is not Supported in this Version! Lookout for updates!");
/*try {
LCEditSessionFactory.initFactory(ModBlockStates.this); LCEditSessionFactory.initFactory(ModBlockStates.this);
} catch (Exception e) { } catch (Exception e) {
getLog().warn(plugin.getLocale().trans("block_state.warning.worldedit_sessionfactory_failed", e.getMessage())); getLog().warn(plugin.getLocale().trans("block_state.warning.worldedit_sessionfactory_failed", e.getMessage()));
} }*/
} }
}.runTaskLater(plugin, 1L); }.runTaskLater(plugin, 1L);
} }