Merge remote-tracking branch 'origin/1.6.x' into 1.6.x

This commit is contained in:
ProSavage 2019-01-02 23:12:09 -06:00
commit 909c2b9a9f
4 changed files with 27 additions and 19 deletions

View File

@ -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. If you would like to use the plugin as a dependency in your project, you can use maven.
```xml ```xml
<repository> <repositories>
<id>savagefactions-repo</id> <repository>
<url>https://cdn.jsdelivr.net/gh/ProSavage/SavageFactions@1.6.x/</url> <id>jitpack.io</id>
<releases> <url>https://jitpack.io</url>
<enabled>true</enabled> </repository>
</releases> </repositories>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<dependency> <dependency>
<groupId>com.massivecraft</groupId> <groupId>com.github.ProSavage</groupId>
<artifactId>Factions</artifactId> <artifactId>SavageFactions</artifactId>
<version>{version}</version> <version>1.6.x-0.1.21-gbdd5473-400</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </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` 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`

View File

@ -30,7 +30,7 @@ public class CmdDisband extends FCommand {
this.disableOnLock = true; this.disableOnLock = true;
senderMustBePlayer = false; senderMustBePlayer = false;
senderMustBeMember = false; senderMustBeMember = false;
senderMustBeModerator = false; senderMustBeModerator = false;
senderMustBeColeader = false; senderMustBeColeader = false;
@ -46,6 +46,19 @@ public class CmdDisband extends FCommand {
return; 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()) { if (!fme.isAdminBypassing()) {
Access access = faction.getAccess(fme, PermissableAction.DISBAND); Access access = faction.getAccess(fme, PermissableAction.DISBAND);
if (fme.getRole() != Role.LEADER && faction.getFPlayerLeader() != fme && access != Access.ALLOW) { if (fme.getRole() != Role.LEADER && faction.getFPlayerLeader() != fme && access != Access.ALLOW) {

View File

@ -168,7 +168,6 @@ public class FUpgradesGUI implements Listener {
case 2: size = SavageFactions.plugin.getConfig().getInt("fupgrades.MainMenu.Chest.Chest-Size.level-2"); break; 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; case 3: size = SavageFactions.plugin.getConfig().getInt("fupgrades.MainMenu.Chest.Chest-Size.level-3"); break;
} }
faction.setChestSize(size * 9); faction.setChestSize(size * 9);
} }

View File

@ -375,7 +375,7 @@ public abstract class MemoryFaction implements Faction, EconomyParticipator {
size = SavageFactions.plugin.getConfig().getInt("fupgrades.MainMenu.Chest.Chest-Size.level-3") * 9; 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; return chest;
} }
@ -385,7 +385,7 @@ public abstract class MemoryFaction implements Faction, EconomyParticipator {
@Override @Override
public void setChestSize(int chestSize) { public void setChestSize(int chestSize) {
ItemStack[] contents = this.getChestInventory().getContents(); 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); chest.setContents(contents);
} }