From 0e5db578e9d07ffdbffc7d56a2bb00914960f144 Mon Sep 17 00:00:00 2001 From: rtm516 Date: Tue, 25 Apr 2023 23:23:59 +0100 Subject: [PATCH] Reformat and add missing licence headers --- .../connect/extension/GeyserConnect.java | 28 ++++++++++++++++++- .../connect/extension/PacketHandler.java | 2 +- .../connect/extension/config/Config.java | 2 +- .../extension/config/ConfigLoader.java | 25 +++++++++++++++++ .../config/CustomServersSection.java | 28 +++++++++++++++++-- .../config/MySQLConnectionSection.java | 25 +++++++++++++++++ .../extension/config/VirtualHostSection.java | 25 +++++++++++++++++ .../storage/AbstractSQLStorageManager.java | 9 +++--- .../storage/AbstractStorageManager.java | 12 ++++---- .../storage/DisabledStorageManager.java | 2 +- .../extension/storage/JsonStorageManager.java | 12 ++++---- .../storage/MySQLStorageManager.java | 2 +- .../storage/SQLiteStorageManager.java | 2 +- .../connect/extension/ui/UIHandler.java | 28 ++++++++++++++++++- .../connect/extension/utils/Server.java | 8 ++---- .../extension/utils/ServerCategory.java | 2 +- .../extension/utils/ServerManager.java | 25 +++++++++++++++++ .../connect/extension/utils/Utils.java | 28 ++++++++++++++++++- 18 files changed, 234 insertions(+), 31 deletions(-) diff --git a/src/main/java/org/geysermc/connect/extension/GeyserConnect.java b/src/main/java/org/geysermc/connect/extension/GeyserConnect.java index 1a6bf1e..422c14f 100644 --- a/src/main/java/org/geysermc/connect/extension/GeyserConnect.java +++ b/src/main/java/org/geysermc/connect/extension/GeyserConnect.java @@ -1,3 +1,28 @@ +/* + * Copyright (c) 2019-2023 GeyserMC. http://geysermc.org + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @author GeyserMC + * @link https://github.com/GeyserMC/GeyserConnect + */ + package org.geysermc.connect.extension; import org.cloudburstmc.protocol.bedrock.packet.BedrockPacketHandler; @@ -82,7 +107,8 @@ public class GeyserConnect implements Extension { int port = 19132; try { port = Integer.parseInt(serverAddress.split(":")[1]); - } catch (NumberFormatException ignored) { } + } catch (NumberFormatException ignored) { + } TransferPacket transferPacket = new TransferPacket(); transferPacket.setAddress(ip); diff --git a/src/main/java/org/geysermc/connect/extension/PacketHandler.java b/src/main/java/org/geysermc/connect/extension/PacketHandler.java index b2300ce..8af94c5 100644 --- a/src/main/java/org/geysermc/connect/extension/PacketHandler.java +++ b/src/main/java/org/geysermc/connect/extension/PacketHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020 GeyserMC. http://geysermc.org + * Copyright (c) 2019-2023 GeyserMC. http://geysermc.org * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/org/geysermc/connect/extension/config/Config.java b/src/main/java/org/geysermc/connect/extension/config/Config.java index 76463ff..46b2f8e 100644 --- a/src/main/java/org/geysermc/connect/extension/config/Config.java +++ b/src/main/java/org/geysermc/connect/extension/config/Config.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020 GeyserMC. http://geysermc.org + * Copyright (c) 2019-2023 GeyserMC. http://geysermc.org * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/org/geysermc/connect/extension/config/ConfigLoader.java b/src/main/java/org/geysermc/connect/extension/config/ConfigLoader.java index 07127c4..f75ff48 100644 --- a/src/main/java/org/geysermc/connect/extension/config/ConfigLoader.java +++ b/src/main/java/org/geysermc/connect/extension/config/ConfigLoader.java @@ -1,3 +1,28 @@ +/* + * Copyright (c) 2019-2023 GeyserMC. http://geysermc.org + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @author GeyserMC + * @link https://github.com/GeyserMC/GeyserConnect + */ + package org.geysermc.connect.extension.config; import com.fasterxml.jackson.databind.DeserializationFeature; diff --git a/src/main/java/org/geysermc/connect/extension/config/CustomServersSection.java b/src/main/java/org/geysermc/connect/extension/config/CustomServersSection.java index fd8cda6..d16ce1b 100644 --- a/src/main/java/org/geysermc/connect/extension/config/CustomServersSection.java +++ b/src/main/java/org/geysermc/connect/extension/config/CustomServersSection.java @@ -1,7 +1,29 @@ -package org.geysermc.connect.extension.config; +/* + * Copyright (c) 2019-2023 GeyserMC. http://geysermc.org + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @author GeyserMC + * @link https://github.com/GeyserMC/GeyserConnect + */ -//import com.fasterxml.jackson.annotation.JsonProperty; -//import org.geysermc.connect.extension.storage.AbstractStorageManager; +package org.geysermc.connect.extension.config; import com.fasterxml.jackson.annotation.JsonProperty; import org.geysermc.connect.extension.storage.AbstractStorageManager; diff --git a/src/main/java/org/geysermc/connect/extension/config/MySQLConnectionSection.java b/src/main/java/org/geysermc/connect/extension/config/MySQLConnectionSection.java index 3e9aaed..65b8ccf 100644 --- a/src/main/java/org/geysermc/connect/extension/config/MySQLConnectionSection.java +++ b/src/main/java/org/geysermc/connect/extension/config/MySQLConnectionSection.java @@ -1,3 +1,28 @@ +/* + * Copyright (c) 2019-2023 GeyserMC. http://geysermc.org + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @author GeyserMC + * @link https://github.com/GeyserMC/GeyserConnect + */ + package org.geysermc.connect.extension.config; public record MySQLConnectionSection( diff --git a/src/main/java/org/geysermc/connect/extension/config/VirtualHostSection.java b/src/main/java/org/geysermc/connect/extension/config/VirtualHostSection.java index 3820144..4aa1a60 100644 --- a/src/main/java/org/geysermc/connect/extension/config/VirtualHostSection.java +++ b/src/main/java/org/geysermc/connect/extension/config/VirtualHostSection.java @@ -1,3 +1,28 @@ +/* + * Copyright (c) 2019-2023 GeyserMC. http://geysermc.org + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @author GeyserMC + * @link https://github.com/GeyserMC/GeyserConnect + */ + package org.geysermc.connect.extension.config; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/org/geysermc/connect/extension/storage/AbstractSQLStorageManager.java b/src/main/java/org/geysermc/connect/extension/storage/AbstractSQLStorageManager.java index 9fced8b..50abc38 100644 --- a/src/main/java/org/geysermc/connect/extension/storage/AbstractSQLStorageManager.java +++ b/src/main/java/org/geysermc/connect/extension/storage/AbstractSQLStorageManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2022 GeyserMC. http://geysermc.org + * Copyright (c) 2019-2023 GeyserMC. http://geysermc.org * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -26,7 +26,6 @@ package org.geysermc.connect.extension.storage; import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; import org.geysermc.connect.extension.GeyserConnect; import org.geysermc.connect.extension.utils.Server; import org.geysermc.connect.extension.utils.ServerManager; @@ -58,7 +57,8 @@ public abstract class AbstractSQLStorageManager extends AbstractStorageManager { ResultSet rs = getPlayersServers.executeQuery(); while (rs.next()) { - List loadedServers = Utils.OBJECT_MAPPER.readValue(rs.getString("servers"), new TypeReference<>() {}); + List loadedServers = Utils.OBJECT_MAPPER.readValue(rs.getString("servers"), new TypeReference<>() { + }); GeyserConnect.instance().logger().info("Loaded " + loadedServers.size() + " servers for " + rs.getString("xuid")); } } catch (IOException | SQLException exception) { @@ -101,7 +101,8 @@ public abstract class AbstractSQLStorageManager extends AbstractStorageManager { ResultSet rs = getPlayersServers.executeQuery(); while (rs.next()) { - List loadedServers = Utils.OBJECT_MAPPER.readValue(rs.getString("servers"), new TypeReference<>() {}); + List loadedServers = Utils.OBJECT_MAPPER.readValue(rs.getString("servers"), new TypeReference<>() { + }); if (loadedServers != null) { servers.addAll(loadedServers); } diff --git a/src/main/java/org/geysermc/connect/extension/storage/AbstractStorageManager.java b/src/main/java/org/geysermc/connect/extension/storage/AbstractStorageManager.java index dea7c95..a758365 100644 --- a/src/main/java/org/geysermc/connect/extension/storage/AbstractStorageManager.java +++ b/src/main/java/org/geysermc/connect/extension/storage/AbstractStorageManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020 GeyserMC. http://geysermc.org + * Copyright (c) 2019-2023 GeyserMC. http://geysermc.org * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -28,18 +28,20 @@ package org.geysermc.connect.extension.storage; import com.fasterxml.jackson.annotation.JsonValue; import org.geysermc.connect.extension.utils.Server; import org.geysermc.geyser.session.GeyserSession; -import org.jetbrains.annotations.NotNull; import java.util.ArrayList; import java.util.List; public class AbstractStorageManager { - public void setupStorage() { } + public void setupStorage() { + } - public void closeStorage() { } + public void closeStorage() { + } - public void saveServers(GeyserSession session) { } + public void saveServers(GeyserSession session) { + } public List loadServers(GeyserSession session) { return new ArrayList<>(); diff --git a/src/main/java/org/geysermc/connect/extension/storage/DisabledStorageManager.java b/src/main/java/org/geysermc/connect/extension/storage/DisabledStorageManager.java index 23ebbdf..5ab8377 100644 --- a/src/main/java/org/geysermc/connect/extension/storage/DisabledStorageManager.java +++ b/src/main/java/org/geysermc/connect/extension/storage/DisabledStorageManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020 GeyserMC. http://geysermc.org + * Copyright (c) 2019-2023 GeyserMC. http://geysermc.org * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/org/geysermc/connect/extension/storage/JsonStorageManager.java b/src/main/java/org/geysermc/connect/extension/storage/JsonStorageManager.java index 1a895a2..84adc45 100644 --- a/src/main/java/org/geysermc/connect/extension/storage/JsonStorageManager.java +++ b/src/main/java/org/geysermc/connect/extension/storage/JsonStorageManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020 GeyserMC. http://geysermc.org + * Copyright (c) 2019-2023 GeyserMC. http://geysermc.org * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -34,7 +34,6 @@ import org.geysermc.geyser.session.GeyserSession; import java.io.IOException; import java.nio.file.Path; -import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; @@ -53,7 +52,8 @@ public class JsonStorageManager extends AbstractStorageManager { public void saveServers(GeyserSession session) { try { Utils.OBJECT_MAPPER.writeValue(dataFolder.resolve(session.getAuthData().xuid() + ".json").toFile(), ServerManager.getServers(session)); - } catch (IOException ignored) { } + } catch (IOException ignored) { + } } @Override @@ -61,11 +61,13 @@ public class JsonStorageManager extends AbstractStorageManager { List servers = new ArrayList<>(); try { - List loadedServers = Utils.OBJECT_MAPPER.readValue(dataFolder.resolve(session.getAuthData().xuid() + ".json").toFile(), new TypeReference<>(){}); + List loadedServers = Utils.OBJECT_MAPPER.readValue(dataFolder.resolve(session.getAuthData().xuid() + ".json").toFile(), new TypeReference<>() { + }); if (loadedServers != null) { servers.addAll(loadedServers); } - } catch (IOException ignored) { } + } catch (IOException ignored) { + } return servers; } diff --git a/src/main/java/org/geysermc/connect/extension/storage/MySQLStorageManager.java b/src/main/java/org/geysermc/connect/extension/storage/MySQLStorageManager.java index 8852d63..a09019d 100644 --- a/src/main/java/org/geysermc/connect/extension/storage/MySQLStorageManager.java +++ b/src/main/java/org/geysermc/connect/extension/storage/MySQLStorageManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020 GeyserMC. http://geysermc.org + * Copyright (c) 2019-2023 GeyserMC. http://geysermc.org * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/org/geysermc/connect/extension/storage/SQLiteStorageManager.java b/src/main/java/org/geysermc/connect/extension/storage/SQLiteStorageManager.java index 957e331..d47439e 100644 --- a/src/main/java/org/geysermc/connect/extension/storage/SQLiteStorageManager.java +++ b/src/main/java/org/geysermc/connect/extension/storage/SQLiteStorageManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020 GeyserMC. http://geysermc.org + * Copyright (c) 2019-2023 GeyserMC. http://geysermc.org * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/org/geysermc/connect/extension/ui/UIHandler.java b/src/main/java/org/geysermc/connect/extension/ui/UIHandler.java index b7878b1..39113ec 100644 --- a/src/main/java/org/geysermc/connect/extension/ui/UIHandler.java +++ b/src/main/java/org/geysermc/connect/extension/ui/UIHandler.java @@ -1,3 +1,28 @@ +/* + * Copyright (c) 2019-2023 GeyserMC. http://geysermc.org + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @author GeyserMC + * @link https://github.com/GeyserMC/GeyserConnect + */ + package org.geysermc.connect.extension.ui; import org.cloudburstmc.protocol.bedrock.packet.BedrockPacketHandler; @@ -61,7 +86,8 @@ public class UIHandler { try { File messageFile = Utils.fileOrCopiedFromResource(GeyserConnect.instance().config().welcomeFile(), "welcome.txt"); message = new String(FileUtils.readAllBytes(messageFile), StandardCharsets.UTF_8); - } catch (IOException ignored) { } + } catch (IOException ignored) { + } if (!message.trim().isEmpty()) { session.sendForm(CustomForm.builder() diff --git a/src/main/java/org/geysermc/connect/extension/utils/Server.java b/src/main/java/org/geysermc/connect/extension/utils/Server.java index 56aa9e3..2a49299 100644 --- a/src/main/java/org/geysermc/connect/extension/utils/Server.java +++ b/src/main/java/org/geysermc/connect/extension/utils/Server.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020 GeyserMC. http://geysermc.org + * Copyright (c) 2019-2023 GeyserMC. http://geysermc.org * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -40,12 +40,10 @@ public record Server( String imageUrl, ServerCategory category ) implements RemoteServer { - public Server(String address, int port) { - this(address, port, true, false, null, null, ServerCategory.CUSTOM); + private int defaultPort() { + return bedrock ? 19132 : 25565; } - private int defaultPort() { return bedrock ? 19132 : 25565; } - @Override public int port() { return port < 0 ? defaultPort() : port; diff --git a/src/main/java/org/geysermc/connect/extension/utils/ServerCategory.java b/src/main/java/org/geysermc/connect/extension/utils/ServerCategory.java index 349f92e..d32a679 100644 --- a/src/main/java/org/geysermc/connect/extension/utils/ServerCategory.java +++ b/src/main/java/org/geysermc/connect/extension/utils/ServerCategory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2021 GeyserMC. http://geysermc.org + * Copyright (c) 2019-2023 GeyserMC. http://geysermc.org * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/org/geysermc/connect/extension/utils/ServerManager.java b/src/main/java/org/geysermc/connect/extension/utils/ServerManager.java index 5d19f21..33eddb9 100644 --- a/src/main/java/org/geysermc/connect/extension/utils/ServerManager.java +++ b/src/main/java/org/geysermc/connect/extension/utils/ServerManager.java @@ -1,3 +1,28 @@ +/* + * Copyright (c) 2019-2023 GeyserMC. http://geysermc.org + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @author GeyserMC + * @link https://github.com/GeyserMC/GeyserConnect + */ + package org.geysermc.connect.extension.utils; import org.geysermc.connect.extension.GeyserConnect; diff --git a/src/main/java/org/geysermc/connect/extension/utils/Utils.java b/src/main/java/org/geysermc/connect/extension/utils/Utils.java index 6a7e062..9048d59 100644 --- a/src/main/java/org/geysermc/connect/extension/utils/Utils.java +++ b/src/main/java/org/geysermc/connect/extension/utils/Utils.java @@ -1,3 +1,28 @@ +/* + * Copyright (c) 2019-2023 GeyserMC. http://geysermc.org + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @author GeyserMC + * @link https://github.com/GeyserMC/GeyserConnect + */ + package org.geysermc.connect.extension.utils; import com.fasterxml.jackson.databind.DeserializationFeature; @@ -39,7 +64,8 @@ public class Utils { writer.flush(); } } - } catch (URISyntaxException ignored) { } + } catch (URISyntaxException ignored) { + } } return file;