Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sign problem 1.20.1 #765

Closed
DexterSK opened this issue Jul 1, 2023 · 10 comments
Closed

Sign problem 1.20.1 #765

DexterSK opened this issue Jul 1, 2023 · 10 comments
Labels
area/misc Issues that don't fit particularly well into any other areas. type/bug Unintended behavior or fault.

Comments

@DexterSK
Copy link

DexterSK commented Jul 1, 2023

Bug report

Short description

When you right click on arena sign it will open SignGUI

Reproduction steps

  1. Right click on sign

Details

  • MobArena version: 0.107
  • Server version: git-Purpur-1995 (MC: 1.20.1)
  • Stacktrace (if applicable):

Additional info

@DexterSK DexterSK closed this as completed Jul 2, 2023
@DexterSK
Copy link
Author

DexterSK commented Jul 2, 2023

Ok so issue is still there, it worked one time but now again doesn't. When i right click sign it will open edit sign gui and console will say player xxx tried to edit non editable sign.

@DexterSK DexterSK reopened this Jul 2, 2023
@Bobcat00
Copy link
Contributor

Bobcat00 commented Jul 3, 2023

Is your arena protected by any other plugins, like WorldGuard or GriefPrevention? That seems to be a CraftBukkit message for the cases of the sign being waxed or the wrong player is editing it (don't really understand all this):
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/nms-patches/net/minecraft/world/level/block/entity/TileEntitySign.patch#50

I have a branch that stops the dialog from being opened, but it may not be the perfect solution:
Bobcat00@2cbb490?w=1

@DexterSK
Copy link
Author

DexterSK commented Jul 4, 2023

yup i have wg region

@DexterSK
Copy link
Author

DexterSK commented Jul 4, 2023

do i need to remove region?

@veteranmina
Copy link

Haven't really looked, but is this possibly due to the new 1.20 feature of double-sided signs?

@garbagemule garbagemule added the area/misc Issues that don't fit particularly well into any other areas. label Jul 22, 2023
@BobbyTowers
Copy link

I only get this on the second arena. The first one works fine.

@garbagemule garbagemule added the type/bug Unintended behavior or fault. label Oct 29, 2023
garbagemule added a commit that referenced this issue Nov 3, 2023
Since Minecraft 1.20, players can edit signs by right-clicking on them,
and that poses a problem for the sign-centric portions of the plugin,
such as class selection signs and the various types of arena signs.

This commit refactors the PlayerInteractEvent handler in ArenaListener
in order to break open the possibility of handling non-lobby players as
well. We're a little more strict with lobby players, and we still want
to handle class sign clicks and iron block clicks here. For players who
aren't in the lobby, we're really just blocking the event according to
the regular protection rules (block is inside region, protect is on, and
arena is not in edit mode).

It also blanket cancels events in the HandlesSignClicks event handler,
because there is no meaningful way to edit an arena sign, since their
contents come from the template file and not from what is written on
them by the sign renderer.

Ideally, we'd refactor some of this event handler logic, because it's a
lot easier to take care of the individual responsibilities in separate
event handlers.

Fixes #765
@garbagemule
Copy link
Owner

@DexterSK @BobbyTowers @veteranmina I've got a fix for this issue ready if anyone wants to try it out. Let me know if you prefer to build it yourself (branch 765-sign-edit) or if you'd like me to send you a build on Discord.

@BobbyTowers
Copy link

I would like a build, what's your discord?

@garbagemule
Copy link
Owner

I'll drop one in the #test-builds channel on the MobArena Discord.

@Nesseley
Copy link
Collaborator

Nesseley commented Nov 3, 2023

For the lazy ones

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/misc Issues that don't fit particularly well into any other areas. type/bug Unintended behavior or fault.
Projects
None yet
Development

No branches or pull requests

6 participants