diff options
| -rw-r--r-- | README.md | 6 | ||||
| -rw-r--r-- | build.gradle | 5 | ||||
| -rw-r--r-- | src/main/java/com/MylesAndMore/Tumble/Main.java | 10 | ||||
| -rw-r--r-- | src/main/resources/plugin.yml | 5 | 
4 files changed, 22 insertions, 4 deletions
| @@ -20,7 +20,7 @@ If you've never heard of it, [Tumble](https://minecraft-archive.fandom.com/wiki/  ## Setup -1. Simply [download](https://github.com/MylesAndMore/tumble/releases) the plugin's JAR file and place it in your server's plugins directory.   +1. Simply [download](https://github.com/MylesAndMore/Tumble/releases) the plugin's JAR file and place it in your server's plugins directory.        - *Note: Multiverse is also required for the plugin to run, you may download it [here](https://www.spigotmc.org/resources/multiverse-core.390/).*   @@ -36,7 +36,7 @@ If you've never heard of it, [Tumble](https://minecraft-archive.fandom.com/wiki/  Scroll down for more options to configure your game.   -## Commands +## Commands/Permissions  - ```/tumble:reload``` @@ -59,6 +59,8 @@ Scroll down for more options to configure your game.    - *Description:* Configures the auto start functions of Tumble.    - *Usage:* ```/tumble:autostart <playerAmount> [enable|disable]```    - *Permission:* ```tumble.autostart``` +- *Permission:* ```tumble.update``` +  - Players with this permission will receive a notification upon joining if Tumble is out of date.  ## Configuration   diff --git a/build.gradle b/build.gradle index c5c2913..8791ad3 100644 --- a/build.gradle +++ b/build.gradle @@ -14,12 +14,14 @@ repositories {      maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }      maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }      maven { url "https://repo.onarandombox.com/content/groups/public/" } +    maven { url "https://repo.jeff-media.com/public/"}  }  dependencies {      compileOnly('org.spigotmc:spigot-api:1.19.2-R0.1-SNAPSHOT')      compileOnly('com.onarandombox.multiversecore:Multiverse-Core:4.3.1')      implementation('org.bstats:bstats-bukkit:3.0.2') +    implementation('com.jeff_media:SpigotUpdateChecker:3.0.3')  }  // Disable generation of the normal JAR to reduce confusion and only generate the correctly shadowed JAR including bStats @@ -28,6 +30,7 @@ jar.finalizedBy(shadowJar)  shadowJar {      archiveBaseName.set('Tumble')      archiveClassifier.set('') -    archiveVersion.set('1.0.3') +    archiveVersion.set('1.0.4')      relocate 'org.bstats', 'com.MylesAndMore.bstats' +    relocate 'com.jeff_media.updatechecker', 'com.MylesAndMore.updatechecker'  } diff --git a/src/main/java/com/MylesAndMore/Tumble/Main.java b/src/main/java/com/MylesAndMore/Tumble/Main.java index 9cb3613..c264498 100644 --- a/src/main/java/com/MylesAndMore/Tumble/Main.java +++ b/src/main/java/com/MylesAndMore/Tumble/Main.java @@ -4,6 +4,9 @@ import com.MylesAndMore.Tumble.commands.*;  import com.MylesAndMore.Tumble.plugin.Constants;  import com.MylesAndMore.Tumble.plugin.EventListener; +import com.jeff_media.updatechecker.UpdateCheckSource; +import com.jeff_media.updatechecker.UpdateChecker; +  import org.bstats.bukkit.Metrics;  import org.bukkit.Bukkit; @@ -31,6 +34,13 @@ public class Main extends JavaPlugin{              Bukkit.getServer().getLogger().warning("[Tumble] It appears you have not configured a lobby world for Tumble.");              Bukkit.getServer().getLogger().info("[Tumble] If this is your first time running the plugin, you may disregard this message.");          } + +        new UpdateChecker(this, UpdateCheckSource.SPIGET, "106721") +                .setDownloadLink("https://github.com/MylesAndMore/Tumble/releases") +                .setNotifyByPermissionOnJoin("tumble.update") // only this permission node is notified NOT all OPs so people can unsubscribe if they wish +                .checkEveryXHours(336) // (every 2 weeks) +                .checkNow(); +          Bukkit.getServer().getLogger().info("[Tumble] Tumble successfully enabled!");      }  }
\ No newline at end of file diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index dbc8973..23d50ca 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,6 +1,6 @@  main: com.MylesAndMore.Tumble.Main  name: Tumble -version: 1.0.3 +version: 1.0.4  description: 'A Minecraft: Java Edition plugin recreating the Tumble minigame from Minecraft Legacy Console Edition.'  api-version: 1.19  load: STARTUP @@ -48,3 +48,6 @@ permissions:    tumble.autostart:      description: Allows you to set the autostart details of Tumble.      default: op +  tumble.update: +    description: Allows you to get a notification if Tumble is out of date. +    default: op | 
