Skip to content

Commit

Permalink
Make it compile for Bukkit/Paper 1.20.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Boerman committed Feb 12, 2024
1 parent e517a8e commit 1ef7a5f
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 6 deletions.
2 changes: 1 addition & 1 deletion JavaExample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20.2-R0.1-SNAPSHOT</version>
<version>1.20.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion Scala2Example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20.2-R0.1-SNAPSHOT</version>
<version>1.20.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion Scala3Example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20.2-R0.1-SNAPSHOT</version>
<version>1.20.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

Expand Down
2 changes: 1 addition & 1 deletion ScalaLoader-Bukkit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<bukkit.version>1.20.2-R0.1-SNAPSHOT</bukkit.version>
<bukkit.version>1.20.4-R0.1-SNAPSHOT</bukkit.version>

<mavenResolverVersion>1.6.2</mavenResolverVersion>
<mavenResolverProviderVersion>3.8.1</mavenResolverProviderVersion>
Expand Down
2 changes: 1 addition & 1 deletion ScalaLoader-Common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<artifactId>ScalaLoader-Common</artifactId>

<properties>
<bukkitVersion>1.20.2-R0.1-SNAPSHOT</bukkitVersion>
<bukkitVersion>1.20.4-R0.1-SNAPSHOT</bukkitVersion>
<asmVersion>9.6</asmVersion>
<bstatsVersion>3.0.0</bstatsVersion>
<junitVersion>5.7.1</junitVersion>
Expand Down
2 changes: 1 addition & 1 deletion ScalaLoader-Paper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<paper.version>1.20.2-R0.1-SNAPSHOT</paper.version>
<paper.version>1.20.4-R0.1-SNAPSHOT</paper.version>

<!-- paper server dependencies -->
<mavenResolverVersion>1.7.3</mavenResolverVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,37 @@
package xyz.janboerman.scalaloader.paper.plugin;

import io.papermc.paper.plugin.bootstrap.BootstrapContext;
import io.papermc.paper.plugin.configuration.PluginMeta;
import io.papermc.paper.plugin.lifecycle.event.LifecycleEventManager;
import io.papermc.paper.plugin.lifecycle.event.handler.configuration.LifecycleEventHandlerConfiguration;
import xyz.janboerman.scalaloader.plugin.ScalaPluginDescription;

import java.io.File;

import org.jetbrains.annotations.NotNull;

public class ScalaPluginBootstrapContext extends ScalaPluginProviderContext implements BootstrapContext {

private final LifecycleEventManager<BootstrapContext> lifecycleEventManager = new LifecycleEventManager<BootstrapContext>() {
@Override
public void registerEventHandler(
@NotNull LifecycleEventHandlerConfiguration<? super BootstrapContext> handlerConfiguration) {
//TODO this is currently not called. when should this be called? should it be called at all?
}
};


public ScalaPluginBootstrapContext(File pluginJarFile, ScalaPluginDescription description) {
super(pluginJarFile, description);
}

@Override
public @NotNull LifecycleEventManager<BootstrapContext> getLifecycleManager() {
return lifecycleEventManager;
}

@Override
public @NotNull PluginMeta getPluginMeta() {
return getConfiguration();
}
}

0 comments on commit 1ef7a5f

Please sign in to comment.