Skip to content

Commit c8af2d1

Browse files
committed
More spell library changes
1 parent 4a4064d commit c8af2d1

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--- a/net/minecraft/server/dedicated/DedicatedServer.java
2+
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
3+
@@ -19,6 +_,7 @@
4+
import java.util.Locale;
5+
import java.util.Optional;
6+
import javax.annotation.Nullable;
7+
+import de.erethon.spellbook.api.SpellbookAPI;
8+
import net.minecraft.DefaultUncaughtExceptionHandler;
9+
import net.minecraft.DefaultUncaughtExceptionHandlerWithName;
10+
import net.minecraft.SharedConstants;
11+
@@ -235,6 +_,9 @@
12+
this.server.loadPlugins();
13+
this.server.enablePlugins(org.bukkit.plugin.PluginLoadOrder.STARTUP);
14+
// CraftBukkit end
15+
+ // Papyrus start
16+
+ server.setSpellbookAPI(new SpellbookAPI(server));
17+
+ // Papyrus end
18+
19+
// Paper start - Add Velocity IP Forwarding Support
20+
boolean usingProxy = org.spigotmc.SpigotConfig.bungee || io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled;

papyrus-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/CraftServer.java.patch

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,25 @@
1313
// Paper end - Folia reagion threading API
1414

1515
+ // Papyrus start
16-
+ private final SpellbookAPI spellbookAPI;
16+
+ private SpellbookAPI spellbookAPI;
1717
+ // Papyrus end
1818
+
1919
static {
2020
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
2121
ConfigurationSerialization.registerClass(CraftPlayerProfile.class);
22-
@@ -496,6 +_,12 @@
22+
@@ -496,6 +_,15 @@
2323
this.potionBrewer = new io.papermc.paper.potion.PaperPotionBrewer(console); // Paper - custom potion mixes
2424
datapackManager = new io.papermc.paper.datapack.PaperDatapackManager(console.getPackRepository()); // Paper
2525
this.spark = new io.papermc.paper.SparksFly(this); // Paper - spark
26-
+ spellbookAPI = new SpellbookAPI(this); // Papyrus - Spellbook API
2726
+ }
2827
+
2928
+ @Override
3029
+ public SpellbookAPI getSpellbookAPI() {
3130
+ return spellbookAPI;
31+
+ }
32+
+
33+
+ public void setSpellbookAPI(SpellbookAPI api) {
34+
+ this.spellbookAPI = api;
3235
}
3336

3437
public boolean getCommandBlockOverride(String command) {

0 commit comments

Comments
 (0)