Skip to content

Commit

Permalink
Merge pull request #8 from MylesAndMore/dev
Browse files Browse the repository at this point in the history
v1.0.4
  • Loading branch information
MylesAndMore authored Jun 18, 2023
2 parents ee11892 + 26daae3 commit 88d7136
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 879 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/).*

Expand All @@ -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```

Expand All @@ -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

Expand Down
24 changes: 18 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id 'java-library'
id "com.github.johnrengelman.shadow" version "7.1.0"
}

java {
Expand All @@ -8,17 +9,28 @@ java {
}
}

group 'Tumble'
version '1.0.3'

repositories {
mavenCentral() // Use Maven Central for resolving dependencies.
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.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'
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
jar.enabled = false
jar.finalizedBy(shadowJar)
shadowJar {
archiveBaseName.set('Tumble')
archiveClassifier.set('')
archiveVersion.set('1.0.4')
relocate 'org.bstats', 'com.MylesAndMore.bstats'
relocate 'com.jeff_media.updatechecker', 'com.MylesAndMore.updatechecker'
}
19 changes: 15 additions & 4 deletions src/main/java/com/MylesAndMore/Tumble/Main.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
package com.MylesAndMore.Tumble;

import com.MylesAndMore.Tumble.commands.*;
import com.MylesAndMore.Tumble.plugin.Metrics;
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;
import org.bukkit.plugin.java.JavaPlugin;

Expand All @@ -17,9 +22,8 @@ public void onEnable() {
this.getCommand("start").setExecutor(new StartGame());
this.getCommand("winlocation").setExecutor(new SetWinnerLoc());
this.getCommand("autostart").setExecutor(new SetAutoStart());
int pluginId = 16940;
Metrics metrics = new Metrics(this, 16940);
this.saveDefaultConfig(); // Saves the default config file (packaged in the JAR) if we haven't already\
new Metrics(this, 16940);
this.saveDefaultConfig(); // Saves the default config file (packaged in the JAR) if we haven't already

// Check if worlds are null in config and throw warnings if so
if (Constants.getGameWorld() == null) {
Expand All @@ -30,6 +34,13 @@ public void onEnable() {
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!");
}
}
Loading

0 comments on commit 88d7136

Please sign in to comment.