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>
<url>http://repo.md-5.net/content/groups/public/</url>
</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>
<dependencies>
@ -128,6 +133,13 @@
<artifactId>coreprotect</artifactId>
<version>2.0.8</version>
</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>
<build>
@ -146,6 +158,9 @@
<!-- Needed to fetch DocComments from Source -->
<annotationProcessor>de.jaschastarke.maven.AnnotationProcessor</annotationProcessor>
</annotationProcessors>
<excludes>
<exclude>**/de/jaschastarke/minecraft/limitedcreative/blockstate/worldedit/*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
@ -196,6 +211,7 @@
<artifactSet>
<includes>
<include>de.jaschastarke:plib</include>
<include>org.mcstats.*:*</include>
</includes>
</artifactSet>
<filters>
@ -207,6 +223,12 @@
</excludes>
</filter>
</filters>
<relocations>
<relocation>
<pattern>org.mcstats</pattern>
<shadedPattern>de.jaschastarke.minecraft.limitedcreative.metrics</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>

View file

@ -3,11 +3,10 @@ package de.jaschastarke.minecraft.limitedcreative;
import java.io.IOException;
import org.bukkit.event.Listener;
import org.mcstats.Metrics;
import de.jaschastarke.bukkit.lib.CoreModule;
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.modularize.IModule;
import de.jaschastarke.modularize.ModuleEntry;
@ -18,7 +17,7 @@ public class FeatureMetrics extends CoreModule<LimitedCreative> implements Liste
super(plugin);
}
private IStatistics metric;
private MCStatsMetrics mcstats = null;
private Metrics mcstats = null;
@Override
public void onEnable() {
@ -26,12 +25,12 @@ public class FeatureMetrics extends CoreModule<LimitedCreative> implements Liste
metric = new PiwikStatistics(plugin);
if (mcstats == null) {
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()) {
if (mod.getModule() instanceof CoreModule<?>) {
moduleGraph.addPlotter(new MCStatsMetrics.Plotter(((CoreModule<?>) mod.getModule()).getName()) {
moduleGraph.addPlotter(new Metrics.Plotter(((CoreModule<?>) mod.getModule()).getName()) {
@Override
public int getValue() {
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()) {
depGraph.addPlotter(new MCStatsMetrics.Plotter(dep) {
depGraph.addPlotter(new Metrics.Plotter(dep) {
@Override
public int getValue() {
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.SyncronizedModel;
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.ModuleEntry;
@ -77,11 +77,12 @@ public class ModBlockStates extends CoreModule<LimitedCreative> {
new BukkitRunnable() {
@Override
public void run() {
try {
getLog().warn("WorldEdit Integration is not Supported in this Version! Lookout for updates!");
/*try {
LCEditSessionFactory.initFactory(ModBlockStates.this);
} catch (Exception e) {
getLog().warn(plugin.getLocale().trans("block_state.warning.worldedit_sessionfactory_failed", e.getMessage()));
}
}*/
}
}.runTaskLater(plugin, 1L);
}