3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-27 08:30:09 +01:00

Don't use Paper block placement patch in 1.12.

Apparently the bug that caused the block placement issues with Paper was fixed in 1.12 (according to Aikar from its development team). So, with this commit the patch to fix it won't run if the server is running Paper 1.12 or higher (which means it will only be used in 1.11.2 and lower server versions).
Dieser Commit ist enthalten in:
Logics4 2018-07-20 16:05:10 +01:00
Ursprung fdc4d2c5d2
Commit 4fe68c2c93

Datei anzeigen

@ -11,6 +11,8 @@ import us.myles.ViaVersion.api.Via;
import us.myles.ViaVersion.api.data.UserConnection; import us.myles.ViaVersion.api.data.UserConnection;
import us.myles.ViaVersion.api.minecraft.item.Item; import us.myles.ViaVersion.api.minecraft.item.Item;
import us.myles.ViaVersion.api.platform.ViaPlatformLoader; import us.myles.ViaVersion.api.platform.ViaPlatformLoader;
import us.myles.ViaVersion.api.protocol.ProtocolRegistry;
import us.myles.ViaVersion.api.protocol.ProtocolVersion;
import us.myles.ViaVersion.bukkit.listeners.UpdateListener; import us.myles.ViaVersion.bukkit.listeners.UpdateListener;
import us.myles.ViaVersion.bukkit.listeners.protocol1_9to1_8.*; import us.myles.ViaVersion.bukkit.listeners.protocol1_9to1_8.*;
import us.myles.ViaVersion.bukkit.providers.BukkitInventoryQuickMoveProvider; import us.myles.ViaVersion.bukkit.providers.BukkitInventoryQuickMoveProvider;
@ -68,10 +70,11 @@ public class BukkitViaLoader implements ViaPlatformLoader {
storeListener(new DeathListener(plugin)).register(); storeListener(new DeathListener(plugin)).register();
storeListener(new BlockListener(plugin)).register(); storeListener(new BlockListener(plugin)).register();
if (Bukkit.getVersion().toLowerCase().contains("paper") if ((Bukkit.getVersion().toLowerCase().contains("paper")
|| Bukkit.getVersion().toLowerCase().contains("taco") || Bukkit.getVersion().toLowerCase().contains("taco")
|| Bukkit.getVersion().toLowerCase().contains("torch")) { || Bukkit.getVersion().toLowerCase().contains("torch"))
plugin.getLogger().info("Enabling PaperSpigot/TacoSpigot/Torch patch: Fixes block placement."); && ProtocolRegistry.SERVER_PROTOCOL < ProtocolVersion.v1_12.getId()) {
plugin.getLogger().info("Enabling Paper/TacoSpigot/Torch patch: Fixes block placement.");
storeListener(new PaperPatch(plugin)).register(); storeListener(new PaperPatch(plugin)).register();
} }
if (plugin.getConf().isItemCache()) { if (plugin.getConf().isItemCache()) {