mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Fix shading mess and make the plugin start
This commit is contained in:
parent
12def37194
commit
28d6d4db92
@ -98,13 +98,24 @@ task copyFiles {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def adventureVersion = '4.0.0-SNAPSHOT'
|
||||||
|
|
||||||
shadowJar {
|
shadowJar {
|
||||||
dependencies {
|
dependencies {
|
||||||
include(dependency(":PlotSquared-Core"))
|
include(dependency(":PlotSquared-Core"))
|
||||||
include(dependency("io.papermc:paperlib:1.0.4"))
|
include(dependency("io.papermc:paperlib:1.0.4"))
|
||||||
include(dependency("net.kyori:adventure-platform-bukkit:4.0.0-SNAPSHOT"))
|
include(dependency("net.kyori:adventure-platform-bukkit:${adventureVersion}"))
|
||||||
include(dependency("net.kyori:adventure-text-minimessage:3.0.0-SNAPSHOT"))
|
include(dependency("net.kyori:adventure-text-minimessage:3.0.0-SNAPSHOT"))
|
||||||
|
include(dependency("net.kyori:adventure-text-serializer-bungeecord:${adventureVersion}"))
|
||||||
|
include(dependency("net.kyori:adventure-text-serializer-legacy:${adventureVersion}"))
|
||||||
|
include(dependency("net.kyori:adventure-text-serializer-gson:${adventureVersion}"))
|
||||||
|
include(dependency("net.kyori:adventure-api:${adventureVersion}"))
|
||||||
|
include(dependency("net.kyori:adventure-platform-api:${adventureVersion}"))
|
||||||
|
include(dependency("net.kyori:adventure-platform-common:${adventureVersion}"))
|
||||||
|
include(dependency("net.kyori:adventure-platform-viaversion:${adventureVersion}"))
|
||||||
|
include(dependency("net.kyori:adventure-nbt:${adventureVersion}"))
|
||||||
|
include(dependency("net.kyori:examination-api:1.0.0-SNAPSHOT"))
|
||||||
|
include(dependency("net.kyori:examination-string:1.0.0-SNAPSHOT"))
|
||||||
include(dependency("org.bstats:bstats-bukkit:1.7"))
|
include(dependency("org.bstats:bstats-bukkit:1.7"))
|
||||||
include(dependency("org.khelekore:prtree:1.7.0-SNAPSHOT"))
|
include(dependency("org.khelekore:prtree:1.7.0-SNAPSHOT"))
|
||||||
include(dependency("com.sk89q:squirrelid:1.0.0-SNAPSHOT"))
|
include(dependency("com.sk89q:squirrelid:1.0.0-SNAPSHOT"))
|
||||||
@ -117,7 +128,7 @@ shadowJar {
|
|||||||
include(dependency('aopalliance:aopalliance:1.0'))
|
include(dependency('aopalliance:aopalliance:1.0'))
|
||||||
}
|
}
|
||||||
|
|
||||||
relocate('net.kyori.text', 'com.plotsquared.formatting.text')
|
relocate('net.kyori.adventure', 'com.plotsquared.core.configuration.adventure')
|
||||||
relocate("io.papermc.lib", "com.plotsquared.bukkit.paperlib")
|
relocate("io.papermc.lib", "com.plotsquared.bukkit.paperlib")
|
||||||
relocate("org.bstats", "com.plotsquared.metrics")
|
relocate("org.bstats", "com.plotsquared.metrics")
|
||||||
relocate('com.sk89q.squirrelid', 'com.plotsquared.squirrelid')
|
relocate('com.sk89q.squirrelid', 'com.plotsquared.squirrelid')
|
||||||
@ -125,6 +136,7 @@ shadowJar {
|
|||||||
relocate('org.apache.logging.slf4j', 'com.plotsquared.logging.apache')
|
relocate('org.apache.logging.slf4j', 'com.plotsquared.logging.apache')
|
||||||
relocate('org.slf4j', 'com.plotsquared.logging.slf4j')
|
relocate('org.slf4j', 'com.plotsquared.logging.slf4j')
|
||||||
relocate('com.google.inject', 'com.plotsquared.google')
|
relocate('com.google.inject', 'com.plotsquared.google')
|
||||||
|
relocate('javax.inject', 'com.plotsquared.core.inject.javax')
|
||||||
|
|
||||||
archiveFileName = "${project.name}-${parent.version}.jar"
|
archiveFileName = "${project.name}-${parent.version}.jar"
|
||||||
destinationDirectory = file "../target"
|
destinationDirectory = file "../target"
|
||||||
|
@ -29,6 +29,7 @@ import com.google.inject.Guice;
|
|||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import com.google.inject.Injector;
|
import com.google.inject.Injector;
|
||||||
import com.google.inject.Key;
|
import com.google.inject.Key;
|
||||||
|
import com.google.inject.Singleton;
|
||||||
import com.google.inject.Stage;
|
import com.google.inject.Stage;
|
||||||
import com.google.inject.TypeLiteral;
|
import com.google.inject.TypeLiteral;
|
||||||
import com.plotsquared.bukkit.generator.BukkitPlotGenerator;
|
import com.plotsquared.bukkit.generator.BukkitPlotGenerator;
|
||||||
@ -161,7 +162,7 @@ import static com.plotsquared.core.util.PremiumVerification.getResourceID;
|
|||||||
import static com.plotsquared.core.util.PremiumVerification.getUserID;
|
import static com.plotsquared.core.util.PremiumVerification.getUserID;
|
||||||
import static com.plotsquared.core.util.ReflectionUtils.getRefClass;
|
import static com.plotsquared.core.util.ReflectionUtils.getRefClass;
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused") @Singleton
|
||||||
public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPlatform<Player> {
|
public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPlatform<Player> {
|
||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger("P2/" + BukkitPlatform.class.getSimpleName());
|
private static final Logger logger = LoggerFactory.getLogger("P2/" + BukkitPlatform.class.getSimpleName());
|
||||||
|
@ -84,6 +84,7 @@ public class BukkitModule extends AbstractModule {
|
|||||||
bind(PlayerManager.class).to(BukkitPlayerManager.class);
|
bind(PlayerManager.class).to(BukkitPlayerManager.class);
|
||||||
bind(JavaPlugin.class).toInstance(bukkitPlatform);
|
bind(JavaPlugin.class).toInstance(bukkitPlatform);
|
||||||
bind(PlotPlatform.class).toInstance(bukkitPlatform);
|
bind(PlotPlatform.class).toInstance(bukkitPlatform);
|
||||||
|
bind(BukkitPlatform.class).toInstance(bukkitPlatform);
|
||||||
bind(IndependentPlotGenerator.class).annotatedWith(DefaultGenerator.class).to(HybridGen.class);
|
bind(IndependentPlotGenerator.class).annotatedWith(DefaultGenerator.class).to(HybridGen.class);
|
||||||
// Console actor
|
// Console actor
|
||||||
@Nonnull ConsoleCommandSender console = Bukkit.getServer().getConsoleSender();
|
@Nonnull ConsoleCommandSender console = Bukkit.getServer().getConsoleSender();
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.plotsquared.bukkit.listener;
|
package com.plotsquared.bukkit.listener;
|
||||||
|
|
||||||
|
import com.google.inject.Inject;
|
||||||
import com.plotsquared.bukkit.BukkitPlatform;
|
import com.plotsquared.bukkit.BukkitPlatform;
|
||||||
import com.plotsquared.bukkit.placeholder.MVdWPlaceholders;
|
import com.plotsquared.bukkit.placeholder.MVdWPlaceholders;
|
||||||
import com.plotsquared.core.PlotSquared;
|
import com.plotsquared.core.PlotSquared;
|
||||||
@ -35,11 +36,13 @@ import org.bukkit.event.EventHandler;
|
|||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.server.ServerLoadEvent;
|
import org.bukkit.event.server.ServerLoadEvent;
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
public class ServerListener implements Listener {
|
public class ServerListener implements Listener {
|
||||||
|
|
||||||
private final BukkitPlatform plugin;
|
private final BukkitPlatform plugin;
|
||||||
|
|
||||||
public ServerListener(BukkitPlatform plugin) {
|
@Inject public ServerListener(@Nonnull final BukkitPlatform plugin) {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user