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

Commit 63d3a0a

Browse files
author
SvenjaReißaus
committed
Minor improvements
1 parent 92e9ceb commit 63d3a0a

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed
-47 Bytes
Binary file not shown.

src/main/java/com/massivecraft/factions/listeners/FactionsBlockListener.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ public static boolean playerCanBuildDestroyBlock(Player player, Location locatio
9595
}
9696

9797
// Something failed prevent build
98-
SavageFactions.plugin.getLogger().info("Unable to determine fallback action for build permissions, defaulting to false");
9998
return false;
10099
}
101100

@@ -499,10 +498,10 @@ else if (landOwned && !myFaction.getOwnerListString(loc).contains(player.getName
499498
player.damage(Conf.actionDeniedPainAmount);
500499
me.msg("<b>It is painful to try to " + action + " in the territory of " + Board.getInstance().getFactionAt(loc).getTag(myFaction));
501500
}
502-
me.msg(TL.GENERIC_NOPERMISSION, action);
501+
me.msg("You cannot " + action + " in the territory of " + myFaction.getTag(me.getFaction()));
503502
return false;
504503
} else if (access == Access.ALLOW) return true;
505-
me.msg(TL.GENERIC_NOPERMISSION, action);
504+
me.msg("You cannot " + action + " in the territory of " + myFaction.getTag(me.getFaction()));
506505
return false;
507506
}
508507

src/main/java/com/massivecraft/factions/listeners/FactionsPlayerListener.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -751,15 +751,15 @@ public void onPlayerInteract(PlayerInteractEvent event) {
751751
if (Conf.territoryBypasssProtectedMaterials.contains(block.getType())) return;
752752

753753
if (block == null) return; // clicked in air, apparently
754-
754+
SavageFactions.plugin.log("Checking for material permission");
755755
if (GetPermissionFromUsableBlock(event.getMaterial()) == null) return;
756-
player.sendMessage("Checking if you can use that block");
756+
SavageFactions.plugin.log("Checking for use block permission");
757757
if (!canPlayerUseBlock(player, block, false)) {
758758
event.setCancelled(true);
759759
event.setUseInteractedBlock(Event.Result.DENY);
760760
return;
761761
}
762-
player.sendMessage("Checking if you can use that item");
762+
SavageFactions.plugin.log("Checking if you can use that item");
763763
if (!playerCanUseItemHere(player, block.getLocation(), event.getMaterial(), false)) {
764764
event.setCancelled(true);
765765
event.setUseInteractedBlock(Event.Result.DENY);
@@ -910,11 +910,11 @@ else if (landOwned && !myFaction.getOwnerListString(loc).contains(player.getName
910910
return false;
911911
} else if (!landOwned && access == Access.ALLOW) return true;
912912
else {
913-
me.msg(TL.GENERIC_NOPERMISSION, action);
913+
me.msg("You cannot " + action + " in the territory of " + myFaction.getTag(me.getFaction()));
914914
return false;
915915
}
916916
}
917-
me.msg(TL.GENERIC_NOPERMISSION, action);
917+
me.msg("You cannot " + action + " in the territory of " + myFaction.getTag(me.getFaction()));
918918
return false;
919919
}
920920
/// <summary>

0 commit comments

Comments
 (0)