Resolved compile errors, LB removed

LogBlock support removed
This commit is contained in:
Norbi Peti 2018-06-26 21:28:36 +02:00
parent 47fb0e137a
commit f2af77b9b7
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56
6 changed files with 33 additions and 22 deletions

21
pom.xml
View file

@ -8,7 +8,7 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <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> <bukkit.version>1.7.2-R0.1-SNAPSHOT</bukkit.version>
</properties> </properties>
@ -43,8 +43,8 @@
<!-- Official (Craft-)Bukkit repository --> <!-- Official (Craft-)Bukkit repository -->
<repository> <repository>
<id>bukkit-repo</id> <id>spigot-repo</id>
<url>http://repo.bukkit.org/content/groups/public</url> <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository> </repository>
<!-- Official WorldGuard and WorldEdit repository --> <!-- Official WorldGuard and WorldEdit repository -->
<repository> <repository>
@ -68,6 +68,13 @@
</repository> </repository>
</repositories> </repositories>
<pluginRepositories>
<pluginRepository>
<id>de-jas-rep</id>
<url>http://repo.ja-s.de/mvn</url>
</pluginRepository>
</pluginRepositories>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>de.jaschastarke</groupId> <groupId>de.jaschastarke</groupId>
@ -84,7 +91,7 @@
<!-- http://dev.bukkit.org/server-mods/worldguard/ --> <!-- http://dev.bukkit.org/server-mods/worldguard/ -->
<groupId>com.sk89q</groupId> <groupId>com.sk89q</groupId>
<artifactId>worldguard</artifactId> <artifactId>worldguard</artifactId>
<version>5.8-SNAPSHOT</version> <version>6.1</version>
</dependency> </dependency>
<dependency> <dependency>
<!-- http://dev.bukkit.org/server-mods/authme-reloaded/ --> <!-- http://dev.bukkit.org/server-mods/authme-reloaded/ -->
@ -128,6 +135,12 @@
<artifactId>coreprotect</artifactId> <artifactId>coreprotect</artifactId>
<version>2.0.8</version> <version>2.0.8</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/org.mcstats/metrics -->
<dependency>
<groupId>org.mcstats</groupId>
<artifactId>metrics</artifactId>
<version>R6</version>
</dependency>
</dependencies> </dependencies>
<build> <build>

View file

@ -6,19 +6,18 @@ import org.bukkit.event.Listener;
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;
import de.jaschastarke.modularize.ModuleEntry.ModuleState; import de.jaschastarke.modularize.ModuleEntry.ModuleState;
import org.mcstats.Metrics;
public class FeatureMetrics extends CoreModule<LimitedCreative> implements Listener { public class FeatureMetrics extends CoreModule<LimitedCreative> implements Listener {
public FeatureMetrics(LimitedCreative plugin) { public FeatureMetrics(LimitedCreative plugin) {
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

@ -223,7 +223,7 @@ public class BlockStateCommand extends BukkitCommand implements IHelpDescribed {
return false; 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")); context.responseFormatted(ChatFormattings.ERROR, L("command.blockstate.migrate_useronline_error"));
return true; return true;
} }

View file

@ -10,11 +10,10 @@ import com.sk89q.worldedit.patterns.Pattern;
import com.sk89q.worldedit.regions.Region; import com.sk89q.worldedit.regions.Region;
import de.diddiz.LogBlock.LogBlock; import de.diddiz.LogBlock.LogBlock;
import de.diddiz.worldedit.LogBlockEditSession;
import de.jaschastarke.minecraft.limitedcreative.blockstate.DBModel.DBTransaction; import de.jaschastarke.minecraft.limitedcreative.blockstate.DBModel.DBTransaction;
public class LCEditSession_LogBlock extends LogBlockEditSession { public class LCEditSession_LogBlock { //The superclass got deleted at: https://github.com/LogBlock/LogBlock/commit/fa1e1b777a9da062d10d7c3c1906520e4d39eba8
private LCEditSessionFactory factory; /* private LCEditSessionFactory factory;
private LocalPlayer player; private LocalPlayer player;
public LCEditSession_LogBlock(LCEditSessionFactory factory, LocalWorld world, int maxBlocks, BlockBag blockBag, 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; return success;
} }*/
} }

View file

@ -224,8 +224,8 @@ public class PlayerListener implements Listener {
EntityDamageByEntityEvent event = (EntityDamageByEntityEvent) rawevent; EntityDamageByEntityEvent event = (EntityDamageByEntityEvent) rawevent;
Entity source = event.getDamager(); Entity source = event.getDamager();
if (source instanceof Projectile) if (source instanceof Projectile && ((Projectile) source).getShooter() instanceof Entity)
source = ((Projectile) source).getShooter(); source = (Entity) ((Projectile) source).getShooter();
if (source instanceof Player) { if (source instanceof Player) {
Player player = (Player) source; Player player = (Player) source;

View file

@ -238,12 +238,12 @@ public class RegionsCommand extends BukkitCommand implements IHelpDescribed {
ProtectedRegion region = null; ProtectedRegion region = null;
if (params.getArgumentCount() == 0 && context.isPlayer()) { 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()); ApplicableRegionSet set = mgr.getApplicableRegions(context.getPlayer().getLocation());
if (set.size() > 0) { if (set.size() > 0) {
region = set.iterator().next(); region = set.iterator().next();
} else { } else {
region = getWorldGuard().getGlobalRegionManager().get(w).getRegionExact(GLOBAL_REGION); region = getWorldGuard().getRegionManager(w).getRegion(GLOBAL_REGION);
} }
} else { } else {
int rpc = params.getArgumentCount() > 1 ? 1 : 0; int rpc = params.getArgumentCount() > 1 ? 1 : 0;