Resolved compile errors, LB removed
LogBlock support removed
This commit is contained in:
parent
47fb0e137a
commit
f2af77b9b7
6 changed files with 33 additions and 22 deletions
21
pom.xml
21
pom.xml
|
@ -8,7 +8,7 @@
|
|||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<plib.version>1.4-SNAPSHOT</plib.version>
|
||||
<plib.version>1.7.0</plib.version>
|
||||
<bukkit.version>1.7.2-R0.1-SNAPSHOT</bukkit.version>
|
||||
</properties>
|
||||
|
||||
|
@ -43,8 +43,8 @@
|
|||
|
||||
<!-- Official (Craft-)Bukkit repository -->
|
||||
<repository>
|
||||
<id>bukkit-repo</id>
|
||||
<url>http://repo.bukkit.org/content/groups/public</url>
|
||||
<id>spigot-repo</id>
|
||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||
</repository>
|
||||
<!-- Official WorldGuard and WorldEdit repository -->
|
||||
<repository>
|
||||
|
@ -68,6 +68,13 @@
|
|||
</repository>
|
||||
</repositories>
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>de-jas-rep</id>
|
||||
<url>http://repo.ja-s.de/mvn</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>de.jaschastarke</groupId>
|
||||
|
@ -84,7 +91,7 @@
|
|||
<!-- http://dev.bukkit.org/server-mods/worldguard/ -->
|
||||
<groupId>com.sk89q</groupId>
|
||||
<artifactId>worldguard</artifactId>
|
||||
<version>5.8-SNAPSHOT</version>
|
||||
<version>6.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<!-- http://dev.bukkit.org/server-mods/authme-reloaded/ -->
|
||||
|
@ -128,6 +135,12 @@
|
|||
<artifactId>coreprotect</artifactId>
|
||||
<version>2.0.8</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.mcstats/metrics -->
|
||||
<dependency>
|
||||
<groupId>org.mcstats</groupId>
|
||||
<artifactId>metrics</artifactId>
|
||||
<version>R6</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -6,19 +6,18 @@ import org.bukkit.event.Listener;
|
|||
|
||||
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;
|
||||
import de.jaschastarke.modularize.ModuleEntry.ModuleState;
|
||||
import org.mcstats.Metrics;
|
||||
|
||||
public class FeatureMetrics extends CoreModule<LimitedCreative> implements Listener {
|
||||
public FeatureMetrics(LimitedCreative plugin) {
|
||||
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;
|
||||
|
|
|
@ -223,7 +223,7 @@ public class BlockStateCommand extends BukkitCommand implements IHelpDescribed {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (Bukkit.getServer().getOnlinePlayers().length > (context.isPlayer() ? 1 : 0)) {
|
||||
if (Bukkit.getServer().getOnlinePlayers().size() > (context.isPlayer() ? 1 : 0)) {
|
||||
context.responseFormatted(ChatFormattings.ERROR, L("command.blockstate.migrate_useronline_error"));
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -10,11 +10,10 @@ import com.sk89q.worldedit.patterns.Pattern;
|
|||
import com.sk89q.worldedit.regions.Region;
|
||||
|
||||
import de.diddiz.LogBlock.LogBlock;
|
||||
import de.diddiz.worldedit.LogBlockEditSession;
|
||||
import de.jaschastarke.minecraft.limitedcreative.blockstate.DBModel.DBTransaction;
|
||||
|
||||
public class LCEditSession_LogBlock extends LogBlockEditSession {
|
||||
private LCEditSessionFactory factory;
|
||||
public class LCEditSession_LogBlock { //The superclass got deleted at: https://github.com/LogBlock/LogBlock/commit/fa1e1b777a9da062d10d7c3c1906520e4d39eba8
|
||||
/* private LCEditSessionFactory factory;
|
||||
private LocalPlayer player;
|
||||
|
||||
public LCEditSession_LogBlock(LCEditSessionFactory factory, LocalWorld world, int maxBlocks, BlockBag blockBag, LocalPlayer player) {
|
||||
|
@ -94,5 +93,5 @@ public class LCEditSession_LogBlock extends LogBlockEditSession {
|
|||
}
|
||||
}
|
||||
return success;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
|
|
@ -224,8 +224,8 @@ public class PlayerListener implements Listener {
|
|||
EntityDamageByEntityEvent event = (EntityDamageByEntityEvent) rawevent;
|
||||
|
||||
Entity source = event.getDamager();
|
||||
if (source instanceof Projectile)
|
||||
source = ((Projectile) source).getShooter();
|
||||
if (source instanceof Projectile && ((Projectile) source).getShooter() instanceof Entity)
|
||||
source = (Entity) ((Projectile) source).getShooter();
|
||||
|
||||
if (source instanceof Player) {
|
||||
Player player = (Player) source;
|
||||
|
|
|
@ -238,12 +238,12 @@ public class RegionsCommand extends BukkitCommand implements IHelpDescribed {
|
|||
|
||||
ProtectedRegion region = null;
|
||||
if (params.getArgumentCount() == 0 && context.isPlayer()) {
|
||||
RegionManager mgr = getWorldGuard().getGlobalRegionManager().get(context.getPlayer().getWorld());
|
||||
RegionManager mgr = getWorldGuard().getRegionManager(context.getPlayer().getWorld());
|
||||
ApplicableRegionSet set = mgr.getApplicableRegions(context.getPlayer().getLocation());
|
||||
if (set.size() > 0) {
|
||||
region = set.iterator().next();
|
||||
} else {
|
||||
region = getWorldGuard().getGlobalRegionManager().get(w).getRegionExact(GLOBAL_REGION);
|
||||
region = getWorldGuard().getRegionManager(w).getRegion(GLOBAL_REGION);
|
||||
}
|
||||
} else {
|
||||
int rpc = params.getArgumentCount() > 1 ? 1 : 0;
|
||||
|
|
Loading…
Reference in a new issue