mirror of
https://github.com/nkomarn/harbor.git
synced 2024-12-19 06:47:34 +01:00
💥 Hotfixes!
This commit is contained in:
parent
d67b003457
commit
bb5b3dc9e3
2
build.sh
2
build.sh
@ -1,2 +1,2 @@
|
|||||||
mvn package
|
mvn package
|
||||||
yes | cp -rf target/*-*.jar ../Spigot/1.13.2/plugins
|
yes | cp -rf target/*-*-shaded.jar ../Spigot/1.13.2/plugins
|
39
pom.xml
39
pom.xml
@ -3,7 +3,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>xyz.nkomarn</groupId>
|
<groupId>xyz.nkomarn</groupId>
|
||||||
<artifactId>Harbor</artifactId>
|
<artifactId>Harbor</artifactId>
|
||||||
<version>1.5.2</version>
|
<version>1.5.3</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
@ -17,6 +17,11 @@
|
|||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-io</groupId>
|
||||||
|
<artifactId>commons-io</artifactId>
|
||||||
|
<version>2.6</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>spigotmc.org</groupId>
|
<groupId>spigotmc.org</groupId>
|
||||||
<artifactId>spigot-1.14.1</artifactId>
|
<artifactId>spigot-1.14.1</artifactId>
|
||||||
@ -119,9 +124,41 @@
|
|||||||
<includes>
|
<includes>
|
||||||
<include>plugin.yml</include>
|
<include>plugin.yml</include>
|
||||||
<include>config.yml</include>
|
<include>config.yml</include>
|
||||||
|
<include>application.properties</include>
|
||||||
</includes>
|
</includes>
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
<configuration>
|
||||||
|
<shadedArtifactAttached>true</shadedArtifactAttached>
|
||||||
|
<shadedClassifierName></shadedClassifierName>
|
||||||
|
<relocations>
|
||||||
|
<relocation>
|
||||||
|
<pattern>org.bstats</pattern>
|
||||||
|
<shadedPattern>xyz.nkomarn.SeedDonor.SeedDonor</shadedPattern>
|
||||||
|
</relocation>
|
||||||
|
</relocations>
|
||||||
|
<artifactSet>
|
||||||
|
<excludes>
|
||||||
|
<exclude>spigotmc.org:*</exclude>
|
||||||
|
<exclude>net.milkbowl.vault*</exclude>
|
||||||
|
</excludes>
|
||||||
|
</artifactSet>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>shade</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
@ -21,7 +21,7 @@ import java.util.stream.Stream;
|
|||||||
|
|
||||||
public class Harbor extends JavaPlugin {
|
public class Harbor extends JavaPlugin {
|
||||||
public static Harbor instance;
|
public static Harbor instance;
|
||||||
public static String version = "1.5.2";
|
public static String version = "1.5.3";
|
||||||
public static boolean debug = false;
|
public static boolean debug = false;
|
||||||
public static boolean enabled = false;
|
public static boolean enabled = false;
|
||||||
public static boolean prerelease = false;
|
public static boolean prerelease = false;
|
||||||
|
@ -25,9 +25,14 @@ public class Timer implements Runnable {
|
|||||||
w.getPlayers().forEach(p -> nms.sendActionbar(p, c.getString("messages.actionbar.everyone"), w));
|
w.getPlayers().forEach(p -> nms.sendActionbar(p, c.getString("messages.actionbar.everyone"), w));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Title for when you are able to sleep
|
||||||
if (w.getTime() >= 12516 && w.getTime() <= 12535 && c.getBoolean("messages.title.title"))
|
if (w.getTime() >= 12516 && w.getTime() <= 12535 && c.getBoolean("messages.title.title"))
|
||||||
w.getPlayers().forEach(p -> nms.sendTitle(p, c.getString("messages.title.evening.top"), c.getString("messages.title.evening.bottom")));
|
w.getPlayers().forEach(p -> nms.sendTitle(p, c.getString("messages.title.evening.top"), c.getString("messages.title.evening.bottom")));
|
||||||
if (n.getSleeping(w) > 0 && n.getNeeded(w) == 0) n.skip(w);
|
|
||||||
|
// Skip night
|
||||||
|
if (n.getSleeping(w) > 1 && n.getNeeded(w) == 0) {
|
||||||
|
n.skip(w);
|
||||||
|
}
|
||||||
|
|
||||||
if (c.getBoolean("features.afk")) w.getPlayers().forEach(p -> {
|
if (c.getBoolean("features.afk")) w.getPlayers().forEach(p -> {
|
||||||
if (TimeUnit.MILLISECONDS.toMinutes(System.currentTimeMillis() - Counters.activity.get(p)) >= c.getInteger("values.timeout")) {
|
if (TimeUnit.MILLISECONDS.toMinutes(System.currentTimeMillis() - Counters.activity.get(p)) >= c.getInteger("values.timeout")) {
|
||||||
|
@ -22,7 +22,12 @@ public class Counters {
|
|||||||
private NMSUtils nms = new NMSUtils();
|
private NMSUtils nms = new NMSUtils();
|
||||||
|
|
||||||
public void add(World w, Player p) {
|
public void add(World w, Player p) {
|
||||||
ArrayList<Player> a = sleeping.get(w);
|
ArrayList<Player> a;
|
||||||
|
try {
|
||||||
|
a = sleeping.get(w);
|
||||||
|
} catch (NullPointerException e) {
|
||||||
|
a = new ArrayList<>();
|
||||||
|
}
|
||||||
a.add(p);
|
a.add(p);
|
||||||
sleeping.put(w, a);
|
sleeping.put(w, a);
|
||||||
}
|
}
|
||||||
@ -70,7 +75,7 @@ public class Counters {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void skip(World w) {
|
public void skip(World w) {
|
||||||
if (c.getBoolean("features.skip") && Math.max(0, this.getNeeded(w) - this.getExcluded(w).size()) == 0) {
|
if (c.getBoolean("features.skip") && Math.max(0, this.getNeeded(w)) == 0) {
|
||||||
w.setTime(1000L);
|
w.setTime(1000L);
|
||||||
|
|
||||||
// Synchronously set weather to clear
|
// Synchronously set weather to clear
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package xyz.nkomarn.Harbor.util;
|
package xyz.nkomarn.Harbor.util;
|
||||||
|
|
||||||
|
import com.mysql.jdbc.StringUtils;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
@ -104,5 +104,5 @@ gui:
|
|||||||
sleeping: "Sleeping Players | Page [page]"
|
sleeping: "Sleeping Players | Page [page]"
|
||||||
|
|
||||||
# Spooky controls (don't change)
|
# Spooky controls (don't change)
|
||||||
version: 1.5.2
|
version: 1.5.3
|
||||||
debug: false
|
debug: false
|
||||||
|
Loading…
Reference in New Issue
Block a user