Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Complete revision of the module system #277

Merged
merged 71 commits into from
Jun 10, 2020
Merged
Show file tree
Hide file tree
Changes from 68 commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
fc16bb8
Merge pull request #9 from CloudNetService/development
TheMeinerLP May 17, 2020
cfdc3aa
Add semver dependency.
TheMeinerLP May 20, 2020
01b999e
Try to fix cloudnetapi loading error.
TheMeinerLP May 20, 2020
95b994d
Add better exception handling.
TheMeinerLP Jun 3, 2020
ae8d374
Add better exception handling.
TheMeinerLP Jun 3, 2020
4ab725f
Add the reworked module system
TheMeinerLP Jun 3, 2020
5c899b5
Remove old module system.
TheMeinerLP Jun 3, 2020
50b833f
Fix issue for module example.
TheMeinerLP Jun 3, 2020
ee09456
Fix issue for module example.
TheMeinerLP Jun 3, 2020
fa6fbb7
Try to fix issue about yml config from bungeecord.
TheMeinerLP Jun 3, 2020
26e9421
Try to fix issue about yml config from bungeecord.
TheMeinerLP Jun 3, 2020
e6f1a6b
Try to fix issue about yml config from bungeecord.
TheMeinerLP Jun 3, 2020
909c6a6
Try to fix issue about yml config from bungeecord.
TheMeinerLP Jun 3, 2020
04c2578
Try to fix issue about yml config from bungeecord.
TheMeinerLP Jun 3, 2020
cf11dca
Add slf4j-14jdk
TheMeinerLP Jun 3, 2020
85c2d29
Tyr to fix build issue.
TheMeinerLP Jun 3, 2020
4b3031b
Try to to fix load order.
TheMeinerLP Jun 3, 2020
8dafe1e
Add a example module.
TheMeinerLP Jun 3, 2020
a814871
Improve classloader on @derKlaro request.
TheMeinerLP Jun 7, 2020
4f31f59
Move load and enable message.
TheMeinerLP Jun 7, 2020
830eb88
Try to fix loading and enabling of modules.
TheMeinerLP Jun 7, 2020
6304660
Add a boolean to identify if the module loaded.
TheMeinerLP Jun 7, 2020
649430d
Fixed recursive and load order.
TheMeinerLP Jun 7, 2020
e09cc49
Remove example module.
TheMeinerLP Jun 7, 2020
2c6dd40
Improve class loader.
TheMeinerLP Jun 7, 2020
6976dee
Improve interface for module.
TheMeinerLP Jun 7, 2020
0b87371
Replace most stuff with the interface.
TheMeinerLP Jun 7, 2020
e74c08d
Fix typo
TheMeinerLP Jun 7, 2020
a67efe8
Fix some compile error.
TheMeinerLP Jun 7, 2020
53818c8
Renaming interface for plugin deployment. From plugin into file deplo…
TheMeinerLP Jun 7, 2020
1a1ab8c
Fix typo
TheMeinerLP Jun 8, 2020
78037b3
Merge many try and catch blocks into one big try an catch block
TheMeinerLP Jun 8, 2020
0e11ab2
Remove comment
TheMeinerLP Jun 8, 2020
d602658
Break a line for a bracket.
TheMeinerLP Jun 8, 2020
bd1ad63
Remove wrapper and use only the name
TheMeinerLP Jun 8, 2020
4bdf064
Add a minimum required cloudnet version.
TheMeinerLP Jun 8, 2020
882edfd
Add update trigger for module
TheMeinerLP Jun 8, 2020
6575657
Remove file deployment.
TheMeinerLP Jun 8, 2020
1ea234d
Add update on startup.
TheMeinerLP Jun 8, 2020
6cdabc0
Examples for the module were added
TheMeinerLP Jun 8, 2020
705173c
Change from String into Semver class.
TheMeinerLP Jun 8, 2020
14e1720
Fix type token.
TheMeinerLP Jun 8, 2020
459663d
Add a exception if something wrong when the updated module be loaded
TheMeinerLP Jun 8, 2020
2ef1e95
Fix example implementation.
TheMeinerLP Jun 8, 2020
e3bd9df
Fix exception call.
TheMeinerLP Jun 8, 2020
96a2772
Downgrade slf4j from 2.0.0-alpha1 to 1.7.30.
TheMeinerLP Jun 8, 2020
9f47952
Fixing of minimum required cloudnet version.
TheMeinerLP Jun 8, 2020
f85b8f5
Add class index.
TheMeinerLP Jun 8, 2020
817f8b8
Add version string into load, enable and disable message for modules.
TheMeinerLP Jun 8, 2020
cac5259
Fix some missing code for update without migration.
TheMeinerLP Jun 8, 2020
8b50f29
Remove class name check.
TheMeinerLP Jun 8, 2020
52e1877
Add some documentation.
TheMeinerLP Jun 8, 2020
8e53fd4
Update cloudnet-master/src/main/java/eu/cloudnetservice/cloudnet/v2/m…
TheMeinerLP Jun 8, 2020
b369066
Update cloudnet-master/src/main/java/eu/cloudnetservice/cloudnet/v2/m…
TheMeinerLP Jun 8, 2020
43bfc76
Update cloudnet-master/src/main/java/eu/cloudnetservice/cloudnet/v2/m…
TheMeinerLP Jun 8, 2020
52c4984
Update cloudnet-master/src/main/java/eu/cloudnetservice/cloudnet/v2/m…
TheMeinerLP Jun 8, 2020
26103ba
Update cloudnet-master/src/main/java/eu/cloudnetservice/cloudnet/v2/m…
TheMeinerLP Jun 8, 2020
f02e288
Apply suggestions from code review
TheMeinerLP Jun 8, 2020
45d73ee
Remove duplicated code.
TheMeinerLP Jun 9, 2020
68338d6
Add some notnull annotations.
TheMeinerLP Jun 9, 2020
33710e5
Change from list type to collection on two methods.
TheMeinerLP Jun 9, 2020
7a620b4
Fix some if clause for version parsing.
TheMeinerLP Jun 9, 2020
435161b
Add java docs.
TheMeinerLP Jun 9, 2020
eee035a
Fix imports.
TheMeinerLP Jun 9, 2020
6a8a7ea
Add class java docs.
TheMeinerLP Jun 9, 2020
c168e6d
Add class java docs.
TheMeinerLP Jun 9, 2020
2ddbe62
Fix typo.
TheMeinerLP Jun 9, 2020
78e66f3
Reduce big code lines into small methods. For more readability!
TheMeinerLP Jun 10, 2020
e832fae
Fix description. remove some finals.
TheMeinerLP Jun 10, 2020
7698204
Add a exception if something wrong when the master folders are created.
TheMeinerLP Jun 10, 2020
797228e
Update flow was wrong. Now fixed.
TheMeinerLP Jun 10, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cloudnet-api/cloudnet-api-bridge/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@

<build>
<finalName>CloudNetAPI</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: CloudNetAPI
version: 2.1
author: Dytanic
version: ${project.version}
author: CloudNetService

main: de.dytanic.cloudnet.bridge.ProxiedBootstrap
main: eu.cloudnetservice.cloudnet.v2.bridge.ProxiedBootstrap
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: CloudNetAPI
version: 2.1
author: Dytanic
version: ${project.version}
author: CloudNetService
website: https://cloudnetservice.eu/
description: CloudNet Interface for the Central server

main: de.dytanic.cloudnet.bridge.BukkitBootstrap
main: eu.cloudnetservice.cloudnet.v2.bridge.BukkitBootstrap

softdepend: [Vault, VaultAPI]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
import eu.cloudnetservice.cloudnet.v2.logging.handler.ICloudLoggerHandler;
import jline.console.ConsoleReader;

import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.io.*;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
Expand All @@ -24,54 +21,57 @@
public class CloudLogger extends Logger {

private static final String SEPARATOR = System.lineSeparator();
private final ConsoleReader reader;
private ConsoleReader reader;
TheMeinerLP marked this conversation as resolved.
Show resolved Hide resolved
private final String name = System.getProperty("user.name");

private final List<ICloudLoggerHandler> handler = new LinkedList<>();

private boolean showPrompt = !Boolean.getBoolean("cloudnet.logging.prompt.disabled");
private final Handler loggingHandler;
private Handler loggingHandler;
TheMeinerLP marked this conversation as resolved.
Show resolved Hide resolved

/**
* Constructs a new cloud logger instance that handles logging messages from
* all sources in an asynchronous matter.
*
* @throws IOException when creating directories or files in {@code local/}
* was not possible
*/
public CloudLogger() throws IOException {
public CloudLogger() {
super("CloudNetServerLogger", null);
try {
if (!Files.exists(Paths.get("local"))) {
Files.createDirectory(Paths.get("local"));
}
if (!Files.exists(Paths.get("local", "logs"))) {
Files.createDirectory(Paths.get("local", "logs"));
}

if (!Files.exists(Paths.get("local"))) {
Files.createDirectory(Paths.get("local"));
}
if (!Files.exists(Paths.get("local", "logs"))) {
Files.createDirectory(Paths.get("local", "logs"));
}
setLevel(Level.ALL);
this.reader = new ConsoleReader(System.in, System.out);
this.reader.setExpandEvents(false);

setLevel(Level.ALL);
final LoggingFormatter formatter = new LoggingFormatter();
FileHandler fileHandler;

this.reader = new ConsoleReader(System.in, System.out);
this.reader.setExpandEvents(false);
fileHandler = new FileHandler("local/logs/cloudnet.log", 8000000, 8, false);
fileHandler.setEncoding(StandardCharsets.UTF_8.name());
fileHandler.setFormatter(formatter);

final LoggingFormatter formatter = new LoggingFormatter();
FileHandler fileHandler = new FileHandler("local/logs/cloudnet.log", 8000000, 8, false);
fileHandler.setEncoding(StandardCharsets.UTF_8.name());
fileHandler.setFormatter(formatter);
addHandler(fileHandler);

addHandler(fileHandler);
loggingHandler = new LoggingHandler(reader, this);
loggingHandler.setFormatter(formatter);

loggingHandler = new LoggingHandler(reader, this);
loggingHandler.setFormatter(formatter);
loggingHandler.setEncoding(StandardCharsets.UTF_8.name());
loggingHandler.setLevel(Level.INFO);
addHandler(loggingHandler);
loggingHandler.setEncoding(StandardCharsets.UTF_8.name());
loggingHandler.setLevel(Level.INFO);
addHandler(loggingHandler);

System.setOut(new AsyncPrintStream(new LoggingOutputStream(this, Level.INFO)));
System.setErr(new AsyncPrintStream(new LoggingOutputStream(this, Level.SEVERE)));
System.setOut(new PrintStream(new LoggingOutputStream(this, Level.INFO)));
System.setErr(new PrintStream(new LoggingOutputStream(this, Level.SEVERE)));

this.reader.setPrompt(NetworkUtils.EMPTY_STRING);
this.reader.resetPromptLine(NetworkUtils.EMPTY_STRING, "", 0);
this.reader.setPrompt(NetworkUtils.EMPTY_STRING);
this.reader.resetPromptLine(NetworkUtils.EMPTY_STRING, "", 0);
} catch (IOException e) {
e.printStackTrace();
}
}

public boolean isShowPrompt() {
Expand Down
31 changes: 0 additions & 31 deletions cloudnet-cord/cloudnet-module/pom.xml

This file was deleted.

Loading