Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.md
  • Loading branch information
TechnicallyCoded committed Mar 10, 2022
2 parents 3e87c98 + 8a81828 commit 982a64b
Show file tree
Hide file tree
Showing 16 changed files with 220 additions and 131 deletions.
4 changes: 2 additions & 2 deletions InventoryRollbackPlus.iml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot-api:1.18-pre8-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot-api:1.18.1-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: commons-lang:commons-lang:2.6" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.guava:guava:31.0.1-jre" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.guava:failureaccess:1.0.1" level="project" />
Expand All @@ -36,7 +36,7 @@
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.j2objc:j2objc-annotations:1.3" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.code.gson:gson:2.8.8" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-chat:1.16-R0.4" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.yaml:snakeyaml:1.28" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.yaml:snakeyaml:1.30" level="project" />
<orderEntry type="library" name="Maven: org.bstats:bstats-bukkit:2.2.1" level="project" />
<orderEntry type="library" name="Maven: org.bstats:bstats-base:2.2.1" level="project" />
<orderEntry type="library" name="Maven: io.papermc:paperlib:1.0.6" level="project" />
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
![](https://github.com/TechnicallyCoded/Inventory-Rollback/blob/master/icons/inventoryrollbackplus_icon_128.png?raw=true)
# InventoryRollbackPlus

***WARNING***: This plugin is open source but NOT free to use as you wish. Read the [LICENSE](https://github.com/TechnicallyCoded/Inventory-Rollback/blob/main/LICENSE) before downloading this code.
*(If I choose to stop maintaining this plugin, the LICENSE may change to allow further development, but that is not a guarantee and will not happen anytime soon since I am still actively developing this plugin)*

### Introduction

**Description**
Expand Down Expand Up @@ -49,16 +46,21 @@ You can change these values in the configuration file.

**Permissions**

- inventoryrollback.viewbackups - (Default: OP) Allow /ir restore command (without ability to give items back)
- inventoryrollback.restore - (Default: OP) Allow /ir restore command
- inventoryrollback.restore.teleport - (Default: OP) Allow player to teleport to location of backup
- inventoryrollback.forcebackup - (Default: OP) Allow /ir forcebackup command
- inventoryrollback.enable - (Default: OP) Allow /ir enable command
- inventoryrollback.disable - (Default: OP) Allow /ir disable command
- inventoryrollback.reload - (Default: OP) Allow /ir reload command
- inventoryrollback.adminalerts - (Default: OP) Allow viewing important information for admins when they join

- inventoryrollback.deathsave - (Default: All) Allow backup on death
- inventoryrollback.joinsave - (Default: All) Allow backup on join
- inventoryrollback.leavesave - (Default: All) Allow backup on leave
- inventoryrollback.worldchangesave - (Default: All) Allow backup on world change
- inventoryrollback.help - (Default: All) Allow viewing the help message of the plugin
- inventoryrollback.version - (Default: All) Allow viewing version of the plugin

## Spigot Link
[https://www.spigotmc.org/resources/85811/](https://www.spigotmc.org/resources/85811/)
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.nuclyon.technicallycoded.inventoryrollback</groupId>
<artifactId>InventoryRollbackPlus</artifactId>
<version>1.6.5</version>
<version>1.6.6</version>
<packaging>jar</packaging>
<name>InventoryRollbackPlus</name>
<url>https://github.com/TechnicallyCoded/Inventory-Rollback-Plus/</url>
Expand Down Expand Up @@ -38,7 +38,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.18-pre8-R0.1-SNAPSHOT</version>
<version>1.18.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<!-- bStats API -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public DisableSubCmd(InventoryRollbackPlus mainIn) {

@Override
public void onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (sender.hasPermission("inventoryrollbackplus.disable") || sender.hasPermission("inventoryrollback.disable")) {
if (sender.hasPermission("inventoryrollbackplus.disable")) {
ConfigData.setEnabled(false);
main.getConfigData().saveConfig();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public EnableSubCmd(InventoryRollbackPlus mainIn) {

@Override
public void onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (sender.hasPermission("inventoryrollbackplus.enable") || sender.hasPermission("inventoryrollback.enable")) {
if (sender.hasPermission("inventoryrollbackplus.enable")) {
main.getConfigData().setEnabled(true);
main.getConfigData().saveConfig();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public ForceBackupSubCmd(InventoryRollbackPlus mainIn) {

@Override
public void onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (sender.hasPermission("inventoryrollbackplus.forcebackup") || sender.hasPermission("inventoryrollback.forcebackup")) {
if (sender.hasPermission("inventoryrollbackplus.forcebackup")) {
if (args.length == 1 || args.length > 3) {
sender.sendMessage(MessageData.getPluginPrefix() + MessageData.getError());
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public HelpSubCmd(InventoryRollbackPlus mainIn) {

@Override
public void onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (sender.hasPermission("inventoryrollbackplus.help") || sender.hasPermission("inventoryrollback.help")) {
if (sender.hasPermission("inventoryrollbackplus.help")) {
this.sendHelp(sender);
} else {
sender.sendMessage(MessageData.getPluginPrefix() + MessageData.getNoPermission());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public ReloadSubCmd(InventoryRollbackPlus mainIn) {

@Override
public void onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (sender.hasPermission("inventoryrollbackplus.reload") || sender.hasPermission("inventoryrollback.reload")) {
if (sender.hasPermission("inventoryrollbackplus.reload")) {
main.startupTasks();

sender.sendMessage(MessageData.getPluginPrefix() + MessageData.getPluginReload());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public RestoreSubCmd(InventoryRollbackPlus mainIn) {
@Override
public void onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (sender instanceof Player) {
if (sender.hasPermission("inventoryrollbackplus.restore") || sender.hasPermission("inventoryrollback.restore")) {
if (sender.hasPermission("inventoryrollbackplus.viewbackups")) {
if (!ConfigData.isEnabled()) {
sender.sendMessage(MessageData.getPluginPrefix() + MessageData.getPluginDisabled());
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public VersionSubCmd(InventoryRollbackPlus mainIn) {
@Override
public void onCommand(CommandSender sender, Command cmd, String label, String[] args) {
StringBuilder strb = new StringBuilder(MessageData.getPluginPrefix());
boolean hasVersionPerm = sender.hasPermission("inventoryrollbackplus.version") || sender.hasPermission("inventoryrollback.version");
boolean hasVersionPerm = sender.hasPermission("inventoryrollbackplus.version");

strb.append("\n")
.append(ChatColor.WHITE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ public enum EnumNmsVersion {
v1_16_R2,
v1_16_R3,
v1_17_R1,
v1_18_R1;
v1_18_R1,
v1_18_R2;

public boolean isAtLeast(EnumNmsVersion version) {
return this.ordinal() >= version.ordinal();
Expand Down
Loading

0 comments on commit 982a64b

Please sign in to comment.