Merge branch 'development'

This commit is contained in:
Brianna 2021-01-11 12:18:11 -06:00
commit aee6494a25
11 changed files with 50 additions and 50 deletions

View File

@ -2,7 +2,7 @@
<groupId>com.songoda</groupId>
<artifactId>UltimateModeration</artifactId>
<modelVersion>4.0.0</modelVersion>
<version>2.0.3</version>
<version>2.0.4</version>
<build>
<defaultGoal>clean install</defaultGoal>
<finalName>UltimateModeration-${project.version}</finalName>

View File

@ -60,13 +60,13 @@ public class MainGui extends Gui {
ItemStack glass3 = GuiUtils.getBorderItem(Settings.GLASS_TYPE_3.getMaterial(CompatibleMaterial.LIGHT_BLUE_STAINED_GLASS_PANE));
// edges will be type 3
GuiUtils.mirrorFill(this, 0, 2, true, true, glass3);
GuiUtils.mirrorFill(this, 1, 1, true, true, glass3);
mirrorFill(0, 2, true, true, glass3);
mirrorFill(1, 1, true, true, glass3);
// decorate corners with type 2
GuiUtils.mirrorFill(this, 0, 0, true, true, glass2);
GuiUtils.mirrorFill(this, 1, 0, true, true, glass2);
GuiUtils.mirrorFill(this, 0, 1, true, true, glass2);
mirrorFill(0, 0, true, true, glass2);
mirrorFill(1, 0, true, true, glass2);
mirrorFill(0, 1, true, true, glass2);
setButton(5, 2, GuiUtils.createButtonItem(CompatibleMaterial.ENDER_PEARL,
plugin.getLocale().getMessage("gui.players.search").getMessage()),

View File

@ -28,14 +28,14 @@ public class ModerateGui extends Gui {
ItemStack glass3 = GuiUtils.getBorderItem(Settings.GLASS_TYPE_3.getMaterial(CompatibleMaterial.LIGHT_BLUE_STAINED_GLASS_PANE));
// edges will be type 3
GuiUtils.mirrorFill(this, 0, 2, true, true, glass3);
GuiUtils.mirrorFill(this, 1, 1, true, true, glass3);
mirrorFill(0, 2, true, true, glass3);
mirrorFill(1, 1, true, true, glass3);
// decorate corners with type 2
GuiUtils.mirrorFill(this, 0, 0, true, true, glass2);
GuiUtils.mirrorFill(this, 1, 0, true, true, glass2);
GuiUtils.mirrorFill(this, 2, 0, false, true, glass2);
GuiUtils.mirrorFill(this, 0, 1, true, true, glass2);
mirrorFill(0, 0, true, true, glass2);
mirrorFill(1, 0, true, true, glass2);
mirrorFill(2, 0, false, true, glass2);
mirrorFill(0, 1, true, true, glass2);
setButton(8, GuiUtils.createButtonItem(CompatibleMaterial.OAK_DOOR,
plugin.getLocale().getMessage("gui.general.back").getMessage()),

View File

@ -62,13 +62,13 @@ public class NotesManagerGui extends Gui {
ItemStack glass3 = GuiUtils.getBorderItem(Settings.GLASS_TYPE_3.getMaterial(CompatibleMaterial.LIGHT_BLUE_STAINED_GLASS_PANE));
// edges will be type 3
GuiUtils.mirrorFill(this, 0, 2, true, true, glass3);
GuiUtils.mirrorFill(this, 1, 1, true, true, glass3);
mirrorFill(0, 2, true, true, glass3);
mirrorFill(1, 1, true, true, glass3);
// decorate corners with type 2
GuiUtils.mirrorFill(this, 0, 0, true, true, glass2);
GuiUtils.mirrorFill(this, 1, 0, true, true, glass2);
GuiUtils.mirrorFill(this, 0, 1, true, true, glass2);
mirrorFill(0, 0, true, true, glass2);
mirrorFill(1, 0, true, true, glass2);
mirrorFill(0, 1, true, true, glass2);
setButton(5, 5, GuiUtils.createButtonItem(CompatibleMaterial.OAK_DOOR,
plugin.getLocale().getMessage("gui.general.back").getMessage()),

View File

@ -32,13 +32,13 @@ public class PlayerGui extends Gui {
ItemStack glass3 = GuiUtils.getBorderItem(Settings.GLASS_TYPE_3.getMaterial(CompatibleMaterial.LIGHT_BLUE_STAINED_GLASS_PANE));
// edges will be type 3
GuiUtils.mirrorFill(this, 0, 2, true, true, glass3);
GuiUtils.mirrorFill(this, 1, 1, true, true, glass3);
mirrorFill(0, 2, true, true, glass3);
mirrorFill(1, 1, true, true, glass3);
// decorate corners with type 2
GuiUtils.mirrorFill(this, 0, 0, true, true, glass2);
GuiUtils.mirrorFill(this, 1, 0, true, true, glass2);
GuiUtils.mirrorFill(this, 0, 1, true, true, glass2);
mirrorFill(0, 0, true, true, glass2);
mirrorFill(1, 0, true, true, glass2);
mirrorFill(0, 1, true, true, glass2);
ItemStack head = ItemUtils.getPlayerSkull(toModerate);

View File

@ -72,14 +72,14 @@ public class PunishGui extends Gui {
ItemStack glass3 = GuiUtils.getBorderItem(Settings.GLASS_TYPE_3.getMaterial(CompatibleMaterial.LIGHT_BLUE_STAINED_GLASS_PANE));
// edges will be type 3
GuiUtils.mirrorFill(this, 0, 2, true, true, glass3);
GuiUtils.mirrorFill(this, 1, 1, true, true, glass3);
mirrorFill(0, 2, true, true, glass3);
mirrorFill(1, 1, true, true, glass3);
// decorate corners with type 2
GuiUtils.mirrorFill(this, 0, 0, true, true, glass2);
GuiUtils.mirrorFill(this, 1, 0, true, true, glass2);
GuiUtils.mirrorFill(this, 2, 0, false, true, glass2);
GuiUtils.mirrorFill(this, 0, 1, true, true, glass2);
mirrorFill(0, 0, true, true, glass2);
mirrorFill(1, 0, true, true, glass2);
mirrorFill(2, 0, false, true, glass2);
mirrorFill(0, 1, true, true, glass2);
if (toModerate != null)
setItem(13, GuiUtils.createButtonItem(ItemUtils.getPlayerSkull(toModerate),

View File

@ -53,13 +53,13 @@ public class PunishmentsGui extends Gui {
ItemStack glass3 = GuiUtils.getBorderItem(Settings.GLASS_TYPE_3.getMaterial(CompatibleMaterial.LIGHT_BLUE_STAINED_GLASS_PANE));
// edges will be type 3
GuiUtils.mirrorFill(this, 0, 2, true, true, glass3);
GuiUtils.mirrorFill(this, 1, 1, true, true, glass3);
mirrorFill(0, 2, true, true, glass3);
mirrorFill(1, 1, true, true, glass3);
// decorate corners with type 2
GuiUtils.mirrorFill(this, 0, 0, true, true, glass2);
GuiUtils.mirrorFill(this, 1, 0, true, true, glass2);
GuiUtils.mirrorFill(this, 0, 1, true, true, glass2);
mirrorFill(0, 0, true, true, glass2);
mirrorFill(1, 0, true, true, glass2);
mirrorFill(0, 1, true, true, glass2);
PlayerPunishData playerPunishData = plugin.getPunishmentManager().getPlayer(toModerate);

View File

@ -53,13 +53,13 @@ public class TemplateManagerGui extends Gui {
ItemStack glass3 = GuiUtils.getBorderItem(Settings.GLASS_TYPE_3.getMaterial(CompatibleMaterial.LIGHT_BLUE_STAINED_GLASS_PANE));
// edges will be type 3
GuiUtils.mirrorFill(this, 0, 2, true, true, glass3);
GuiUtils.mirrorFill(this, 1, 1, true, true, glass3);
mirrorFill(0, 2, true, true, glass3);
mirrorFill(1, 1, true, true, glass3);
// decorate corners with type 2
GuiUtils.mirrorFill(this, 0, 0, true, true, glass2);
GuiUtils.mirrorFill(this, 1, 0, true, true, glass2);
GuiUtils.mirrorFill(this, 0, 1, true, true, glass2);
mirrorFill(0, 0, true, true, glass2);
mirrorFill(1, 0, true, true, glass2);
mirrorFill(0, 1, true, true, glass2);
setButton(5, 3, GuiUtils.createButtonItem(CompatibleMaterial.DIAMOND_SWORD, Methods.formatText("&6" + punishmentType.name())),
(event) -> {

View File

@ -64,13 +64,13 @@ public class TicketGui extends Gui {
ItemStack glass3 = GuiUtils.getBorderItem(Settings.GLASS_TYPE_3.getMaterial(CompatibleMaterial.LIGHT_BLUE_STAINED_GLASS_PANE));
// edges will be type 3
GuiUtils.mirrorFill(this, 0, 2, true, true, glass3);
GuiUtils.mirrorFill(this, 1, 1, true, true, glass3);
mirrorFill(0, 2, true, true, glass3);
mirrorFill(1, 1, true, true, glass3);
// decorate corners with type 2
GuiUtils.mirrorFill(this, 0, 0, true, true, glass2);
GuiUtils.mirrorFill(this, 1, 0, true, true, glass2);
GuiUtils.mirrorFill(this, 0, 1, true, true, glass2);
mirrorFill(0, 0, true, true, glass2);
mirrorFill(1, 0, true, true, glass2);
mirrorFill(0, 1, true, true, glass2);
// enable page event
setNextPage(4, 7, GuiUtils.createButtonItem(CompatibleMaterial.ARROW, plugin.getLocale().getMessage("gui.general.next").getMessage()));

View File

@ -61,13 +61,13 @@ public class TicketManagerGui extends Gui {
ItemStack glass3 = GuiUtils.getBorderItem(Settings.GLASS_TYPE_3.getMaterial(CompatibleMaterial.LIGHT_BLUE_STAINED_GLASS_PANE));
// edges will be type 3
GuiUtils.mirrorFill(this, 0, 2, true, true, glass3);
GuiUtils.mirrorFill(this, 1, 1, true, true, glass3);
mirrorFill(0, 2, true, true, glass3);
mirrorFill(1, 1, true, true, glass3);
// decorate corners with type 2
GuiUtils.mirrorFill(this, 0, 0, true, true, glass2);
GuiUtils.mirrorFill(this, 1, 0, true, true, glass2);
GuiUtils.mirrorFill(this, 0, 1, true, true, glass2);
mirrorFill(0, 0, true, true, glass2);
mirrorFill(1, 0, true, true, glass2);
mirrorFill(0, 1, true, true, glass2);
// enable page event
setNextPage(4, 7, GuiUtils.createButtonItem(CompatibleMaterial.ARROW, plugin.getLocale().getMessage("gui.general.next").getMessage()));

View File

@ -27,7 +27,7 @@ public abstract class AbstractModeration {
public abstract String getDescription();
public String getPermission() {
return "ultimatemoderation." + getType().name().toLowerCase();
return "um." + getProper().toLowerCase();
}
public boolean hasPermission(Player player) {
@ -35,7 +35,7 @@ public abstract class AbstractModeration {
}
public boolean isExempt(OfflinePlayer player) {
return VaultPermissions.hasPermission(player, "ultimatemoderation." + getType().name().toLowerCase() + ".exempt");
return VaultPermissions.hasPermission(player, getPermission() + ".exempt");
}
protected void registerCommand(UltimateModeration plugin) {