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

Commit

Permalink
Merge pull request #100 from FlowZz99/1.6.x
Browse files Browse the repository at this point in the history
Fix Max-Relation bug

Thanks for the help, Ive been sick so I havent had time to work on this stuff!
  • Loading branch information
prosavage authored Feb 17, 2019
2 parents 707b779 + e0c3ce1 commit 83b6b0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private boolean hasMaxRelations(Faction them, Relation targetRelation) {
msg(TL.COMMAND_RELATIONS_EXCEEDS_ME, max, targetRelation.getPluralTranslation());
return true;
}
if (them.getRelationCount(targetRelation) > max) {
if (them.getRelationCount(targetRelation) >= max) {
msg(TL.COMMAND_RELATIONS_EXCEEDS_THEY, max, targetRelation.getPluralTranslation());
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import com.massivecraft.factions.struct.Relation;
import com.massivecraft.factions.struct.Role;
import com.massivecraft.factions.util.FactionGUI;
import com.massivecraft.factions.util.MultiversionMaterials;
import com.massivecraft.factions.util.VisualizeUtil;
import com.massivecraft.factions.zcore.fperms.Access;
import com.massivecraft.factions.zcore.fperms.PermissableAction;
Expand Down Expand Up @@ -951,7 +952,7 @@ public void onPlayerInteract(PlayerInteractEvent event) {
public void onPlayerBoneMeal(PlayerInteractEvent event) {
Block block = event.getClickedBlock();

if (event.getAction() == Action.RIGHT_CLICK_BLOCK && block.getType() == Material.GRASS_BLOCK
if (event.getAction() == Action.RIGHT_CLICK_BLOCK && block.getType() == MultiversionMaterials.GRASS_BLOCK.parseMaterial()
&& event.hasItem() && event.getItem().getType() == Material.BONE_MEAL) {
if (!FactionsBlockListener.playerCanBuildDestroyBlock(event.getPlayer(), block.getLocation(), PermissableAction.BUILD.name(), true)) {
FPlayer me = FPlayers.getInstance().getById(event.getPlayer().getUniqueId().toString());
Expand Down

0 comments on commit 83b6b0c

Please sign in to comment.