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

Commit

Permalink
Merge remote-tracking branch 'origin/1.6.x' into 1.6.x
Browse files Browse the repository at this point in the history
  • Loading branch information
prosavage committed Jan 3, 2019
2 parents d6a0be7 + c45ee75 commit 909c2b9
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 20 deletions.
28 changes: 12 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,18 @@ The video can be found [here](https://www.youtube.com/watch?v=fnDwjA2gX-E).
If you would like to use the plugin as a dependency in your project, you can use maven.

```xml
<repository>
<id>savagefactions-repo</id>
<url>https://cdn.jsdelivr.net/gh/ProSavage/SavageFactions@1.6.x/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>

<dependency>
<groupId>com.massivecraft</groupId>
<artifactId>Factions</artifactId>
<version>{version}</version>
<scope>provided</scope>
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>

<dependency>
<groupId>com.github.ProSavage</groupId>
<artifactId>SavageFactions</artifactId>
<version>1.6.x-0.1.21-gbdd5473-400</version>
<scope>provided</scope>
</dependency>
```
The {version} has to be replaced with a version you find in the [mvn-repo](https://github.com/ProSavage/SavageFactions/tree/1.6.x/mvn-repo/com/massivecraft/Factions) folder. An example version that can be used is: `1.6.9.5-U0.2.1-RC-1.5-BETA`
Expand Down
15 changes: 14 additions & 1 deletion src/main/java/com/massivecraft/factions/cmd/CmdDisband.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public CmdDisband() {
this.disableOnLock = true;


senderMustBePlayer = false;
senderMustBePlayer = false;
senderMustBeMember = false;
senderMustBeModerator = false;
senderMustBeColeader = false;
Expand All @@ -46,6 +46,19 @@ public void perform() {
return;
}

boolean isMyFaction = fme != null && faction == myFaction;

if (isMyFaction) {
if (!assertMinRole(Role.LEADER)) {
return;
}
} else {
if (!Permission.DISBAND_ANY.has(sender, true)) {
return;
}
}


if (!fme.isAdminBypassing()) {
Access access = faction.getAccess(fme, PermissableAction.DISBAND);
if (fme.getRole() != Role.LEADER && faction.getFPlayerLeader() != fme && access != Access.ALLOW) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ private void updateChests(Faction faction) {
case 2: size = SavageFactions.plugin.getConfig().getInt("fupgrades.MainMenu.Chest.Chest-Size.level-2"); break;
case 3: size = SavageFactions.plugin.getConfig().getInt("fupgrades.MainMenu.Chest.Chest-Size.level-3"); break;
}

faction.setChestSize(size * 9);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ public Inventory getChestInventory() {
size = SavageFactions.plugin.getConfig().getInt("fupgrades.MainMenu.Chest.Chest-Size.level-3") * 9;
}

chest = Bukkit.createInventory(null, size);
chest = Bukkit.createInventory(null, size, SavageFactions.plugin.color(SavageFactions.plugin.getConfig().getString("fchest.Inventory-Title")));
return chest;

}
Expand All @@ -385,7 +385,7 @@ public Inventory getChestInventory() {
@Override
public void setChestSize(int chestSize) {
ItemStack[] contents = this.getChestInventory().getContents();
chest = Bukkit.createInventory(null, chestSize);
chest = Bukkit.createInventory(null, chestSize, SavageFactions.plugin.color(SavageFactions.plugin.getConfig().getString("fchest.Inventory-Title")));
chest.setContents(contents);
}

Expand Down

0 comments on commit 909c2b9

Please sign in to comment.