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

Consistency fixes (across 46 commands), additional CoreProtect integration (/dispfill and /setlever), and a critical bugfix (/setlever) (FS-162) #43

Merged
merged 7 commits into from Apr 10, 2021

Conversation

VideoGameSmash12
Copy link

@VideoGameSmash12 VideoGameSmash12 commented Apr 5, 2021

https://forum.totalfreedom.me/d/1301-bug-report-setlever-can-crash-the-server

Make sure to review my changes to make sure I didn't fuck up somewhere down the line.

Consistency Fixes

I tried to change as many as possible to use FreedomCommand.msg instead of CommandSender.sendMessage for their messages. Here are a list of the files containing those changes:

  • Command_adminworld.java
  • Command_adventure.java
  • Command_banip.java
  • Command_blockedit.java
  • Command_blockpvp.java
  • Command_cage.java
  • Command_cartsit.java
  • Command_clearchat.java
  • Command_clearinventory.java
  • Command_commandlist.java
  • Command_creative.java
  • Command_deop.java
  • Command_deopall.java
  • Command_dispfill.java
  • Command_doom.java
  • Command_gcmd.java
  • Command_hubworld.java
  • Command_inspect.java
  • Command_list.java
  • Command_lockup.java
  • Command_manageshop.java
  • Command_manuallyverify.java
  • Command_masterbuilderworld.java
  • Command_mbconfig.java
  • Command_moblimiter.java
  • Command_mp44.java
  • Command_mute.java
  • Command_nickfilter.java
  • Command_op.java
  • Command_opall.java
  • Command_opme.java
  • Command_potion.java (Also corrected the inconsistent "player not found" message's color)
  • Command_rank.java
  • Command_ride.java
  • Command_saconfig.java
  • Command_scare.java
  • Command_setplayerlimit.java
  • Command_settotalvotes.java
  • Command_smite.java
  • Command_spectator.java
  • Command_survival.java
  • Command_unblockcmd.java
  • Command_uncage.java
  • Command_unmute.java
  • Command_verifynoadmin.java

Functionality Additions

Here are some commands I added functionality to:

  • Command_dispfill.java: Added some code that hooks into the CoreProtect API to log the items being removed from and added into the dispensers.
  • Command_setlever.java: Added some code that hooks into the CoreProtect API to log the levers being interacted with.

Bugfixes

Here are some bug fixes I did:

  • Fixes admin notes not displaying for admins, only admin impostors
  • Fixes incorrect rank colors for admin chat messages (Discord -> Minecraft)
  • Fixes [Media] being appended into admin chat messages (Discord -> Minecraft) improperly

Critical Bugfix

Here's a command I fixed a critical bug in:

  • Command_setlever.java

…consistency, I tried to change as many as possible to use `FreedomCommand.msg` instead of `CommandSender.sendMessage` for their messages. Here are a list of the files containing those changes:

* Command_adminworld.java
* Command_adventure.java
* Command_banip.java
* Command_blockedit.java
* Command_blockpvp.java
* Command_cage.java
* Command_cartsit.java
* Command_clearchat.java
* Command_clearinventory.java
* Command_commandlist.java
* Command_creative.java
* Command_deop.java
* Command_deopall.java
* Command_dispfill.java
* Command_doom.java
* Command_gcmd.java
* Command_hubworld.java
* Command_inspect.java
* Command_list.java
* Command_lockup.java
* Command_manageshop.java
* Command_manuallyverify.java
* Command_masterbuilderworld.java
* Command_mbconfig.java
* Command_moblimiter.java
* Command_mp44.java
* Command_mute.java
* Command_nickfilter.java
* Command_op.java
* Command_opall.java
* Command_opme.java
* Command_potion.java (Also corrected the inconsistent "player not found" message's color)
* Command_rank.java
* Command_ride.java
* Command_saconfig.java
* Command_scare.java
* Command_setplayerlimit.java
* Command_settotalvotes.java
* Command_smite.java
* Command_spectator.java
* Command_survival.java
* Command_unblockcmd.java
* Command_uncage.java
* Command_unmute.java
* Command_verifynoadmin.java

Here are some commands I added functionality to:
* Command_dispfill.java: Added some code that hooks into the CoreProtect API to log the items being removed from and added into the dispensers.
* Command_setlever.java: Added some code that hooks into the CoreProtect API to log the levers being interacted with.

Here's a command I fixed a critical bug in:
* Command_setlever.java
@Focusvity Focusvity requested a review from a team April 5, 2021 23:27
Copy link

@Focusvity Focusvity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, please remove org.bukkit.ChatColor import from Command_nickfilter class as it is also unused.

Focusvity
Focusvity previously approved these changes Apr 6, 2021
@Focusvity
Copy link

@AtlasMediaGroup/totalfreedom-minecraft-developers Can one of you take a look - as this doesn't have a ticket, another set of eyes is needed to ensure everything is good.
@Wild1145 Once I have approval from another developer, is this all good to be merged - this doesn't have a ticket.

Credit to Fleek for some of the code here.

Bugs that were fixed:
* [Media] showing up with an extra space at the beginning of blank messages with attachments
* Admin chat using incorrect colors for its ranks in messages from Discord to Minecraft
* Admin notes not sending to admins, only admin impostors
Copy link

@Focusvity Focusvity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from what I have commented, everything looks good.

@Focusvity Focusvity dismissed their stale review April 8, 2021 01:45

New commit.

Copy link

@Focusvity Focusvity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good now.
@Wild1145 Is this alright to be merged (no ticket) or do you want me to create a ticket with the changes?
@AtlasMediaGroup/totalfreedom-minecraft-developers Can one of you review this, please?

@Focusvity
Copy link

@Wild1145 I can't trigger Travis-CI to build so can you do it for us, please?

@Focusvity Focusvity changed the title Consistency fixes (across 46 commands), additional CoreProtect integration (/dispfill and /setlever), and a critical bugfix (/setlever) Consistency fixes (across 46 commands), additional CoreProtect integration (/dispfill and /setlever), and a critical bugfix (/setlever) (FS-162) Apr 10, 2021
@Focusvity
Copy link

I have created a ticket (FS-162) and linked the PR to it. It's up to @Wild1145 whether he wants it merged in this update or the next update.

@Wild1145
Copy link
Member

As I've merged another PR in this should now trigger a new Travis CI Build.

@Wild1145 Wild1145 merged commit 09930c2 into AtlasMediaGroup:development Apr 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants