From 875e3076d432314b89485703a1524735cc52910c Mon Sep 17 00:00:00 2001 From: yymydyy Date: Mon, 9 Mar 2020 16:39:19 +0800 Subject: [PATCH 1/3] Update Util.java I think this is the place cause bug. Bug:the mliestones bonus only give admin group but not either default and admin --- .../java/com/mcsimonflash/sponge/activetime/managers/Util.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/mcsimonflash/sponge/activetime/managers/Util.java b/src/main/java/com/mcsimonflash/sponge/activetime/managers/Util.java index 24d89fb..5fbd537 100644 --- a/src/main/java/com/mcsimonflash/sponge/activetime/managers/Util.java +++ b/src/main/java/com/mcsimonflash/sponge/activetime/managers/Util.java @@ -200,7 +200,7 @@ public static void startMilestoneTask() { public static void checkMilestones(Player player) { int activetime = Storage.getTotalTime(player.getUniqueId()).getActiveTime(); Storage.milestones.values().stream() - .filter(m -> player.hasPermission("activetime.milestones." + m.getName() + ".base")) + .filter(m -> player.hasPermission("activetime.milestones.base")) .forEach(m -> m.process(player, activetime)); } From 63608386924ddd1ec5a3f74907e7bfe5c9528d3d Mon Sep 17 00:00:00 2001 From: yymydyy Date: Tue, 17 Mar 2020 01:10:55 +0800 Subject: [PATCH 2/3] Fix the premission bug add a new permission "activetime.milestones.base" which control whether player get milestones bonus. --- build.gradle | 9 ++++++--- .../sponge/activetime/managers/NucleusIntegration.java | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index c76d534..9bdf708 100644 --- a/build.gradle +++ b/build.gradle @@ -8,15 +8,18 @@ version '1.4.3' ext.spongeversion = '7.1.0-SNAPSHOT' repositories { + mavenCentral() maven { name = 'nucleus-api' - url = 'http://repo.drnaylor.co.uk/artifactory/list/minecraft' + //url = 'http://repo.drnaylor.co.uk/artifactory/list/minecraft' + url = 'https://jitpack.io' } } dependencies { compileOnly "org.spongepowered:spongeapi:${spongeversion}" - compileOnly 'io.github.nucleuspowered:nucleus-api:1.2.3-SNAPSHOT-S7.0' + //compileOnly 'io.github.nucleuspowered:nucleus-api:1.2.3-SNAPSHOT-S7.0' + implementation 'com.github.NucleusPowered:Nucleus:1.14.3' } jar { @@ -24,7 +27,7 @@ jar { } task copyJars(type: Copy) { - from jar into project.file("#releases/${version}") + from jar into project.file("releases/${version}") } build.dependsOn(copyJars) \ No newline at end of file diff --git a/src/main/java/com/mcsimonflash/sponge/activetime/managers/NucleusIntegration.java b/src/main/java/com/mcsimonflash/sponge/activetime/managers/NucleusIntegration.java index 52a2a1a..ead5532 100644 --- a/src/main/java/com/mcsimonflash/sponge/activetime/managers/NucleusIntegration.java +++ b/src/main/java/com/mcsimonflash/sponge/activetime/managers/NucleusIntegration.java @@ -25,7 +25,7 @@ public static void registerMessageToken() { } else { return Optional.empty(); } - return Optional.of(Util.toText(source instanceof User ? Util.printTime(Storage.getTotalTime(((User) source).getUniqueId()).getTime(active)) : active ? "∞" : "√-1")); + return Optional.of(Util.toText(source instanceof User ? Util.printTime(Storage.getTotalTime(((User) source).getUniqueId()).getTime(active)) : active ? "�" : "�-1")); }); NucleusAPI.getMessageTokenService().registerPrimaryToken("activetime", ActiveTime.getContainer(), "activetime"); NucleusAPI.getMessageTokenService().registerPrimaryToken("afktime", ActiveTime.getContainer(), "afktime"); From 5050597f9a5637aaafd4b1e7ab600ae188c98452 Mon Sep 17 00:00:00 2001 From: yymydyy Date: Tue, 17 Mar 2020 09:05:19 +0800 Subject: [PATCH 3/3] 1.4.3-fix fix by yymydyy --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 9bdf708..3da6940 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { } group 'com.mcsimonflash.sponge.activetime' -version '1.4.3' +version '1.4.3-fix' ext.spongeversion = '7.1.0-SNAPSHOT' repositories {