jikoo / openinv Goto Github PK
View Code? Open in Web Editor NEWThis project forked from lishid/openinv
Open anyone's inventory as a chest, real-time!
License: GNU General Public License v3.0
This project forked from lishid/openinv
Open anyone's inventory as a chest, real-time!
License: GNU General Public License v3.0
Dunno what the hell I was thinking when I wrote that code. For the sake of my crap memory and so people know I'm aware, I'll be fixing this today. Don't have time now, give it a couple hours.
So, I've got a working build, (will commit shortly, bit left to clean up) but I'm not happy.
A quick run through the calls made when opening a shulker box:
ContainerShulkerBox
initialization calls IInventory#startOpen
TileEntityShulkerBox#startOpen
both plays the sound (if field h
is 0) and plays the block animation no matter what. The client will ignore invalid block actions, block actions with an open/close state too high.
WorldServer#playBlockAction
adds a BlockAction
to the queue if it is not already present.
BlockAction.equals
on the elements. This means we cannot insert another custom BlockAction
that falsely reports being equal, then breaks the check later prior to sending.TileEntityShulkerBox#c(1, <h, minimum 1>)
is called (WorldServer#a(BlockActionData)
-> BlockStateList$BlockData#a(World, BlockPosition, int, int)
-> BlockTileEntity#a(IBlockData, World, BlockPosition, int, int)
). This resets h
to its old level.The current state:
Prior to opening a TileEntityShulkerBox
, we add 1 to h
. TileEntityShulkerBox#startOpen
also increases h
by one, resulting in +2 total. 2 ticks later (1 is not enough for the action to be drained from queue), we set h
back by 2. This can lead to the shulker box being frozen "open" until next used if accessed by a silentchest user and normal user in the correct order and in very quick succession. Other than that, it's fully functional.
I'm also not a fan of how I get the plugin for use with the runnable, but that's a whole other issue much more related to code cleanliness and health.
There are a couple ways to deal with the problem:
EntityPlayer
, return true for EntityPlayer#isSpectator
. This bypasses the entirety of IInventory#startOpen
, and should work for any and all containers to be silenced. It will additionally prevent the long-standing (and equally painful to fix) bug with trapped chests emitting signal for a single tick when silently opened.This is more of a recommendation. Since you have every single slot in the player's inventory, like the off-hand and armor slots, and there's only 4 empty slots left, I have an idea.
Why not use those 4 empty slots for the player's 2x2 inventory crafting slots? They're technically inventory slots, and stuff can be stored in them temporarily. Plus, those are 4 slots, just like the last 4 slots in the OpenInv GUI.
Does it sound good?
[19:17:20 WARN]: java.lang.InstantiationException: Unable to create a new ISpecialEnderChest: null
[19:17:20 WARN]: at com.lishid.openinv.util.InternalAccessor.newSpecialEnderChest(InternalAccessor.java:196)
[19:17:20 WARN]: at com.lishid.openinv.OpenInv.getSpecialEnderChest(OpenInv.java:216)
[19:17:20 WARN]: at com.lishid.openinv.commands.OpenInvCommand.openInventory(OpenInvCommand.java:165)
[19:17:20 WARN]: at com.lishid.openinv.commands.OpenInvCommand.access$100(OpenInvCommand.java:34)
[19:17:20 WARN]: at com.lishid.openinv.commands.OpenInvCommand$1$1.run(OpenInvCommand.java:92)
[19:17:20 WARN]: at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:98)
[19:17:20 WARN]: at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:462)
[19:17:20 WARN]: at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:1060)
[19:17:20 WARN]: at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:334)
[19:17:20 WARN]: at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:1006)
[19:17:20 WARN]: at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:821)
[19:17:20 WARN]: at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:269)
[19:17:20 WARN]: at java.base/java.lang.Thread.run(Thread.java:829)
I tested on paper without this problem
Personally, I still hope to fix this error
But I know it may not be reasonable
Anyway, thank you for developing and sharing this excellent plugin
Thank you for your patience
java.lang.InstantiationException: Unable to create a new ISpecialEnderChest: null
at com.lishid.openinv.util.InternalAccessor.newSpecialEnderChest(InternalAccessor.java:196)
at com.lishid.openinv.OpenInv.getSpecialEnderChest(OpenInv.java:216)
at com.lishid.openinv.commands.OpenInvCommand.openInventory(OpenInvCommand.java:165)
at com.lishid.openinv.commands.OpenInvCommand.access$100(OpenInvCommand.java:34)
at com.lishid.openinv.commands.OpenInvCommand$1$1.run(OpenInvCommand.java:92)
at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:97)
at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:462)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:1005)
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:333)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:951)
at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:766)
at java.base/java.lang.Thread.run(Unknown Source)
I think it would be beneficial if there is a quick command or a quick suite of tools that are enabling moderators to do things to inventories that are often used.
One of these things would be clearing an inventory as it can be useful in situations when people have banned themselves with items or have items in general that they should not have. (Or maybe they are doing an event)
It does not need to be the command /clearinv
and I think it would be also a grad thing if there is another command that has some subcommands that allow these kind of more specific things.
It would be useful for me, but I don't really know if it would be in the interest of the plugin. (And when it is not in the interest of the plugin the subcommand idea could be something)
Please upload the latest version on Spigot/Bukkit website, so Aternos players can install the plugin
Running /oi on a player will reset their firstPlayed NBT tag to the current date. I first joined my server way back in March 2019. I ran /oi on myself and after relogging it now incorrectly shows that I first joined 4/10/2021, today.
Paper-304 (MC: 1.17.1)
Openinv 4.1.8
chinese:
當我使用openinv插件並運行/open 玩家名(此玩家不在線上) 打開該玩家背包,並拿取他的一些物品,但是更改完畢後,玩家進入伺服器後會馬上死掉,並且將背包上的物品回復至運行 /open 玩家名 並拿取他的一些物品前的狀態
我想這應該是PlayerSQL的問題,因為原MYSQL上的玩家背包資料與更動後不同,所以導致強制玩家死亡,並將他背包的物品回復至玩家離開時的狀態(MYSQL儲存的狀態)
如果可以的話請將openinv的原代碼放置到此插件上,這樣就可以直接使用/open編輯PlayerSQL在MYSQL儲存的玩家資料
english:
When I use the openinv plug-in and run /open player name (the player is not online) to open the player’s backpack and take some of his items, but after the change is completed, the player will die immediately after entering the server, and the player’s name The item returns to the state before running/open the player name and taking some of his items
I think this should be a problem with PlayerSQL, because the player’s backpack information on the original MYSQL is different from that after the change, which leads to forcing the player to die and restoring the contents of his backpack to the state when the player left (the state stored in MYSQL)
I was just trying to see if anyone had a totem on my server but it didn't show my totem even though it was in my offhand, then I noticed it wouldn't show my netherite armour either.
Hello!
When viewing other player's inventory or enderchest, the title of the container is always (My IGN)'s Inventory/Ender Chest. It never titles the container properly. Is there a fix for this?
I am using the latest paperclip server, and the following error is output when the server start.
[12:42:23 INFO]: Starting minecraft server version 1.17
[12:42:23 INFO]: This server is running Paper version git-Paper-"ce66102" (MC: 1.17) (Implementing API version 1.17-R0.1-SNAPSHOT)
[12:42:27 INFO]: [OpenInv] Loading OpenInv v4.1.8
[12:42:43 INFO]: [OpenInv] Enabling OpenInv v4.1.8
[12:42:43 ERROR]: Error occurred while enabling OpenInv v4.1.8 (Is it up to date?)
java.lang.NoClassDefFoundError: net/minecraft/world/entity/player/PlayerInventory
at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]
at java.lang.ClassLoader.defineClass(ClassLoader.java:1010) ~[?:?]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:192) ~[Paper-Server-1.17-R0.1-SNAPSHOT-mojang-mapped.jar:git-Paper-"ce66102"]
at java.lang.ClassLoader.loadClass(ClassLoader.java:586) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:108) ~[Paper-Server-1.17-R0.1-SNAPSHOT-mojang-mapped.jar:git-Paper-"ce66102"]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:103) ~[Paper-Server-1.17-R0.1-SNAPSHOT-mojang-mapped.jar:git-Paper-"ce66102"]
at java.lang.ClassLoader.loadClass(ClassLoader.java:519) ~[?:?]
at java.lang.Class.forName0(Native Method) ~[?:?]
at java.lang.Class.forName(Class.java:375) ~[?:?]
at com.lishid.openinv.util.InternalAccessor.<init>(InternalAccessor.java:43) ~[?:?]
at com.lishid.openinv.OpenInv.onEnable(OpenInv.java:358) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[Paper-Server-1.17-R0.1-SNAPSHOT-mojang-mapped.jar:git-Paper-"ce66102"]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[Paper-Server-1.17-R0.1-SNAPSHOT-mojang-mapped.jar:git-Paper-"ce66102"]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) ~[Paper-Server-1.17-R0.1-SNAPSHOT-mojang-mapped.jar:git-Paper-"ce66102"]
at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugin(CraftServer.java:518) ~[Paper-Server-1.17-R0.1-SNAPSHOT-mojang-mapped.jar:git-Paper-"ce66102"]
at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugins(CraftServer.java:432) ~[Paper-Server-1.17-R0.1-SNAPSHOT-mojang-mapped.jar:git-Paper-"ce66102"]
at net.minecraft.server.MinecraftServer.loadWorld(MinecraftServer.java:643) ~[Paper-Server-1.17-R0.1-SNAPSHOT-mojang-mapped.jar:git-Paper-"ce66102"]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:303) ~[Paper-Server-1.17-R0.1-SNAPSHOT-mojang-mapped.jar:git-Paper-"ce66102"]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1118) ~[Paper-Server-1.17-R0.1-SNAPSHOT-mojang-mapped.jar:git-Paper-"ce66102"]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[Paper-Server-1.17-R0.1-SNAPSHOT-mojang-mapped.jar:git-Paper-"ce66102"]
at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.lang.ClassNotFoundException: net.minecraft.world.entity.player.PlayerInventory
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:146) ~[Paper-Server-1.17-R0.1-SNAPSHOT-mojang-mapped.jar:git-Paper-"ce66102"]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:103) ~[Paper-Server-1.17-R0.1-SNAPSHOT-mojang-mapped.jar:git-Paper-"ce66102"]
at java.lang.ClassLoader.loadClass(ClassLoader.java:519) ~[?:?]
... 22 more
[12:42:43 INFO]: [OpenInv] Disabling OpenInv v4.1.8
Hello! I hope you are well.
Firstly, thanks a lot for maintaining OpenInv. I've been using it since 2014 and I always recommend it to others.
This is a very simple issue.
In the following example, Oaksworth is the command issuer and fvsparkles is the target.
When Oaksworth issues /openinv fvsparkles
, the GUI title will be "Oaksworth's Inventory" instead of "fvsparkles's Inventory":
The same thing happens with /openender fvsparkles
:
The intended behavior would be to display the target's name on inventories and ender chests.
Thanks in advance! :)
If you have openinv.exempt
your inventory will be protected, however, that is not the case if the player is offline when you try to view their inventory
A new player that joined the server couldn't be inv specced, it showed the "Player not found!" message.
Not sure if this happens always, I will do some further testing.
When I try to open any of the inventory with a command (ender, normal, my own, someone else's).
There's nothing there. However, for example, if I use the native command from EssentialsX - /invsee PLAYER. Then the player's inventory will really show me.
But EssentialsX doesn't suit me, because it doesn't know how to view offline players' inventories.
I don't know, but maybe it has something to do with Java 11. Because when the server core was running on Java 8, there were no problems with the plugin.
OpenInv version is 3.3.5.
Spigot version is "This server is running CraftBukkit version git-Spigot-4bd94dc-3a482bd (MC: 1.12.2) (Implementing API version 1.12.2-R0.1-SNAPSHOT)"
Log: https://pastebin.com/My3mbGBG
I know you updated to 1.18.2, but there's no official .jar we can download right now. Did you forget or did we have to wait a bit longer?
Hello!
I want to use this plugin to remove items from all offline players inventory and enderchest
Maybe can i get a little help with the api? I cant find any documentation :(
When running /openender the server crashes, and resulted in me having to remove openinv to continue.
Crashfile:
crash-2021-06-13_11.05.54-server.txt
Hi,
I have a problem with this plugin,
when i put /oe <player_name> in the chat the plugin said:
[17:36:05 WARN]: java.lang.InstantiationException: Unable to create a new ISpecialEnderChest: null
[17:36:05 WARN]: at com.lishid.openinv.util.InternalAccessor.newSpecialEnderChest(InternalAccessor.java:196)
[17:36:05 WARN]: at com.lishid.openinv.OpenInv.getSpecialEnderChest(OpenInv.java:216)
[17:36:05 WARN]: at com.lishid.openinv.commands.OpenInvCommand.openInventory(OpenInvCommand.java:165)
[17:36:05 WARN]: at com.lishid.openinv.commands.OpenInvCommand.access$100(OpenInvCommand.java:34)
[17:36:05 WARN]: at com.lishid.openinv.commands.OpenInvCommand$1$1.run(OpenInvCommand.java:92)
[17:36:05 WARN]: at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:97)
[17:36:05 WARN]: at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:462)
[17:36:05 WARN]: at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:999)
[17:36:05 WARN]: at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:334)
[17:36:05 WARN]: at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:945)
[17:36:05 WARN]: at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:760)
[17:36:05 WARN]: at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:270)
[17:36:05 WARN]: at java.base/java.lang.Thread.run(Thread.java:834)
do you have any patch?
When I press esc the trunk does not close
It doenst work with the new Minecraft version 1.17
I had multiple issues with /openinv playername.
One issue is where a player is called "BlaOldname". If he wants to access "Oldname", he can't, as using /inv Oldname will open the inventory of "BlaOldname".
Another thing which I can't reproduce is that some players don't get matched at all (if offline). If I can reproduce it I will let you know, however maybe you find the issue yourself somehow.
Hello, thanks for keeping this great plugin going.
I've been trying to get OpenInv to run on my server after getting back to Minecraft. I'm running 1.12 base version with ViaVersion & Geyser support but can't get the plugin to work.
The plugin boots but only opens a blank inventory and gives this error when trying to run.
https://pastebin.com/ecN3zkVq
Thanks!
Using this release ( https://github.com/Jikoo/OpenInv/releases/tag/4.1.8 ) on the first spigot 1.17 build
Produces following error which crashes the server when using the /inv command to check a player's inventory
[15:15:29] [Server thread/WARN]: [OpenInv] Task #301 for OpenInv v4.1.8 generated an exception
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) ~[?:?]
at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) ~[?:?]
at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266) ~[?:?]
at java.util.Objects.checkIndex(Objects.java:359) ~[?:?]
at java.util.ArrayList.get(ArrayList.java:427) ~[?:?]
at net.minecraft.core.NonNullList.get(SourceFile:46) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at net.minecraft.world.inventory.Container.b(Container.java:272) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at net.minecraft.world.inventory.Container.d(Container.java:228) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at net.minecraft.world.inventory.Container.addSlotListener(Container.java:161) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at net.minecraft.server.level.EntityPlayer.initMenu(EntityPlayer.java:545) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at com.lishid.openinv.internal.v1_17_R1.PlayerDataManager.openInventory(PlayerDataManager.java:175) ~[?:?]
at com.lishid.openinv.OpenInv.openInventory(OpenInv.java:282) ~[?:?]
at com.lishid.openinv.commands.OpenInvCommand.openInventory(OpenInvCommand.java:173) ~[?:?]
at com.lishid.openinv.commands.OpenInvCommand.access$100(OpenInvCommand.java:34) ~[?:?]
at com.lishid.openinv.commands.OpenInvCommand$1$1.run(OpenInvCommand.java:92) ~[?:?]
at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:81) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:400) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1251) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:436) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1199) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1026) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:307) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at java.lang.Thread.run(Thread.java:831) [?:?]
[15:15:29] [Server thread/ERROR]: Encountered an unexpected exception
net.minecraft.ReportedException: Ticking entity
at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1309) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:436) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1199) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1026) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:307) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) ~[?:?]
at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) ~[?:?]
at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266) ~[?:?]
at java.util.Objects.checkIndex(Objects.java:359) ~[?:?]
at java.util.ArrayList.get(ArrayList.java:427) ~[?:?]
at net.minecraft.core.NonNullList.get(SourceFile:46) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at net.minecraft.world.inventory.Container.b(Container.java:272) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at net.minecraft.world.inventory.Container.d(Container.java:228) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at net.minecraft.server.level.EntityPlayer.tick(EntityPlayer.java:588) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at net.minecraft.server.level.WorldServer.entityJoinedWorld(WorldServer.java:815) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at net.minecraft.world.level.World.a(World.java:692) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at net.minecraft.server.level.WorldServer.lambda$11(WorldServer.java:527) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at net.minecraft.world.level.entity.EntityTickList.a(SourceFile:54) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at net.minecraft.server.level.WorldServer.doTick(WorldServer.java:508) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1296) ~[spigot-1.17.jar:3104-Spigot-a09c0bb-d747f8e]
... 5 more
Is there a way to set SilentChest to automatically be turned OFF when joining or starting the server?
That way you have to manually type /sc to turn it back on.
When I use /oi or /oe and a player as param it opens the inventory with nothing in it. This error is appearing:
Also wondering if possible to potentially disable the editing part, as I primarily use this to view inventories (considering that this bug did not require the inventory to be modified), as a mitigation for future issues.
Hello,
I think it would be nice to have a feature, to log everything that happened in someone else's inventory. It would allow me to perform better supervision over my server stuff.
For instance, it could be a simple .log file with information which item has been transferred to/from another player's inventory. It could log it after every drag&drop or provide a summary after the inventory editing is done. I think I like the idea with summary better, but I don't know exactly how hard it would be to implement that.
Maybe this log could be also accessible via some command that would for instance open a transfer history for a specific user that performs an action (a moderator or admin in that case) or for a player that is a subject to inventory manipulation (what has been taken from or given to).
Sometimes there are discussions on my server, that stuff is accused of taking something from player inventory, I would like to have some proof that it happened or not.
I hope you like my idea, please let me know how doable is that. Thanks a lot!
Best regards,
Bloodlex
This is a rare case. The Player loaded by the PlayerDataManager is a new object for SpecialEnderChest and SpecialPlayerInventory.
To replicate dupe/overwrite issues:
To fix this, I'm probably going to implement a cache system similar to Guava's - while the inventory has viewers, players will be loaded. After that there will be a brief period, probably a couple minutes, where they (and the relevant inventories) remain cached in case of a re-open.
This will also allow us to further reduce redundant saves pretty simply - saving really only needs to happen when a player is removed from the cache.
When this plugin is combined with SaberFactions or Vault, it is no longer possible to edit the inventory by /oi.
SaberFactions
https://www.spigotmc.org/resources/saberfactions-1-8-1-16-x-discord-saber-pw-the-complete-factions-solution.69771/
Vault
https://www.spigotmc.org/resources/vault.34315/
Hi, I've noticed that since last version, the GUI always shows the name of the player who runs the /oi or /oe command, not the targeted player. In messages YMLs the variable is called %player%, I think this value should be populated by the targeted player. Thanks!
Unsure if a bug or intentional, however, I'd like the permission openinv.exempt
to also apply to enderchests. Though, a separate permission for making enderchests exempt works too if you'd prefer. Thanks.
I rely heavily on this for admin stuff, will you be updating for 1.12?
Please add 1.18 (or v1_18_R1) to the supported versions.
Hello People,
I'm using apex hosting and I installed this plugin to my server just by clicking install on the apex plugin area. I restarted my server after that and logged in, but for some reason the commands don't work. I am opped and everything but it still doesn't work. Idk if having another plugin affects it (which I do) or if I'm just being stupid. Does anyone know if I had to do something with my minecraft files or the server files? Could anyone please help me out? This plug-in is essential to my server because of a few friends of mine. Someone please help me.
-Phragonality
Also wondering if yours differs much (other than the UUID lookups mentioned in readme) since the plugin is being continued by another author.
Quick explanation
Video: https://imgur.com/a/5IPkOUG
NOTE: anvil menu closed on its own after nether chunk unloaded. Items got lost.
NOTE: this also happens if you have SilentContainer enabled but currently do not have permission to use it. Basically container opens normally (because you don't have permission) but bug still occurs because SilentContainer is enabled for you.
Reason why
InventoryListener::onInventoryClose
calls IAnySilentContainer::deactivateContainer
which calls ServerPlayer::doCloseContainer
.
ServerPlayer::doCloseContainer
does the following:
public void doCloseContainer() {
this.containerMenu.removed(this);
this.inventoryMenu.transferState(this.containerMenu);
this.containerMenu = this.inventoryMenu;
}
But it means that
human.containerMenu.transferTo(human.inventoryMenu, human.getBukkitEntity());
which server calls internally after InventoryCloseEvent dispatching will never get called on the correct containerMenu
.
This leads to the problem of ChestBlockEntity::transaction
list being in the wrong state because container's ChestBlockEntity::onClose
method will never get called.
When server unloads a chunk it gets a list of container viewers (this is what transaction
list stores) and closes viewers inventories.
Ultimately, this leads to the bug.
I open a container, close it but container entity still counts me as a viewer.
I teleport, open another container, server unloads chunk where I have been, sees me as a container viewer (which is not the case anymore) and closes my inventory menu (if I have any menu open). If I use anvil, items get lost. Maybe there are another consequences with other container types.
This is observed on Paper 1.18.1.
I translated to use your plug-in by translating Korean.
But it didn't work.
I think the owner should add a language translation system.
17.05 16:05:49 [Server] INFO [06:05:49 INFO]: ZeroTwosGF issued server command: /oe ZeroTwosGF 17.05 16:05:49 [Server] Startup [06:05:49 WARN]: java.lang.InstantiationException: Unable to create a new ISpecialEnderChest: null 17.05 16:05:49 [Server] Startup [06:05:49 WARN]: at com.lishid.openinv.util.InternalAccessor.newSpecialEnderChest(InternalAccessor.java:196) 17.05 16:05:49 [Server] Startup [06:05:49 WARN]: at com.lishid.openinv.OpenInv.getSpecialEnderChest(OpenInv.java:216) 17.05 16:05:49 [Server] Startup [06:05:49 WARN]: at com.lishid.openinv.commands.OpenInvCommand.openInventory(OpenInvCommand.java:165) 17.05 16:05:49 [Server] Startup [06:05:49 WARN]: at com.lishid.openinv.commands.OpenInvCommand.access$100(OpenInvCommand.java:34) 17.05 16:05:49 [Server] Startup [06:05:49 WARN]: at com.lishid.openinv.commands.OpenInvCommand$1$1.run(OpenInvCommand.java:92) 17.05 16:05:49 [Server] Startup [06:05:49 WARN]: at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:100) 17.05 16:05:49 [Server] Startup [06:05:49 WARN]: at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:462) 17.05 16:05:49 [Server] Startup [06:05:49 WARN]: at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:999) 17.05 16:05:49 [Server] Startup [06:05:49 WARN]: at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:333) 17.05 16:05:49 [Server] Startup [06:05:49 WARN]: at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:945) 17.05 16:05:49 [Server] Startup [06:05:49 WARN]: at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:760) 17.05 16:05:49 [Server] Startup [06:05:49 WARN]: at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:270) 17.05 16:05:49 [Server] Startup [06:05:49 WARN]: at java.base/java.lang.Thread.run(Thread.java:829)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.