AntiShare

76k Downloads

Error using /gm

Evilpape opened this issue ยท 13 comments

commented

Not only does /gm not work for players who have been given AntiShare.gamemode, but OPed players who use /gm would get this error:

17:33:05 [INFO] [PLAYER_COMMAND] convictedsaint: /gm
17:35:22 [SEVERE] Could not pass event PlayerCommandPreprocessEvent to AntiShare

org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
va:303)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
a:62)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
ava:459)
at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.
java:814)
at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:781)

    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:764)
    at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java

:103)
at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:34)
at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:113)
at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java
:169)
at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:7
8)
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:551)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:449)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
Caused by: java.lang.NullPointerException
at com.turt2live.antishare.storage.PerWorldConfig.getSideOfSplit(Unknown
Source)
at com.turt2live.antishare.GameModeCommand.onPlayerCommand(Unknown Sourc
e)
at com.turt2live.antishare.ASListener.onCommand(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
va:301)
... 14 more

I am using the latest Dev build#368
CB version#2149 (1.2.5-R1.0)

Although I am using Essentials, it does have some control over how /gm is used (since /gm isn't a default command)
Tested even with Essentials off: does not recognize /gm at all.
The command '/gamemode ' works if the player has direct permission set. Groups don't work.

Upon further testing, it seems that the players inventory is not saved. I can give myself diamond, /gamemode out, and put in survival inventory.

Please fix.

commented

You have essentials.

Use essentials' /gm command.

Edit (I should actually read the last part of posts...):

AntiShare's command only works effectively if no other plugin uses /gm for whatever reason, and besides, the /gm command in AntiShare is likely going to be removed in a while.

commented

Essentials did a great job of the enable/disable of the command (Bukkit doesn't have this support).

The permissions issue looks like it is partly caused by how I ended up coding that

commented

The way our server runs, we don't even need a permission that works with groups so that is fine.
You do good. But I have a question.
I keep getting spammed by things similar to:

19:54:23 [WARNING] [AntiShare] Survival block at location (-164, 68, -855, world
) is not WORKBENCH (found AIR)

Sometimes it would spam my entire console then reboot itself, which causes a good bit of lag.
What's going on here? We only have one person who actually uses the '/gamemode playername gamemode' command and I'm pretty sure he built these many things with the blocks.

commented

There was a bug in 3.2.2 that slipped by (somehow).

Destroying a block doesn't remove it from the list of blocks and when AntiShare scans all the blocks every 10 minutes it sees that the block changed and (still) doesn't remove it.

I've fixed this in a development build, I also added a way to shut AntiShare up from saying that.

commented

Hmm I understand. This was actually in regards to /gm in your official 3.2.2 version of AntiShare.
I was the one that let you know, in your BukkitDev page, that if an OP uses /gm, it will /gm some other random person.
I guess if you remove the /gm command from AntiShare, it will work, and the /gm will remain with Essentials.
Thanks!

commented

Okay! I will wait for your next RB before I test it and use it on my main server.

commented

I have been testing out your new dev build on my server since yesterday.
Seems to me that you have fixed the /gm issue. Wonderful!
But the spamming of these
19:54:23 [WARNING] [AntiShare] Survival block at location (-164, 68, -855, world
) is not WORKBENCH (found AIR)
has not been fixed yet. It would fill up my server console every 10 minutes.

And by the way, I generated a brand new config since I noticed the way you coded inventories has changed. That is also a great idea. The last method was ridiculous, generating at least 6 configs per person who logs on.

commented

You can tell AntiShare to stop sending those messages now. See the end of your config.yml

commented

silent-blocks is set to true. Is that what that is or do I have to use silent-overall?

commented

silent-blocks is the correct node.

(I may have failed at coding it though, I'll check this when I can)

commented

Yeah. It was defaulted to true when I generated the config too, which is good. I didn't even notice it at first.
Can you comment back once you release your next dev build?

commented

Building now, should be done shortly.