IntellectualSites / PlotSquared

PlotSquared - Reinventing the plotworld
GNU General Public License v3.0
543 stars 740 forks source link

Set Owner "none" is broken #2297

Closed MattBDev closed 5 years ago

MattBDev commented 5 years ago

On a 1.12.2 server using the command /plot setowner none throws a ClassCastException and doesn't destroy the plot sign.

MattBDev commented 5 years ago

When leaving the plot and going back to the plot and trying to claim it, will give the plot back to it's previous owner and will say that the plot is already claimed.

AeSix commented 5 years ago

The command, supposedly was expected behavior, minus the error, from what empire told me some time back.

AeSix commented 5 years ago

Well, I was going to say this is no longer an issue with build 184, but I see this is a 1.12 problem. Maybe a cheap fix would be to run make the code for "/plot delete" run when "plot setowner none" is issued?

MattBDev commented 5 years ago

It's not isolated to 1.12 it is likely relevant to 1.13.

AeSix commented 5 years ago

Well, on build 184, "/p setowner none" removes the owner (making the plot unclaimed), destroys the plot sign, does not destroy the plot /contents/ and does not error.

So... fixed?

MattBDev commented 5 years ago

no

ds58 commented 5 years ago

What if you are trying to reference the player "none" https://namemc.com/profile/None.2

NameMC
None - Minecraft Profile
Check the availability of Minecraft names, look up the name history of Minecraft accounts, view Minecraft skins in 3D, convert UUIDs, and much more!
MattBDev commented 5 years ago

@dextonanderson We already handled this case (I think)

ds58 commented 5 years ago

Upon inspection, it would seem you are correct

https://github.com/IntellectualSites/PlotSquared/blob/breaking/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Owner.java#L20-L35

GitHub
IntellectualSites/PlotSquared
PlotSquared - Reinventing the plotworld. Contribute to IntellectualSites/PlotSquared development by creating an account on GitHub.
AeSix commented 5 years ago

As of 1.13.2 w/ P2 4.305 (Breaking) doing /p setowner none results in: The plot being unclaimed The plot sign being removed The plot contents NOT being altered No exceptions thrown in chat or console

I also left the plot, re-enetered the plot, claimed the plot, setowner to the original owner, left the plot, re-entered the plot, (re)added a player to member list. Verified the sign is correct. No issues.

I personally feel this should be expected behavior, as to remove the contents, there is a readily available command to do all three tasks (unclaim, remove sign and restore plot to default) - /p delete

@MattBDev if this is not expected behavior then the issue persists, but is closer to be done I guess?