Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

PR: Fixes issues with Permissions, and completes it's improvements #132

Merged
merged 22 commits into from Mar 19, 2019

Conversation

SvenjaReissaus
Copy link
Contributor

Feature and Bug Fixes Pull Request

This Pull Request addresses issues that started happening as a result of the latest bug fix, which gave permissions (aka /f perm) priority and total functionality over factions behavior. The fixes being addressed in this Pull Request are as follows:

  • An issue that Spammed a deny permission message when trying to right click a block inside a claim which didn't allowed to use ITEMS.
  • A slight issue which didn't showed the correct message when denied a permission.
  • A rare issue which bypassed CONTAINER permission, and allowed to open those.
  • Denies BUILD, DESTROY, and some basic permissions which allows interactions with blocks, by default.

More over, this pull request also brings improvements to code-quality, described as follows:

  • Separated methods, to check for permissions.
  • Separated method, to determine the corresponding permission for the usage of a block.
  • Almost complete rework of some important event handling.

And finally, a little feature:

  • Allow the use of certain materials widely, with Bypass Protection Materials available at conf.json. This features allows every faction player, the use of those items worldwide, overriding the factions' permissions. Please use this if needed, as it's supposed to be a HCF feature, and not an exploit.

Issues that helped to address this pull request

#130 Even though issue was being attended by the time of this submission, it can now be closed.
#129 This was about to come in the next release, which is now stable.
#127 This was because of an issue described above.
#109 Was addressed before, but yet not getting the expected behavior.

What has changed

Most noticeable changes can be found at FactionsPlayerListener.java and FactionsBlockListener.java, which contains most of the permission validations for the abilities to build, destroy, and use certain materials. This two files were modified about the 15% of it, and the re work has been successfully tested on a development server, giving the expected results.

Purpose of this Pull Request

The idea of this pull request was mainly to address all of the issues left by the latest merge, which applied security patches on permission usage. This changes are important for a coherent behavior of factions, and it's customization by the users of it. But this is also part of a enhancement process, to improve code-quality and readability of the source code.

BEFORE UPDATING

Please note that the state of this pull request, contains sensitive changes that may affect the gameplay if you are updating from a previous release. So please consider the following when trying to update:

  • Protected Materials, available in the Config.JSON file, will no longer be needed to, or more likely, must not, have any CONTAINER nor MATERIAL that you WANT players to use, for example, this config by default had Containers on it's value, such as Chests, Furnances, Doors, and others. You should REMOVE this Materials if you want your players to use them. Fresh installs of the Plugin will not require this process, since those materials are not parsed to the values anymore. SavageFactions denies the usage of such materials by default, through Factions Permissions (aka /f perm), and shall then be modified through it.
  • Protected Materials are now Materials that you DON'T WANT Players to use, in Faction Claimed land. This config comes by default with the BEACON material, please remove it if you want your players to use it.
  • Bypass Protection Materials: This materials bypass any permissions that is managed by Savage Factions, for example: Any Material listed there will be able to be used in Faction Land, Wilderness, Safezone, and Warzone, regardless of permissions. This is helpful, if you want players to open chests everywhere, without needing the permission to (HCF).

@SvenjaReissaus SvenjaReissaus added this to In progress in SavageFactions via automation Mar 19, 2019
@prosavage
Copy link
Member

U mad lad.

@prosavage
Copy link
Member

Can I check it out tomorrow

@prosavage prosavage merged commit b1afbbf into 1.6.x Mar 19, 2019
SavageFactions automation moved this from In progress to Done Mar 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants