Zrips / CMI

113 stars 97 forks source link

asFakeOp! broken with new update / 1.19.3? #7563

Open bobhenl opened 1 year ago

bobhenl commented 1 year ago

Hello, it was working for me few days ago, now any single cmd with asFakeOp! in Customalias doesn't work for me.

Example:

  Ip:
    Cmds:
    - 'asFakeOp! cmi msg [playername] !&c&XXXX&f» &fServer IP is: &c&lXXX&f.'

I've updated to 1.19.3 yesterday as well & to the latest CMI version (9.3.1.2 from like 3 versions behind) and every cmd with asFakeOp stopped working

BTW any error in the console

CloudeLecaw commented 1 year ago

where you barrects come from?

Well what if you try:

  Ip:
    Cmds:
    - 'asFakeOp! cmi msg [playername] !&c&XXXX&f» &fServer IP is:&c &c&lXXX&f.'

well i dont know if this was just an example but its not nicely made... because your console still would see this sender receiver thing..

So what about simply using this one istead?

  Ip:
    Cmds:
    - msg! [playername] &c&XXXX&f» &fServer IP is:&c &c&lXXX&f.

or what about a a bit comforter command with the feature that player can paste it to their chat instead of need to wrote it down theirself... (for example if they wanne paste it in a discord or to a friend)

  Ip:
    Cmds:
    - asConsole! cmi ctellraw [playername] <T>&c&XXXX&f» &fServer IP&f:&f 123.432.234.543:25565 &c&lXXX&f.</T><H>SHIFT+CLICK here to paste the Server IP into the chat.</H><SI>123.432.234.543:25565</SI>

well has nothing to do with the fakeOP might not beworking anymore on your server itself.. just an idea to optimize your lp command so that the whole asFakeOp! might not be needed :3

Zrips commented 1 year ago

@bobhenl there was no changes relating to asFakeOp! in latest updates, so it could be caused by something at your end. Double check that there is OP player created, this can be done ingame by typing in /deop and it should suggest CMI-Fake-Operator as one of the options. What type of server are you running? Report from /cmi version would help out here

bobhenl commented 1 year ago

image I've updated to 1.19.3 as well, so it can be due to some changes there maybe.

I'll try CloudeLecaw's tweaks regarding IP cause I think he's right, but regarding asFakeOP!, it doesn't work in any commands it worked before :/

Cannot it be due to ProtocolLib updated version as well? Can I debug it somehow?

Even when I've created: test: Cmds:

it doesn't work... and without asFakeOp it is. Any error, any message, anything after typing the cmd. image

CloudeLecaw commented 1 year ago

like Zrips wrote you might deoped the "player" CMI-Fake-Operator? what happens if you reop them...

well about this... im confused.. we also use asFakeOP! on our server in some elements.. well CMI-Fake-Operator is not on the OP list. but the commands work (we use currently paper 1.19.2) taking a look at the ops.json file.. well its empty no ops listed _(we only work on our server with op normaly if we wanne setup commandblocks..well but only because i found no way at to moment this can be "made" by a permission.. but may it does not work like this..

bobhenl commented 1 year ago

image No, he's still OPed

CloudeLecaw commented 1 year ago

well loke written above, sometimes im.a bit confused with this function asFakeOp!. when i do /cmi oplist i get this result i also checked the ops.json is empty...

[05:53:29] [Server thread/INFO]: --------------------------------------------------
[05:53:29] [Server thread/INFO]: --------------------------------------------------

it means no ops set. how ever the features we use with asFakeOp! (mostly at ics we set where asConsole does not worked because it needs a "player"world location. - you might noticed if you havent otped your CMI-Fake-Operator then his location is in the main world.) still work..the player Account itself for CMI-Fake-Operator exists. seems like this is enough to work?... but i also renember zrips said to let this feature work this CMI-Fake-Operator Account needs to be oped..

here an example where CMI-Fake-Operator is needed because his location of world is needed what asConsole cant do..

SecretDoor:
  Locations:
  - world;35.0;65.0;283.0
  Commands:
  - asConsole! cmi tpohere CMI-Fake-Operator [playerName] -s
  - delay! 1.0
  - asFakeOp! minecraft:fill 36 63 282 36 64 282 minecraft:air replace minecraft:bookshelf
  - asConsole! cmi sound entity_lightning_bolt_thunder:1:1 [playerName] -s

You might ask why this tpo of the CMI-Fake-Operator? Even if he never is oneline because he doesnt exist in real, he has a datafile and with it a location in a world (if not moved before by you he is in your mainworld) if you have more like these ics shown above in differnt worlds you neeed to tp the CMI-Fake-Operator at first to you with asConsole! so he has a location in the world where he is needed.

Zrips commented 1 year ago

CMI-Fake-Operator will only appear when specialized command with asFakeOP! is used, so it will not showup before that in OP list. @bobhenl Do you have any opportunity to test this on your personal PC with default setup? As this could be caused by either 3rd party plugin or server settings in general. We do fire PlayerCommandPreprocessEvent event before performing commands, which can be canceled which would do nothing and no error would appear in console. Could be caused by anticheat plugin not accounting for situation like that and preventing for none real user performing commands, which is valid action to prevent potential exploits, tho should not be canceled in this case.

Zrips commented 1 year ago

Will add extra message with next update which will be shown in case asFakeOP! command event is canceled which can help out for you to debug this one more properly.

bobhenl commented 1 year ago

[19:17:58 INFO]: Renzotom issued server command: /test [19:17:58 INFO]: Tried to use asFakeOp! specialized command variable but event got canceled

I'll test to disable some plugins to test it

bobhenl commented 1 year ago

I discovered that issue is with https://www.spigotmc.org/resources/1-8-1-19-zauctionhouse-1400-servers-online.63010/.

I have no idea what can cause problem with it.

CloudeLecaw commented 1 year ago

CMI-Fake-Operator will only appear when specialized command with asFakeOP! is used, so it will not showup before that in OP list.

that makes sense, thank you for pointing out this Informationen :)

CloudeLecaw commented 1 year ago

I discovered that issue is with https://www.spigotmc.org/resources/1-8-1-19-zauctionhouse-1400-servers-online.63010/.

I have no idea what can cause problem with it.

well if this plugin is causing the cancel it might be worth to inform the developer of this premiim plugin about the issue you run into with using it. may he could create a fix for this on his site...