1
1
diff --git a/api/src/main/java/net/luckperms/api/platform/Platform.java b/api/src/main/java/net/luckperms/api/platform/Platform.java
2
- index 9ed38beee..5e64324ed 100644
2
+ index bc31a34a8..e1e0dc00b 100644
3
3
--- a/api/src/main/java/net/luckperms/api/platform/Platform.java
4
4
+++ b/api/src/main/java/net/luckperms/api/platform/Platform.java
5
- @@ -75,7 +75,8 @@ public interface Platform {
5
+ @@ -71,6 +71,7 @@ public interface Platform {
6
+ */
7
+ enum Type {
8
+ BUKKIT("Bukkit"),
9
+ + MIRAI_CONSOLE("Mirai Console"),
10
+ BUNGEECORD("BungeeCord"),
6
11
SPONGE("Sponge"),
7
12
NUKKIT("Nukkit"),
8
- VELOCITY("Velocity"),
9
- - FABRIC("Fabric");
10
- + FABRIC("Fabric"),
11
- + MIRAI_CONSOLE("Mirai Console");
12
-
13
- private final String friendlyName;
14
-
15
13
diff --git a/common/src/main/java/me/lucko/luckperms/common/api/implementation/ApiPlatform.java b/common/src/main/java/me/lucko/luckperms/common/api/implementation/ApiPlatform.java
16
14
index d19884c76..1c5d918c2 100644
17
15
--- a/common/src/main/java/me/lucko/luckperms/common/api/implementation/ApiPlatform.java
@@ -27,18 +25,18 @@ index d19884c76..1c5d918c2 100644
27
25
}
28
26
29
27
diff --git a/common/src/main/java/me/lucko/luckperms/common/command/CommandManager.java b/common/src/main/java/me/lucko/luckperms/common/command/CommandManager.java
30
- index 3443eff42..7a141ebc7 100644
28
+ index c5be1966a..ecd1fddf1 100644
31
29
--- a/common/src/main/java/me/lucko/luckperms/common/command/CommandManager.java
32
30
+++ b/common/src/main/java/me/lucko/luckperms/common/command/CommandManager.java
33
- @@ -86 ,6 +86 ,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
31
+ @@ -89 ,6 +89 ,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
34
32
import java.util.concurrent.atomic.AtomicReference;
35
33
import java.util.function.Function;
36
34
import java.util.stream.Collectors;
37
35
+ import java.util.stream.Stream;
38
36
39
37
/**
40
38
* Root command manager for the '/luckperms' command.
41
- @@ -105 ,7 +106 ,7 @@ public class CommandManager {
39
+ @@ -109 ,7 +110 ,7 @@ public class CommandManager {
42
40
public CommandManager(LuckPermsPlugin plugin) {
43
41
this.plugin = plugin;
44
42
this.tabCompletions = new TabCompletions(plugin);
@@ -47,7 +45,7 @@ index 3443eff42..7a141ebc7 100644
47
45
.add(new UserParentCommand())
48
46
.add(new GroupParentCommand())
49
47
.add(new TrackParentCommand())
50
- @@ -132 ,14 +133 ,28 @@ public class CommandManager {
48
+ @@ -136 ,14 +137 ,28 @@ public class CommandManager {
51
49
.add(new DeleteTrack())
52
50
.add(new ListTracks())
53
51
.build()
@@ -77,7 +75,7 @@ index 3443eff42..7a141ebc7 100644
77
75
public TabCompletions getTabCompletions() {
78
76
return this.tabCompletions;
79
77
}
80
- @@ -210 ,10 +225 ,25 @@ public class CommandManager {
78
+ @@ -220 ,10 +235 ,25 @@ public class CommandManager {
81
79
}
82
80
83
81
private void execute(Sender sender, String label, List<String> arguments) {
@@ -103,7 +101,7 @@ index 3443eff42..7a141ebc7 100644
103
101
sender.sendMessage(Message.prefixed(Component.text()
104
102
.color(NamedTextColor.DARK_GREEN)
105
103
.append(Component.text("Running "))
106
- @@ -223 ,16 +253 ,21 @@ public class CommandManager {
104
+ @@ -233 ,16 +263 ,21 @@ public class CommandManager {
107
105
.append(Message.FULL_STOP)
108
106
));
109
107
@@ -128,7 +126,7 @@ index 3443eff42..7a141ebc7 100644
128
126
}
129
127
return;
130
128
}
131
- @@ -290 ,14 +325 ,6 @@ public class CommandManager {
129
+ @@ -300 ,14 +335 ,6 @@ public class CommandManager {
132
130
}
133
131
134
132
private void sendCommandUsage(Sender sender, String label) {
@@ -144,7 +142,7 @@ index 3443eff42..7a141ebc7 100644
144
142
this.mainCommands.values().stream()
145
143
.filter(Command::shouldDisplay)
146
144
diff --git a/common/src/main/java/me/lucko/luckperms/common/command/access/CommandPermission.java b/common/src/main/java/me/lucko/luckperms/common/command/access/CommandPermission.java
147
- index dfb5efc3a..3657be6eb 100644
145
+ index ed1ed15e3..aac889424 100644
148
146
--- a/common/src/main/java/me/lucko/luckperms/common/command/access/CommandPermission.java
149
147
+++ b/common/src/main/java/me/lucko/luckperms/common/command/access/CommandPermission.java
150
148
@@ -31,6 +31,7 @@ import me.lucko.luckperms.common.sender.Sender;
@@ -181,10 +179,10 @@ index 46ac1698d..166e2fbf9 100644
181
179
}
182
180
183
181
diff --git a/common/src/main/java/me/lucko/luckperms/common/config/ConfigKeys.java b/common/src/main/java/me/lucko/luckperms/common/config/ConfigKeys.java
184
- index 38a228a41..9affcb214 100644
182
+ index 17b2d7b48..8de0a9fec 100644
185
183
--- a/common/src/main/java/me/lucko/luckperms/common/config/ConfigKeys.java
186
184
+++ b/common/src/main/java/me/lucko/luckperms/common/config/ConfigKeys.java
187
- @@ -718 ,7 +718 ,7 @@ public final class ConfigKeys {
185
+ @@ -735 ,7 +735 ,7 @@ public final class ConfigKeys {
188
186
/**
189
187
* A list of the keys defined in this class.
190
188
*/
@@ -194,27 +192,53 @@ index 38a228a41..9affcb214 100644
194
192
public static List<? extends ConfigKey<?>> getKeys() {
195
193
return KEYS;
196
194
diff --git a/common/src/main/java/me/lucko/luckperms/common/dependencies/DependencyManager.java b/common/src/main/java/me/lucko/luckperms/common/dependencies/DependencyManager.java
197
- index 696ec8094..444f3d25c 100644
195
+ index 710658ef8..17ba4728c 100644
198
196
--- a/common/src/main/java/me/lucko/luckperms/common/dependencies/DependencyManager.java
199
197
+++ b/common/src/main/java/me/lucko/luckperms/common/dependencies/DependencyManager.java
200
- @@ -49,6 +49,7 @@ import java.util.Map;
201
- import java.util.Objects;
202
- import java.util.Set;
203
- import java.util.concurrent.CountDownLatch;
204
- + import java.util.concurrent.atomic.AtomicBoolean;
198
+ @@ -32,6 +32,7 @@ import me.lucko.luckperms.common.dependencies.relocation.Relocation;
199
+ import me.lucko.luckperms.common.dependencies.relocation.RelocationHandler;
200
+ import me.lucko.luckperms.common.plugin.LuckPermsPlugin;
201
+ import me.lucko.luckperms.common.plugin.classpath.ClassPathAppender;
202
+ + import me.lucko.luckperms.common.plugin.logging.PluginLogger;
203
+ import me.lucko.luckperms.common.storage.StorageType;
204
+ import me.lucko.luckperms.common.util.MoreFiles;
205
205
206
- /**
207
- * Loads and manages runtime dependencies for the plugin.
208
- @@ -167,6 +168,7 @@ public class DependencyManager {
206
+ @@ -72,6 +73,7 @@ public class DependencyManager {
207
+ private final EnumMap<Dependency, Path> loaded = new EnumMap<>(Dependency.class);
208
+ /** A map of isolated classloaders which have been created. */
209
+ private final Map<ImmutableSet<Dependency>, IsolatedClassLoader> loaders = new HashMap<>();
210
+ + private final PluginLogger logger;
211
+ /** Cached relocation handler instance. */
212
+ private @MonotonicNonNull RelocationHandler relocationHandler = null;
213
+
214
+ @@ -80,6 +82,7 @@ public class DependencyManager {
215
+ this.cacheDirectory = setupCacheDirectory(plugin);
216
+ this.classPathAppender = plugin.getBootstrap().getClassPathAppender();
217
+ this.loadingExecutor = plugin.getBootstrap().getScheduler().async();
218
+ + this.logger = plugin.getLogger();
219
+ }
220
+
221
+ public DependencyManager(Path cacheDirectory, Executor executor) { // standalone
222
+ @@ -87,6 +90,7 @@ public class DependencyManager {
223
+ this.cacheDirectory = cacheDirectory;
224
+ this.classPathAppender = null;
225
+ this.loadingExecutor = executor;
226
+ + this.logger = null;
227
+ }
228
+
229
+ private synchronized RelocationHandler getRelocationHandler() {
230
+ @@ -186,6 +190,9 @@ public class DependencyManager {
209
231
// attempt to download the dependency from each repo in order.
210
232
for (DependencyRepository repo : DependencyRepository.values()) {
211
233
try {
212
- + plugin.getLogger().info("Downloading dependency: " + dependency + ", " + file.getFileName() + " from " + repo);
234
+ + if (logger != null) {
235
+ + logger.info("Downloading dependency: " + dependency + ", " + file.getFileName() + " from " + repo);
236
+ + }
213
237
repo.download(dependency, file);
214
238
return file;
215
239
} catch (DependencyDownloadException e) {
216
240
diff --git a/common/src/main/java/me/lucko/luckperms/common/dependencies/DependencyRepository.java b/common/src/main/java/me/lucko/luckperms/common/dependencies/DependencyRepository.java
217
- index 3606a2906..1c756db22 100644
241
+ index 7dcdd4ea5..8b3d32972 100644
218
242
--- a/common/src/main/java/me/lucko/luckperms/common/dependencies/DependencyRepository.java
219
243
+++ b/common/src/main/java/me/lucko/luckperms/common/dependencies/DependencyRepository.java
220
244
@@ -41,6 +41,16 @@ import java.util.concurrent.TimeUnit;
@@ -277,10 +301,10 @@ index f1ae13665..bbbd40edc 100644
277
301
+ }
278
302
}
279
303
diff --git a/common/src/main/java/me/lucko/luckperms/common/plugin/bootstrap/LuckPermsBootstrap.java b/common/src/main/java/me/lucko/luckperms/common/plugin/bootstrap/LuckPermsBootstrap.java
280
- index 2680ab00e..c904d6fbd 100644
304
+ index df8fbcb53..d089dd490 100644
281
305
--- a/common/src/main/java/me/lucko/luckperms/common/plugin/bootstrap/LuckPermsBootstrap.java
282
306
+++ b/common/src/main/java/me/lucko/luckperms/common/plugin/bootstrap/LuckPermsBootstrap.java
283
- @@ -230 ,4 +230 ,14 @@ public interface LuckPermsBootstrap {
307
+ @@ -232 ,4 +232 ,14 @@ public interface LuckPermsBootstrap {
284
308
return null;
285
309
}
286
310
@@ -358,7 +382,7 @@ index 22c082368..063585fce 100644
358
382
return;
359
383
}
360
384
diff --git a/settings.gradle b/settings.gradle
361
- index 17a0c9c99 ..b88ed5914 100644
385
+ index b03ef276d ..b88ed5914 100644
362
386
--- a/settings.gradle
363
387
+++ b/settings.gradle
364
388
@@ -1,7 +1,6 @@
@@ -369,7 +393,7 @@ index 17a0c9c99..b88ed5914 100644
369
393
maven {
370
394
url 'https://maven.fabricmc.net/'
371
395
}
372
- @@ -14,18 +13,4 @@ include (
396
+ @@ -14,24 +13,4 @@ include (
373
397
'api',
374
398
'common',
375
399
'common:loader-utils',
@@ -380,11 +404,17 @@ index 17a0c9c99..b88ed5914 100644
380
404
- 'bungee',
381
405
- 'bungee:loader',
382
406
- 'fabric',
407
+ - 'forge',
408
+ - 'forge:loader',
409
+ - 'forge:forge-api',
383
410
- 'nukkit',
384
411
- 'nukkit:loader',
385
412
- 'sponge',
386
413
- 'sponge:loader',
387
414
- 'sponge:sponge-service',
388
415
- 'sponge:sponge-service-api8',
389
- - 'velocity'
416
+ - 'velocity',
417
+ - 'standalone',
418
+ - 'standalone:loader',
419
+ - 'standalone:app'
390
420
)
0 commit comments