This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lombok.AccessLevel; | |
import lombok.NoArgsConstructor; | |
/** | |
* Utilities for falling back from paper | |
*/ | |
@NoArgsConstructor(access = AccessLevel.PRIVATE) | |
public final class PaperUtils { | |
public static final boolean IS_RUNNING_PAPER; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* NMS Registry | |
*/ | |
@NoArgsConstructor(access = AccessLevel.PRIVATE) | |
public class NmsRegistry { | |
private static Class<?> blockClass; | |
private static Method getStateMethod; | |
private static Method getIdMethod; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Wrapper for a multi-block packet | |
*/ | |
public class MultiBlockPacket { | |
private static final ProtocolManager PROTOCOL_MANAGER = ProtocolLibrary.getProtocolManager(); | |
private static final boolean IS_AFTER_1_16_2 = ServerVersion.isGreaterThan(1, 16, 2); | |
private final PacketContainer packet = new PacketContainer(PacketType.Play.Server.MULTI_BLOCK_CHANGE); | |
private final Map<Location, WrappedBlockData> blocks = new LinkedHashMap<>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ml.empee.templateplugin.utils.helpers.world; | |
import lombok.Getter; | |
import lombok.RequiredArgsConstructor; | |
import lombok.SneakyThrows; | |
import ml.empee.templateplugin.utils.PaperUtils; | |
import net.minecraft.nbt.CompoundTag; | |
import org.bukkit.Location; | |
import org.bukkit.block.TileState; | |
import org.bukkit.block.data.BlockData; |