Skip to content
This repository was archived by the owner on Aug 2, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
92d2e7e
Organise imports
Derkades Jun 8, 2017
7cb8fbc
Remove bukkit API (spigot API includes bukkit)
Derkades Jun 8, 2017
d590eee
Better formatting of pom.xml
Derkades Jun 8, 2017
8d7983b
Remove / (why was this here in the first place?)
Derkades Jun 8, 2017
a2ccc89
Update to non-deprecated methods
Derkades Jun 8, 2017
efb7181
Ignore eclipse project files
Derkades Jun 8, 2017
b4bdc61
You don't need to check for command name
Derkades Jun 8, 2017
afc70cd
Send a message if the sender doesn't have permission
Derkades Jun 8, 2017
854cc8e
Update readme
Derkades Jun 8, 2017
5a625d1
Return false instead of sending message
Derkades Jun 8, 2017
f68ca20
Convert indentations to spaces
Derkades Jun 8, 2017
c1ac079
Remove unused import
Derkades Jun 8, 2017
5560a25
Move return true for better readability
Derkades Jun 8, 2017
48a73c7
Remove manifest file
Derkades Jun 8, 2017
0c44ed3
ammmmmmounts
Derkades Jun 8, 2017
3847319
Add backup prefix config option
Derkades Aug 13, 2019
d7aed86
Update branding
Derkades Aug 13, 2019
78cd51c
Target java 8
Derkades Aug 13, 2019
40096ab
Reorganising and formatting
Derkades Aug 13, 2019
07f7902
Use bukkit scheduler instead of java threads
Derkades Aug 13, 2019
0649b58
Move to util package
Derkades Aug 13, 2019
d09439e
Put comments with their options instead of together at the top of the…
Derkades Aug 13, 2019
da6c0f0
Compile against spigot 1.8.8
Derkades Aug 13, 2019
aec977a
Pom formatting and name change
Derkades Aug 13, 2019
8cd7d0e
Print world names instead of world objects
Derkades Aug 13, 2019
a810381
Delete old 'configuring' file
Derkades Aug 22, 2019
84dd638
Load config properly
Derkades Aug 23, 2019
0b33edb
Bump version
Derkades Aug 23, 2019
2eadd8f
Bump maven-compiler-plugin from 2.3.2 to 3.8.1
dependabot-preview[bot] Jul 26, 2020
48b63dc
Merge pull request #1 from Derkades/dependabot/maven/org.apache.maven…
Derkades Jul 26, 2020
fd0aa8d
Upgrade to GitHub-native Dependabot
dependabot-preview[bot] Apr 28, 2021
787aede
Merge pull request #2 from Derkades/dependabot/add-v2-config-file
Derkades Apr 29, 2021
04fbea8
Bump maven-compiler-plugin from 3.8.1 to 3.9.0
dependabot[bot] Jan 13, 2022
c9f9e88
Merge pull request #3 from Derkades/dependabot/maven/org.apache.maven…
Derkades Jan 13, 2022
5aef2f2
Bump maven-compiler-plugin from 3.9.0 to 3.10.0
dependabot[bot] Feb 15, 2022
33646ff
Merge pull request #4 from Derkades/dependabot/maven/org.apache.maven…
Derkades Feb 15, 2022
43e9b96
Bump maven-compiler-plugin from 3.10.0 to 3.10.1
dependabot[bot] Mar 11, 2022
19d15d9
Bump maven-compiler-plugin from 3.10.1 to 3.11.0
dependabot[bot] Feb 28, 2023
7f5311e
Bump org.apache.maven.plugins:maven-compiler-plugin (#7)
dependabot[bot] Dec 19, 2023
471c240
Bump org.apache.maven.plugins:maven-compiler-plugin (#8)
dependabot[bot] Dec 27, 2023
73462ca
Bump org.apache.maven.plugins:maven-compiler-plugin (#9)
dependabot[bot] Mar 21, 2024
f236934
Bump org.apache.maven.plugins:maven-compiler-plugin (#10)
dependabot[bot] Feb 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 10
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,10 @@
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
Thumbs.db
/bin/

.classpath
*.project
.settings/org.eclipse.jdt.core.prefs
*.prefs
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*CURRENT BUILD: Bukkit 1.10.x
CURRENT BUILD: Bukkit 1.12
================================
**Should work on 1.7-1.12**

Since simple save is no longer available, I was looking for a nice simple way to back up my server maps with minimal configuration. Just set the folder and the interval, and your away. Most of the plugins I found had too many features for such a simple task (in my own opinion) so I decided to create this little plugin.

Expand All @@ -13,7 +14,7 @@ Plus more features as development goes on, but not too many because this is a si

**Providing error reports:**

When pasting large ammounts of text please use [pastebin.com](http://pastebin.com). Its completely free and makes it easier for me to read any error messages you provide. You can even set it as a private paste so only people with the link can view it.
When pasting large amounts of text please use [pastebin.com](http://pastebin.com). Its completely free and makes it easier for me to read any error messages you provide. You can even set it as a private paste so only people with the link can view it.

Also provide your SimpleBackup **config file** when stating you have a problem, so I can see if that's the problem instead.

Expand Down
83 changes: 0 additions & 83 deletions configuring

This file was deleted.

103 changes: 54 additions & 49 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,50 +1,55 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.exolius.simplebackup</groupId>
<artifactId>SimpleBackup</artifactId>
<version>1.8</version>
<build>
<sourceDirectory>src</sourceDirectory>
<resources>
<resource>
<directory>src</directory>
<filtering>true</filtering>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependencies>
<!--Spigot API-->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.11.2-R0.1-SNAPSHOT/</version>
<scope>provided</scope>
</dependency>
<!--Bukkit API-->
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.11.2-R0.1-SNAPSHOT/</version>
<scope>provided</scope>
</dependency>
</dependencies>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh what happened here, did you like change spaces to tabs or something?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh woops, that's happens automatically.. I'll convert tabs back to spaces

<groupId>com.exolius.simplebackup</groupId>
<artifactId>simplebackup</artifactId>
<version>1.9.1</version>

<name>SimpleBackupReloaded</name>

<build>
<finalName>${project.name}-${project.version}</finalName>

<sourceDirectory>src</sourceDirectory>

<resources>
<resource>
<directory>src</directory>
<filtering>true</filtering>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>

<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.14.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>

<dependencies>
<!--Spigot API -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.8.8-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>

</project>
3 changes: 0 additions & 3 deletions src/META-INF/MANIFEST.MF

This file was deleted.

41 changes: 0 additions & 41 deletions src/com/exolius/simplebackup/BackupFileManager.java

This file was deleted.

21 changes: 11 additions & 10 deletions src/com/exolius/simplebackup/BackupHooks.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

public class BackupHooks {

public void notifyBackupCreated(String command, String filename) {
if(!command.isEmpty()) {
try {
ProcessBuilder pb = new ProcessBuilder(command, filename);
pb.start();
} catch(Exception ex) {

}
}
}
public void notifyBackupCreated(final String command, final String filename) {
if (!command.isEmpty()) {
try {
final ProcessBuilder pb = new ProcessBuilder(command, filename);
pb.start();
} catch (final Exception ex) {

}
}
}

}
27 changes: 10 additions & 17 deletions src/com/exolius/simplebackup/Commands.java
Original file line number Diff line number Diff line change
@@ -1,32 +1,25 @@
package com.exolius.simplebackup;

import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;

public class Commands implements CommandExecutor {
private SimpleBackup plugin;

public Commands(SimpleBackup plugin) {
private final SimpleBackup plugin;

public Commands(final SimpleBackup plugin) {
this.plugin = plugin;
}

/*-------------------------------------------------------
This is ran when the plugin command is sent by a player
--------------------------------------------------------*/
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (cmd.getName().equalsIgnoreCase("sbackup")) {
if (sender.hasPermission("simplebackup.use")) {
new Thread(new Runnable() {
@Override
public void run() {
plugin.doBackup();
}
}).start();
}
public boolean onCommand(final CommandSender sender, final Command cmd, final String label, final String[] args) {
if (sender.hasPermission("simplebackup.use")) {
Bukkit.getScheduler().runTaskAsynchronously(this.plugin, () -> Commands.this.plugin.doBackup());
return true;
} else {
return false;
}
return false;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're aware that returning false prints the usage message in plugin.yml, and if the player doesn't have permission, that can also be specified in the plugin.yml. Albeit he doesn't use it for the latter purpose, I don't really see the need to tell a player they don't have permission for a simple command like this (which the player shouldn't know about anyways...)

Feels more like a customization thing anyways.

}
}
}
45 changes: 0 additions & 45 deletions src/com/exolius/simplebackup/CopyBackup.java

This file was deleted.

Loading