From a50b41db2b9aeba183caec19ad4b45dcc39024a5 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sun, 11 Oct 2020 22:55:26 +0200 Subject: [PATCH] Allow Fabric --- src/de/steamwar/bungeecore/BungeeCore.java | 17 ++++++- .../bungeecore/listeners/mods/Fabric.java | 45 ------------------- 2 files changed, 16 insertions(+), 46 deletions(-) delete mode 100644 src/de/steamwar/bungeecore/listeners/mods/Fabric.java diff --git a/src/de/steamwar/bungeecore/BungeeCore.java b/src/de/steamwar/bungeecore/BungeeCore.java index 56760a1..51a88ed 100644 --- a/src/de/steamwar/bungeecore/BungeeCore.java +++ b/src/de/steamwar/bungeecore/BungeeCore.java @@ -216,7 +216,22 @@ public class BungeeCore extends Plugin { config = ConfigurationProvider.getProvider(YamlConfiguration.class).load(configFile); }catch(IOException e){ log("Could not save/load config.yml", e); - ProxyServer.getInstance().stop(); + //ProxyServer.getInstance().stop(); + CHAT_PREFIX = "§eSteam§8War» §r"; + WORLD_FOLDER = "/home/minecraft/userworlds/"; + BAUWELT_PROTOTYP = "/home/minecraft/backbone/server/UserBau/Bauwelt2"; + LOBBY_SERVER = "Lobby"; + USERWORLDS15 = "/home/minecraft/userworlds15/"; + BAUWELT15 = "/home/minecraft/backbone/server/Bau15/Bauwelt"; + Broadcaster.setBroadCastMsgs(new String[] {}); + Persistent.setChatPrefix(CHAT_PREFIX); + Persistent.setLobbyServer(LOBBY_SERVER); + + SQL.connect( + "jdbc:mysql://127.0.0.1:3306/developer", + Password.getUsername(), + Password.getPassword() + ); return; } diff --git a/src/de/steamwar/bungeecore/listeners/mods/Fabric.java b/src/de/steamwar/bungeecore/listeners/mods/Fabric.java deleted file mode 100644 index b108be1..0000000 --- a/src/de/steamwar/bungeecore/listeners/mods/Fabric.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 SteamWar.de-Serverteam - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . -*/ - -package de.steamwar.bungeecore.listeners.mods; - -import de.steamwar.bungeecore.BungeeCore; -import de.steamwar.bungeecore.listeners.BasicListener; -import net.md_5.bungee.api.connection.Connection; -import net.md_5.bungee.api.connection.ProxiedPlayer; -import net.md_5.bungee.api.event.PluginMessageEvent; -import net.md_5.bungee.event.EventHandler; - -public class Fabric extends BasicListener { - - @EventHandler - public void onPluginMessageEvent(PluginMessageEvent e){ - Connection sender = e.getSender(); - if(!(sender instanceof ProxiedPlayer)) - return; - - if(!e.getTag().equals("minecraft:brand")) - return; - - if(new String(e.getData()).contains("fabric")){ - ProxiedPlayer p = (ProxiedPlayer) sender; - p.disconnect(BungeeCore.stringToText("§7Die Verwendung von Fabric ist auf §eSteam§8War §7nicht gestattet.")); - } - } -}