mirror of
https://github.com/ME1312/SubServers-2.git
synced 2024-11-22 02:08:27 +01:00
Fixes your assembly xml
This commit is contained in:
parent
b23aa18661
commit
7d9fabd2b9
@ -39,11 +39,13 @@ public abstract class UIRenderer {
|
||||
|
||||
static final HashMap<String, PluginRenderer<Host>> hostPlugins = new HashMap<String, PluginRenderer<Host>>();
|
||||
static final HashMap<String, PluginRenderer<Server>> serverPlugins = new HashMap<String, PluginRenderer<Server>>();
|
||||
private ContainedPair<String, Integer> tdownload = null;
|
||||
private final String[] adownload;
|
||||
private Runnable download = null;
|
||||
private final String[] downloadA;
|
||||
private final int downloadL;
|
||||
private int downloadF;
|
||||
private String downloadT;
|
||||
private Runnable download;
|
||||
final Player player;
|
||||
SubPlugin plugin;
|
||||
final SubPlugin plugin;
|
||||
|
||||
/**
|
||||
* Creates a new UIRenderer
|
||||
@ -74,7 +76,7 @@ public abstract class UIRenderer {
|
||||
TAPI_1_11 = TAPI_PLUGIN = false;
|
||||
}
|
||||
|
||||
// Pre-render Animations
|
||||
// Pre-render Animation
|
||||
{
|
||||
String a = plugin.api.getLang("SubServers", "Interface.Generic.Downloading.Title-Color-Alt");
|
||||
String b = plugin.api.getLang("SubServers", "Interface.Generic.Downloading.Title-Color");
|
||||
@ -108,7 +110,7 @@ public abstract class UIRenderer {
|
||||
break;
|
||||
}
|
||||
} while (true);
|
||||
adownload = frames.toArray(new String[0]);
|
||||
downloadL = (downloadA = frames.toArray(new String[0])).length;
|
||||
}
|
||||
}
|
||||
|
||||
@ -246,7 +248,7 @@ public abstract class UIRenderer {
|
||||
final String text = subtitle;
|
||||
if (download != null) download.run();
|
||||
download = AgnosticScheduler.following(player).runs(plugin, cancel -> {
|
||||
if (tdownload != null && player.isOnline()) player.sendMessage(plugin.api.getLang("SubServers", "Interface.Generic.Downloading").replace("$str$", text));
|
||||
if (downloadT != null && player.isOnline()) player.sendMessage(plugin.api.getLang("SubServers", "Interface.Generic.Downloading").replace("$str$", text));
|
||||
download = null;
|
||||
}, 2500, TimeUnit.MILLISECONDS);
|
||||
return;
|
||||
@ -255,16 +257,17 @@ public abstract class UIRenderer {
|
||||
if (!subtitle.startsWith(Character.toString(ChatColor.COLOR_CHAR))) {
|
||||
subtitle = plugin.api.getLang("SubServers", "Interface.Generic.Downloading.Title-Color-Alt") + subtitle;
|
||||
}
|
||||
if (tdownload == null) {
|
||||
tdownload = new ContainedPair<String, Integer>(subtitle, 0);
|
||||
if (downloadT == null) {
|
||||
downloadT = subtitle;
|
||||
downloadF = 0;
|
||||
|
||||
AgnosticScheduler.following(player).repeats(plugin, cancel -> {
|
||||
if (tdownload != null) {
|
||||
if (++tdownload.value >= adownload.length) {
|
||||
tdownload.value = 0;
|
||||
if (downloadT != null) {
|
||||
if (++downloadF >= downloadL) {
|
||||
downloadF = 0;
|
||||
}
|
||||
|
||||
if (!sendTitle(adownload[tdownload.value], tdownload.key, 0, 10, 5)) {
|
||||
if (!sendTitle(downloadA[downloadF], downloadT, 0, 10, 5)) {
|
||||
cancel.run();
|
||||
}
|
||||
} else {
|
||||
@ -273,11 +276,11 @@ public abstract class UIRenderer {
|
||||
}
|
||||
}, 0, 50, TimeUnit.MILLISECONDS);
|
||||
} else {
|
||||
tdownload.key = subtitle;
|
||||
downloadT = subtitle;
|
||||
}
|
||||
} else {
|
||||
if (tdownload != null) {
|
||||
tdownload = null;
|
||||
if (downloadT != null) {
|
||||
downloadT = null;
|
||||
}
|
||||
if (download != null) {
|
||||
download.run();
|
||||
|
@ -1,7 +1,5 @@
|
||||
package net.ME1312.SubServers.Client.Bukkit.Library.Compatibility;
|
||||
|
||||
import net.ME1312.Galaxi.Library.Try;
|
||||
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
@ -16,7 +14,6 @@ import java.util.function.Consumer;
|
||||
* Folia Regional Scheduling Compatibility Class
|
||||
*/
|
||||
public abstract class AgnosticScheduler {
|
||||
private static final boolean regional = Try.all.get(() -> Class.forName("io.papermc.paper.threadedregions.scheduler.RegionScheduler") != null);
|
||||
|
||||
/**
|
||||
* Provides an asynchronous thread scheduler (in both folia and bukkit)
|
||||
|
@ -8,7 +8,7 @@
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<useProjectArtifact>true</useProjectArtifact>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<unpack>true</unpack>
|
||||
<scope>runtime</scope>
|
||||
<excludes>
|
||||
@ -18,12 +18,16 @@
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<directory>${project.build.outputDirectory}</directory>
|
||||
<excludes>
|
||||
<exclude>net/ME1312/SubServers/Client/Bukkit/Library/Compatibility/AgnosticScheduler.class</exclude>
|
||||
</excludes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<directory>../../out/compile/target/SubServers.Client.Folia/classes</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</assembly>
|
@ -189,14 +189,14 @@ public abstract class AgnosticScheduler {
|
||||
}
|
||||
@Override
|
||||
public Runnable repeats(Plugin plugin, Consumer<Runnable> task, long repeat) {
|
||||
final long rMS;
|
||||
return repeats(plugin, task, rMS = repeat * 50, repeat, rMS, repeat);
|
||||
final long ms;
|
||||
return repeats(plugin, task, ms = repeat * 50, repeat, ms, repeat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Runnable repeats(Plugin plugin, Consumer<Runnable> task, long repeat, TimeUnit units) {
|
||||
final long rT;
|
||||
return repeats(plugin, task, repeat = units.toMillis(repeat), rT = repeat / 50, repeat, rT);
|
||||
final long ticks;
|
||||
return repeats(plugin, task, repeat = units.toMillis(repeat), ticks = repeat / 50, repeat, ticks);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -45,7 +45,7 @@
|
||||
<manifestFile>MANIFEST.MF</manifestFile>
|
||||
</archive>
|
||||
<descriptors>
|
||||
<descriptor>../Folia/jar-with-some-dependencies-plus-folia.xml</descriptor>
|
||||
<descriptor>../Common/jar-with-some-dependencies.xml</descriptor>
|
||||
</descriptors>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
</configuration>
|
||||
|
Loading…
Reference in New Issue
Block a user