From 2733597c728441d3fc4bbe573f970a06218494d4 Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Sun, 11 Jun 2023 01:04:02 -0500 Subject: [PATCH] Refactor API (1.18.2) (#97) * Refactor API * just doing it manually bc fuck this * gigachad --- patches/api/0001-Add-MasterBlockFireEvent.patch | 8 ++++---- patches/api/0002-Add-spectator-teleport-event.patch | 8 ++++---- .../api/0004-Add-command-block-player-edit-event.patch | 5 ++--- patches/server/0032-Add-MasterBlockFireEvent.patch | 6 +++--- patches/server/0033-Add-spectator-teleport-event.patch | 2 +- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/patches/api/0001-Add-MasterBlockFireEvent.patch b/patches/api/0001-Add-MasterBlockFireEvent.patch index 0c1a72b..92967a5 100644 --- a/patches/api/0001-Add-MasterBlockFireEvent.patch +++ b/patches/api/0001-Add-MasterBlockFireEvent.patch @@ -4,13 +4,13 @@ Date: Mon, 4 Jul 2022 16:44:35 +0100 Subject: [PATCH] Add MasterBlockFireEvent -diff --git a/src/main/java/com/github/atlasmediagroup/scissors/event/block/MasterBlockFireEvent.java b/src/main/java/com/github/atlasmediagroup/scissors/event/block/MasterBlockFireEvent.java +diff --git a/src/main/java/me/totalfreedom/scissors/event/block/MasterBlockFireEvent.java b/src/main/java/me/totalfreedom/scissors/event/block/MasterBlockFireEvent.java new file mode 100644 -index 0000000000000000000000000000000000000000..a24cb52a5af62012c5d5acc29e4c3558e92ae572 +index 0000000000000000000000000000000000000000..812e6ae9f1c8eb9558e5109c522d3ce3a7deb35c --- /dev/null -+++ b/src/main/java/com/github/atlasmediagroup/scissors/event/block/MasterBlockFireEvent.java ++++ b/src/main/java/me/totalfreedom/scissors/event/block/MasterBlockFireEvent.java @@ -0,0 +1,51 @@ -+package com.github.atlasmediagroup.scissors.event.block; ++package me.totalfreedom.scissors.event.block; + +import org.bukkit.Location; +import org.bukkit.event.Cancellable; diff --git a/patches/api/0002-Add-spectator-teleport-event.patch b/patches/api/0002-Add-spectator-teleport-event.patch index 926b9ab..2cbf4f6 100644 --- a/patches/api/0002-Add-spectator-teleport-event.patch +++ b/patches/api/0002-Add-spectator-teleport-event.patch @@ -4,13 +4,13 @@ Date: Tue, 5 Jul 2022 03:59:18 +0100 Subject: [PATCH] Add spectator teleport event -diff --git a/src/main/java/com/github/atlasmediagroup/scissors/event/player/SpectatorTeleportEvent.java b/src/main/java/com/github/atlasmediagroup/scissors/event/player/SpectatorTeleportEvent.java +diff --git a/src/main/java/me/totalfreedom/scissors/event/player/SpectatorTeleportEvent.java b/src/main/java/me/totalfreedom/scissors/event/player/SpectatorTeleportEvent.java new file mode 100644 -index 0000000000000000000000000000000000000000..504f02ac89ea0ed3569cbc4ff67292041c9f408e +index 0000000000000000000000000000000000000000..e4c9256c78f8b395aea86e9ea1a112f8e7426c1f --- /dev/null -+++ b/src/main/java/com/github/atlasmediagroup/scissors/event/player/SpectatorTeleportEvent.java ++++ b/src/main/java/me/totalfreedom/scissors/event/player/SpectatorTeleportEvent.java @@ -0,0 +1,60 @@ -+package com.github.atlasmediagroup.scissors.event.player; ++package me.totalfreedom.scissors.event.player; + +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; diff --git a/patches/api/0004-Add-command-block-player-edit-event.patch b/patches/api/0004-Add-command-block-player-edit-event.patch index 67ebd55..740a906 100644 --- a/patches/api/0004-Add-command-block-player-edit-event.patch +++ b/patches/api/0004-Add-command-block-player-edit-event.patch @@ -89,13 +89,12 @@ index 0000000000000000000000000000000000000000..722f5839600954998cbbf799e68477d4 +} diff --git a/src/main/java/me/totalfreedom/scissors/event/block/CommandMinecartPlayerEditEvent.java b/src/main/java/me/totalfreedom/scissors/event/block/CommandMinecartPlayerEditEvent.java new file mode 100644 -index 0000000000000000000000000000000000000000..4282f24deb87e52ee19a13b172ec80c6a6017e28 +index 0000000000000000000000000000000000000000..4248563a590c76dc0d211fec99f6c98becf42b57 --- /dev/null +++ b/src/main/java/me/totalfreedom/scissors/event/block/CommandMinecartPlayerEditEvent.java -@@ -0,0 +1,78 @@ +@@ -0,0 +1,77 @@ +package me.totalfreedom.scissors.event.block; + -+import org.bukkit.block.CommandBlock; +import org.bukkit.entity.Player; +import org.bukkit.entity.minecart.CommandMinecart; +import org.bukkit.event.Cancellable; diff --git a/patches/server/0032-Add-MasterBlockFireEvent.patch b/patches/server/0032-Add-MasterBlockFireEvent.patch index 8111740..10a7417 100644 --- a/patches/server/0032-Add-MasterBlockFireEvent.patch +++ b/patches/server/0032-Add-MasterBlockFireEvent.patch @@ -13,7 +13,7 @@ index 1a48c5ea1f2f755abfa85469e26f37ea5f02d6da..d6ed6b04792c4766ed5111fb83d52b76 import com.mojang.logging.LogUtils; -import java.util.Random; -+import com.github.atlasmediagroup.scissors.event.block.MasterBlockFireEvent; ++import me.totalfreedom.scissors.event.block.MasterBlockFireEvent; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.server.level.ServerLevel; @@ -53,7 +53,7 @@ index 4bed3a1f353ada478c93e3e6f94aa7ea9d228730..02a9c902a2ec8994ebc8c639864aa0d2 @@ -1,5 +1,6 @@ package net.minecraft.world.level.block.entity; -+import com.github.atlasmediagroup.scissors.event.block.MasterBlockFireEvent; ++import me.totalfreedom.scissors.event.block.MasterBlockFireEvent; import com.google.common.collect.Lists; import java.util.Arrays; import java.util.List; @@ -97,7 +97,7 @@ index 9a65ed7e5ed76a320c8602b0a4edeff6615d9e0b..e46727ee13550d4ab5473dc5ac28abdd import java.util.stream.Stream; import javax.annotation.Nullable; + -+import com.github.atlasmediagroup.scissors.event.block.MasterBlockFireEvent; ++import me.totalfreedom.scissors.event.block.MasterBlockFireEvent; import net.minecraft.ResourceLocationException; import net.minecraft.Util; import net.minecraft.core.BlockPos; diff --git a/patches/server/0033-Add-spectator-teleport-event.patch b/patches/server/0033-Add-spectator-teleport-event.patch index d251834..2e3f881 100644 --- a/patches/server/0033-Add-spectator-teleport-event.patch +++ b/patches/server/0033-Add-spectator-teleport-event.patch @@ -11,7 +11,7 @@ index 64c438459f150af1cabdd3cea29c2951d42d69a0..b0bd0412010320cc624535d6abffe417 @@ -1,5 +1,6 @@ package net.minecraft.server.network; -+import com.github.atlasmediagroup.scissors.event.player.SpectatorTeleportEvent; ++import me.totalfreedom.scissors.event.player.SpectatorTeleportEvent; import com.google.common.collect.Lists; import com.google.common.primitives.Floats; import com.mojang.brigadier.ParseResults;