Skip to content

Commit

Permalink
Merge pull request #35 from Wertik/3.10.7
Browse files Browse the repository at this point in the history
3.10.7
  • Loading branch information
Wertik authored Jun 26, 2023
2 parents f24bc13 + 030c0a1 commit c60567a
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 42 deletions.
4 changes: 2 additions & 2 deletions blockregen-ancient/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>BlockRegen</artifactId>
<groupId>nl.aurorion.blockregen</groupId>
<version>3.10.6</version>
<version>3.10.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -20,7 +20,7 @@
<dependency>
<groupId>nl.aurorion.blockregen</groupId>
<artifactId>blockregen-version</artifactId>
<version>3.10.6</version>
<version>3.10.7</version>
<scope>compile</scope>
</dependency>

Expand Down
2 changes: 1 addition & 1 deletion blockregen-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>BlockRegen</artifactId>
<groupId>nl.aurorion.blockregen</groupId>
<version>3.10.6</version>
<version>3.10.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
4 changes: 2 additions & 2 deletions blockregen-legacy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>BlockRegen</artifactId>
<groupId>nl.aurorion.blockregen</groupId>
<version>3.10.6</version>
<version>3.10.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -14,7 +14,7 @@
<dependency>
<groupId>nl.aurorion.blockregen</groupId>
<artifactId>blockregen-version</artifactId>
<version>3.10.6</version>
<version>3.10.7</version>
<scope>compile</scope>
</dependency>

Expand Down
30 changes: 15 additions & 15 deletions blockregen-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>BlockRegen</artifactId>
<groupId>nl.aurorion.blockregen</groupId>
<version>3.10.6</version>
<version>3.10.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -76,27 +76,34 @@
<dependency>
<groupId>nl.aurorion.blockregen</groupId>
<artifactId>blockregen-common</artifactId>
<version>3.10.6</version>
<version>3.10.7</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>nl.aurorion.blockregen</groupId>
<artifactId>blockregen-version</artifactId>
<version>3.10.6</version>
<version>3.10.7</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>nl.aurorion.blockregen</groupId>
<artifactId>blockregen-legacy</artifactId>
<version>3.10.6</version>
<version>3.10.7</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>nl.aurorion.blockregen</groupId>
<artifactId>blockregen-ancient</artifactId>
<version>3.10.6</version>
<version>3.10.7</version>
<scope>compile</scope>
</dependency>
<!-- Spigot API -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<!-- Gson -->
<dependency>
<groupId>com.google.code.gson</groupId>
Expand All @@ -110,25 +117,18 @@
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<!-- Spigot API -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.17.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<!-- WorldEdit -->
<dependency>
<groupId>com.sk89q.worldedit</groupId>
<artifactId>worldedit-bukkit</artifactId>
<version>7.2.8</version>
<version>7.2.15</version>
<scope>provided</scope>
</dependency>
<!-- WorldGuard -->
<dependency>
<groupId>com.sk89q.worldguard</groupId>
<artifactId>worldguard-bukkit</artifactId>
<version>7.0.6</version>
<version>7.0.8</version>
<scope>provided</scope>
</dependency>
<!-- Residence -->
Expand All @@ -142,7 +142,7 @@
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.10.9</version>
<version>2.11.3</version>
<scope>provided</scope>
</dependency>
<!-- Towny Advanced -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N

switch (args[0].toLowerCase()) {
case "reload":
if (!sender.hasPermission("blockregen.admin")) {
if (!sender.hasPermission("blockregen.reload")) {
Message.NO_PERM.send(sender);
return false;
}
Expand All @@ -94,12 +94,13 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N
}
break;
case "check":
if (checkConsole(sender))
if (checkConsole(sender)) {
return false;
}

player = (Player) sender;

if (!player.hasPermission("blockregen.datacheck")) {
if (!player.hasPermission("blockregen.check")) {
Message.NO_PERM.send(player);
return false;
}
Expand All @@ -117,6 +118,11 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N

player = (Player) sender;

if (!player.hasPermission("blockregen.tools")) {
Message.NO_PERM.send(player);
return false;
}

ItemStack shovel = XMaterial.WOODEN_SHOVEL.parseItem();

ItemMeta meta = shovel.getItemMeta();
Expand Down Expand Up @@ -148,6 +154,11 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N

player = (Player) sender;

if (!player.hasPermission("blockregen.region")) {
Message.NO_PERM.send(player);
return false;
}

if (args.length > 1) {
sender.sendMessage(Message.TOO_MANY_ARGS.get(player)
.replace("%help%", String.format("/%s regions", label)));
Expand Down Expand Up @@ -179,7 +190,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N

player = (Player) sender;

if (!player.hasPermission("blockregen.admin")) {
if (!player.hasPermission("blockregen.region")) {
player.sendMessage(Message.NO_PERM.get(player));
return false;
}
Expand Down Expand Up @@ -436,6 +447,11 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N
case "regen": {
// /blockregen regen -p preset -w world -r region

if (!sender.hasPermission("blockregen.regen")) {
Message.NO_PERM.send(sender);
return false;
}

String[] workArgs = Arrays.copyOfRange(args, 1, args.length);

BlockPreset preset = null;
Expand Down Expand Up @@ -476,6 +492,11 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N
break;
}
case "debug":
if (!sender.hasPermission("blockregen.debug")) {
Message.NO_PERM.send(sender);
return false;
}

if (!(sender instanceof Player)) {
sender.sendMessage(Message.ONLY_PLAYERS.get());
return false;
Expand All @@ -502,11 +523,16 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N
}
break;
case "discord":
if (!sender.hasPermission("blockregen.admin")) {
Message.NO_PERM.send(sender);
return false;
}

sender.sendMessage(StringUtil.color("&8&m &3 BlockRegen Discord Server" +
"\n&6>> &7https://discord.gg/ZCxMca5"));
break;
case "events":
if (!sender.hasPermission("blockregen.admin")) {
if (!sender.hasPermission("blockregen.events")) {
sender.sendMessage(Message.NO_PERM.get());
return false;
}
Expand Down Expand Up @@ -576,8 +602,9 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N
}
}
break;
default:
default: {
sendHelp(sender, label);
}
}
return false;
}
Expand Down
38 changes: 29 additions & 9 deletions blockregen-plugin/src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,35 @@ commands:
description: Main plugin command
permissions:
blockregen.admin:
description: Gives access to admin commands
description: Gives access to admin commands.
default: op
children:
blockregen.tools: true
blockregen.debug: true
blockregen.bypass: true
blockregen.check: true
blockregen.select: true
blockregen.region: true
blockregen.regen: true
blockregen.events: true

blockregen.tools:
description: Allows player to get tools.
blockregen.debug:
description: Allows player to get tools.
blockregen.bypass:
description: Allows player to use the bypass
blockregen.datacheck:
description: Allows player to use the data check
blockregen.block.*:
default: true
description: Gives player the ability to mine ores
description: Allows player to use the bypass.
blockregen.check:
description: Allows player to use the block check.
blockregen.select:
description: Allows player to select locations for regions
description: Allows player to select locations for regions.
blockregen.region:
description: Allows player to select presets for regions
description: Allows player to select presets for regions.
blockregen.regen:
description: Allows player to regenerate running processes.
blockregen.events:
description: Allows access to event commands.

blockregen.block.*:
default: true
description: Gives player the ability to mine ores.
4 changes: 2 additions & 2 deletions blockregen-version/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>BlockRegen</artifactId>
<groupId>nl.aurorion.blockregen</groupId>
<version>3.10.6</version>
<version>3.10.7</version>
</parent>

<artifactId>blockregen-version</artifactId>
Expand All @@ -16,7 +16,7 @@
<dependency>
<groupId>nl.aurorion.blockregen</groupId>
<artifactId>blockregen-common</artifactId>
<version>3.10.6</version>
<version>3.10.7</version>
<scope>compile</scope>
</dependency>
<!-- Spigot API -->
Expand Down
9 changes: 4 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>nl.aurorion.blockregen</groupId>
<artifactId>BlockRegen</artifactId>
<version>3.10.6</version>
<version>3.10.7</version>
<modules>
<module>blockregen-version</module>
<module>blockregen-common</module>
Expand Down Expand Up @@ -84,21 +84,20 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<version>1.18.26</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>23.0.0</version>
<version>24.0.1</version>
<scope>compile</scope>
</dependency>
<!-- Official XSeries release -->
<dependency>
<groupId>com.github.cryptomorin</groupId>
<artifactId>XSeries</artifactId>
<!-- Latest XSeries compiled and deployed under different version to nexus.devport.space, need a fix that's not released yet. -->
<version>8.8.1-SNAPSHOT</version>
<version>9.4.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down

0 comments on commit c60567a

Please sign in to comment.