mirror of
https://github.com/TotalFreedomMC/OpenInv.git
synced 2024-12-23 00:15:08 +00:00
Add support for 1.16.4, drop 1.16.1
This commit is contained in:
parent
00113cc4d4
commit
3fee84fc58
7 changed files with 100 additions and 122 deletions
|
@ -35,8 +35,8 @@
|
||||||
<modules>
|
<modules>
|
||||||
<module>v1_8_R3</module>
|
<module>v1_8_R3</module>
|
||||||
<module>v1_15_R1</module>
|
<module>v1_15_R1</module>
|
||||||
<module>v1_16_R1</module>
|
|
||||||
<module>v1_16_R2</module>
|
<module>v1_16_R2</module>
|
||||||
|
<module>v1_16_R3</module>
|
||||||
</modules>
|
</modules>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
|
|
|
@ -25,14 +25,14 @@
|
||||||
<version>4.1.5-SNAPSHOT</version>
|
<version>4.1.5-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>openinvadapter1_16_R1</artifactId>
|
<artifactId>openinvadapter1_16_R3</artifactId>
|
||||||
<name>OpenInvAdapter1_16_R1</name>
|
<name>OpenInvAdapter1_16_R3</name>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spigotmc</groupId>
|
<groupId>org.spigotmc</groupId>
|
||||||
<artifactId>spigot</artifactId>
|
<artifactId>spigot</artifactId>
|
||||||
<version>1.16.1-R0.1-SNAPSHOT</version>
|
<version>1.16.4-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
|
@ -14,39 +14,38 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.lishid.openinv.internal.v1_16_R1;
|
package com.lishid.openinv.internal.v1_16_R3;
|
||||||
|
|
||||||
import com.lishid.openinv.OpenInv;
|
import com.lishid.openinv.OpenInv;
|
||||||
import com.lishid.openinv.internal.IAnySilentContainer;
|
import com.lishid.openinv.internal.IAnySilentContainer;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import net.minecraft.server.v1_16_R1.Block;
|
import net.minecraft.server.v1_16_R3.Block;
|
||||||
import net.minecraft.server.v1_16_R1.BlockBarrel;
|
import net.minecraft.server.v1_16_R3.BlockBarrel;
|
||||||
import net.minecraft.server.v1_16_R1.BlockChest;
|
import net.minecraft.server.v1_16_R3.BlockChest;
|
||||||
import net.minecraft.server.v1_16_R1.BlockChestTrapped;
|
import net.minecraft.server.v1_16_R3.BlockChestTrapped;
|
||||||
import net.minecraft.server.v1_16_R1.BlockEnderChest;
|
import net.minecraft.server.v1_16_R3.BlockPosition;
|
||||||
import net.minecraft.server.v1_16_R1.BlockPosition;
|
import net.minecraft.server.v1_16_R3.BlockPropertyChestType;
|
||||||
import net.minecraft.server.v1_16_R1.BlockPropertyChestType;
|
import net.minecraft.server.v1_16_R3.BlockShulkerBox;
|
||||||
import net.minecraft.server.v1_16_R1.BlockShulkerBox;
|
import net.minecraft.server.v1_16_R3.ChatMessage;
|
||||||
import net.minecraft.server.v1_16_R1.ChatMessage;
|
import net.minecraft.server.v1_16_R3.Container;
|
||||||
import net.minecraft.server.v1_16_R1.Container;
|
import net.minecraft.server.v1_16_R3.ContainerChest;
|
||||||
import net.minecraft.server.v1_16_R1.ContainerChest;
|
import net.minecraft.server.v1_16_R3.Containers;
|
||||||
import net.minecraft.server.v1_16_R1.Containers;
|
import net.minecraft.server.v1_16_R3.EntityHuman;
|
||||||
import net.minecraft.server.v1_16_R1.EntityHuman;
|
import net.minecraft.server.v1_16_R3.EntityPlayer;
|
||||||
import net.minecraft.server.v1_16_R1.EntityPlayer;
|
import net.minecraft.server.v1_16_R3.EnumGamemode;
|
||||||
import net.minecraft.server.v1_16_R1.EnumGamemode;
|
import net.minecraft.server.v1_16_R3.IBlockData;
|
||||||
import net.minecraft.server.v1_16_R1.IBlockData;
|
import net.minecraft.server.v1_16_R3.IChatBaseComponent;
|
||||||
import net.minecraft.server.v1_16_R1.IChatBaseComponent;
|
import net.minecraft.server.v1_16_R3.ITileInventory;
|
||||||
import net.minecraft.server.v1_16_R1.ITileInventory;
|
import net.minecraft.server.v1_16_R3.InventoryEnderChest;
|
||||||
import net.minecraft.server.v1_16_R1.InventoryEnderChest;
|
import net.minecraft.server.v1_16_R3.InventoryLargeChest;
|
||||||
import net.minecraft.server.v1_16_R1.InventoryLargeChest;
|
import net.minecraft.server.v1_16_R3.PlayerInteractManager;
|
||||||
import net.minecraft.server.v1_16_R1.PlayerInteractManager;
|
import net.minecraft.server.v1_16_R3.PlayerInventory;
|
||||||
import net.minecraft.server.v1_16_R1.PlayerInventory;
|
import net.minecraft.server.v1_16_R3.TileEntity;
|
||||||
import net.minecraft.server.v1_16_R1.TileEntity;
|
import net.minecraft.server.v1_16_R3.TileEntityChest;
|
||||||
import net.minecraft.server.v1_16_R1.TileEntityChest;
|
import net.minecraft.server.v1_16_R3.TileEntityEnderChest;
|
||||||
import net.minecraft.server.v1_16_R1.TileEntityEnderChest;
|
import net.minecraft.server.v1_16_R3.TileEntityLootable;
|
||||||
import net.minecraft.server.v1_16_R1.TileEntityLootable;
|
import net.minecraft.server.v1_16_R3.TileInventory;
|
||||||
import net.minecraft.server.v1_16_R1.TileInventory;
|
import net.minecraft.server.v1_16_R3.World;
|
||||||
import net.minecraft.server.v1_16_R1.World;
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Statistic;
|
import org.bukkit.Statistic;
|
||||||
import org.bukkit.block.Barrel;
|
import org.bukkit.block.Barrel;
|
||||||
|
@ -215,7 +214,7 @@ public class AnySilentContainer implements IAnySilentContainer {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return new ContainerChest(containers, containerCounter, playerInventory, enderChest, rows);
|
return new ContainerChest(containers, containerCounter, playerInventory, enderChest, rows);
|
||||||
}, BlockEnderChest.e));
|
}, new ChatMessage("container.enderchest")));
|
||||||
bukkitPlayer.incrementStatistic(Statistic.ENDERCHEST_OPENED);
|
bukkitPlayer.incrementStatistic(Statistic.ENDERCHEST_OPENED);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
|
@ -14,7 +14,7 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.lishid.openinv.internal.v1_16_R1;
|
package com.lishid.openinv.internal.v1_16_R3;
|
||||||
|
|
||||||
import com.lishid.openinv.OpenInv;
|
import com.lishid.openinv.OpenInv;
|
||||||
import com.lishid.openinv.internal.IPlayerDataManager;
|
import com.lishid.openinv.internal.IPlayerDataManager;
|
||||||
|
@ -23,32 +23,32 @@ import com.mojang.authlib.GameProfile;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import net.minecraft.server.v1_16_R1.ChatComponentText;
|
import net.minecraft.server.v1_16_R3.ChatComponentText;
|
||||||
import net.minecraft.server.v1_16_R1.ChatMessageType;
|
import net.minecraft.server.v1_16_R3.ChatMessageType;
|
||||||
import net.minecraft.server.v1_16_R1.Container;
|
import net.minecraft.server.v1_16_R3.Container;
|
||||||
import net.minecraft.server.v1_16_R1.Containers;
|
import net.minecraft.server.v1_16_R3.Containers;
|
||||||
import net.minecraft.server.v1_16_R1.Entity;
|
import net.minecraft.server.v1_16_R3.Entity;
|
||||||
import net.minecraft.server.v1_16_R1.EntityHuman;
|
import net.minecraft.server.v1_16_R3.EntityHuman;
|
||||||
import net.minecraft.server.v1_16_R1.EntityPlayer;
|
import net.minecraft.server.v1_16_R3.EntityPlayer;
|
||||||
import net.minecraft.server.v1_16_R1.MinecraftServer;
|
import net.minecraft.server.v1_16_R3.MinecraftServer;
|
||||||
import net.minecraft.server.v1_16_R1.NBTCompressedStreamTools;
|
import net.minecraft.server.v1_16_R3.NBTCompressedStreamTools;
|
||||||
import net.minecraft.server.v1_16_R1.NBTTagCompound;
|
import net.minecraft.server.v1_16_R3.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_16_R1.PacketPlayOutChat;
|
import net.minecraft.server.v1_16_R3.PacketPlayOutChat;
|
||||||
import net.minecraft.server.v1_16_R1.PacketPlayOutOpenWindow;
|
import net.minecraft.server.v1_16_R3.PacketPlayOutOpenWindow;
|
||||||
import net.minecraft.server.v1_16_R1.PlayerInteractManager;
|
import net.minecraft.server.v1_16_R3.PlayerInteractManager;
|
||||||
import net.minecraft.server.v1_16_R1.PlayerInventory;
|
import net.minecraft.server.v1_16_R3.PlayerInventory;
|
||||||
import net.minecraft.server.v1_16_R1.SystemUtils;
|
import net.minecraft.server.v1_16_R3.SystemUtils;
|
||||||
import net.minecraft.server.v1_16_R1.World;
|
import net.minecraft.server.v1_16_R3.World;
|
||||||
import net.minecraft.server.v1_16_R1.WorldNBTStorage;
|
import net.minecraft.server.v1_16_R3.WorldNBTStorage;
|
||||||
import net.minecraft.server.v1_16_R1.WorldServer;
|
import net.minecraft.server.v1_16_R3.WorldServer;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.craftbukkit.v1_16_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_16_R3.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_16_R1.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_16_R3.entity.CraftPlayer;
|
||||||
import org.bukkit.craftbukkit.v1_16_R1.event.CraftEventFactory;
|
import org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory;
|
||||||
import org.bukkit.craftbukkit.v1_16_R1.inventory.CraftContainer;
|
import org.bukkit.craftbukkit.v1_16_R3.inventory.CraftContainer;
|
||||||
import org.bukkit.entity.HumanEntity;
|
import org.bukkit.entity.HumanEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.inventory.InventoryType;
|
import org.bukkit.event.inventory.InventoryType;
|
||||||
|
@ -161,11 +161,10 @@ public class PlayerDataManager implements IPlayerDataManager {
|
||||||
|
|
||||||
NBTCompressedStreamTools.a(playerData, new FileOutputStream(file));
|
NBTCompressedStreamTools.a(playerData, new FileOutputStream(file));
|
||||||
|
|
||||||
if (file1.exists()) {
|
if (file1.exists() && !file1.delete() || !file.renameTo(file1)) {
|
||||||
file1.delete();
|
LogManager.getLogger().warn("Failed to save player data for {}", player.getDisplayName().getString());
|
||||||
}
|
}
|
||||||
|
|
||||||
file.renameTo(file1);
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LogManager.getLogger().warn("Failed to save player data for {}", player.getDisplayName().getString());
|
LogManager.getLogger().warn("Failed to save player data for {}", player.getDisplayName().getString());
|
||||||
}
|
}
|
|
@ -14,21 +14,21 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.lishid.openinv.internal.v1_16_R1;
|
package com.lishid.openinv.internal.v1_16_R3;
|
||||||
|
|
||||||
import com.lishid.openinv.internal.ISpecialEnderChest;
|
import com.lishid.openinv.internal.ISpecialEnderChest;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import net.minecraft.server.v1_16_R1.AutoRecipeStackManager;
|
import net.minecraft.server.v1_16_R3.AutoRecipeStackManager;
|
||||||
import net.minecraft.server.v1_16_R1.ContainerUtil;
|
import net.minecraft.server.v1_16_R3.ContainerUtil;
|
||||||
import net.minecraft.server.v1_16_R1.EntityHuman;
|
import net.minecraft.server.v1_16_R3.EntityHuman;
|
||||||
import net.minecraft.server.v1_16_R1.EntityPlayer;
|
import net.minecraft.server.v1_16_R3.EntityPlayer;
|
||||||
import net.minecraft.server.v1_16_R1.IInventoryListener;
|
import net.minecraft.server.v1_16_R3.IInventoryListener;
|
||||||
import net.minecraft.server.v1_16_R1.InventoryEnderChest;
|
import net.minecraft.server.v1_16_R3.InventoryEnderChest;
|
||||||
import net.minecraft.server.v1_16_R1.ItemStack;
|
import net.minecraft.server.v1_16_R3.ItemStack;
|
||||||
import net.minecraft.server.v1_16_R1.NonNullList;
|
import net.minecraft.server.v1_16_R3.NonNullList;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.v1_16_R1.entity.CraftHumanEntity;
|
import org.bukkit.craftbukkit.v1_16_R3.entity.CraftHumanEntity;
|
||||||
import org.bukkit.craftbukkit.v1_16_R1.inventory.CraftInventory;
|
import org.bukkit.craftbukkit.v1_16_R3.inventory.CraftInventory;
|
||||||
import org.bukkit.entity.HumanEntity;
|
import org.bukkit.entity.HumanEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.InventoryHolder;
|
import org.bukkit.inventory.InventoryHolder;
|
|
@ -14,7 +14,7 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.lishid.openinv.internal.v1_16_R1;
|
package com.lishid.openinv.internal.v1_16_R3;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.lishid.openinv.internal.ISpecialPlayerInventory;
|
import com.lishid.openinv.internal.ISpecialPlayerInventory;
|
||||||
|
@ -22,31 +22,31 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import net.minecraft.server.v1_16_R1.AutoRecipeStackManager;
|
import net.minecraft.server.v1_16_R3.AutoRecipeStackManager;
|
||||||
import net.minecraft.server.v1_16_R1.ChatMessage;
|
import net.minecraft.server.v1_16_R3.ChatMessage;
|
||||||
import net.minecraft.server.v1_16_R1.ContainerUtil;
|
import net.minecraft.server.v1_16_R3.ContainerUtil;
|
||||||
import net.minecraft.server.v1_16_R1.CrashReport;
|
import net.minecraft.server.v1_16_R3.CrashReport;
|
||||||
import net.minecraft.server.v1_16_R1.CrashReportSystemDetails;
|
import net.minecraft.server.v1_16_R3.CrashReportSystemDetails;
|
||||||
import net.minecraft.server.v1_16_R1.DamageSource;
|
import net.minecraft.server.v1_16_R3.DamageSource;
|
||||||
import net.minecraft.server.v1_16_R1.EntityHuman;
|
import net.minecraft.server.v1_16_R3.EntityHuman;
|
||||||
import net.minecraft.server.v1_16_R1.EntityPlayer;
|
import net.minecraft.server.v1_16_R3.EntityPlayer;
|
||||||
import net.minecraft.server.v1_16_R1.EnumItemSlot;
|
import net.minecraft.server.v1_16_R3.EnumItemSlot;
|
||||||
import net.minecraft.server.v1_16_R1.IBlockData;
|
import net.minecraft.server.v1_16_R3.IBlockData;
|
||||||
import net.minecraft.server.v1_16_R1.IChatBaseComponent;
|
import net.minecraft.server.v1_16_R3.IChatBaseComponent;
|
||||||
import net.minecraft.server.v1_16_R1.IInventory;
|
import net.minecraft.server.v1_16_R3.IInventory;
|
||||||
import net.minecraft.server.v1_16_R1.Item;
|
import net.minecraft.server.v1_16_R3.Item;
|
||||||
import net.minecraft.server.v1_16_R1.ItemArmor;
|
import net.minecraft.server.v1_16_R3.ItemArmor;
|
||||||
import net.minecraft.server.v1_16_R1.ItemStack;
|
import net.minecraft.server.v1_16_R3.ItemStack;
|
||||||
import net.minecraft.server.v1_16_R1.NBTTagCompound;
|
import net.minecraft.server.v1_16_R3.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_16_R1.NBTTagList;
|
import net.minecraft.server.v1_16_R3.NBTTagList;
|
||||||
import net.minecraft.server.v1_16_R1.NonNullList;
|
import net.minecraft.server.v1_16_R3.NonNullList;
|
||||||
import net.minecraft.server.v1_16_R1.PacketPlayOutSetSlot;
|
import net.minecraft.server.v1_16_R3.PacketPlayOutSetSlot;
|
||||||
import net.minecraft.server.v1_16_R1.PlayerInventory;
|
import net.minecraft.server.v1_16_R3.PlayerInventory;
|
||||||
import net.minecraft.server.v1_16_R1.ReportedException;
|
import net.minecraft.server.v1_16_R3.ReportedException;
|
||||||
import net.minecraft.server.v1_16_R1.World;
|
import net.minecraft.server.v1_16_R3.World;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.v1_16_R1.entity.CraftHumanEntity;
|
import org.bukkit.craftbukkit.v1_16_R3.entity.CraftHumanEntity;
|
||||||
import org.bukkit.craftbukkit.v1_16_R1.inventory.CraftInventory;
|
import org.bukkit.craftbukkit.v1_16_R3.inventory.CraftInventory;
|
||||||
import org.bukkit.entity.HumanEntity;
|
import org.bukkit.entity.HumanEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.InventoryHolder;
|
import org.bukkit.inventory.InventoryHolder;
|
20
pom.xml
20
pom.xml
|
@ -54,26 +54,6 @@
|
||||||
</activation>
|
</activation>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
<profile>
|
|
||||||
<id>latest</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>latest</name>
|
|
||||||
<value>true</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
</profile>
|
|
||||||
|
|
||||||
<profile>
|
|
||||||
<id>recent</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>recent</name>
|
|
||||||
<value>true</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
</profile>
|
|
||||||
|
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
|
|
Loading…
Reference in a new issue