SteamWar/BungeeCore
Archiviert
13
2

Add /bau delete Confirm GUI

Add License
Dieser Commit ist enthalten in:
Chaoscaot 2020-09-20 12:13:35 +02:00
Ursprung 7559012a9b
Commit 70071893fa
15 geänderte Dateien mit 262 neuen und 81 gelöschten Zeilen

Datei anzeigen

@ -127,8 +127,6 @@ public class BungeeCore extends Plugin {
new IgnoreCommand();
new UnIgnoreCommand();
new TestCommand();
new EventStarter();
new Broadcaster();
new SessionManager();
@ -217,28 +215,7 @@ public class BungeeCore extends Plugin {
ProxyServer.getInstance().stop("Could not save conig file");
return;
}
try {
config = ConfigurationProvider.getProvider(YamlConfiguration.class).load(configFile);
}
catch (YAMLException e) {
e.printStackTrace();
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;
}
}catch(IOException e){
log("Could not save/load config.yml", e);
ProxyServer.getInstance().stop();

Datei anzeigen

@ -20,6 +20,8 @@
package de.steamwar.bungeecore.commands;
import de.steamwar.bungeecore.*;
import de.steamwar.bungeecore.comms.packets.inventory.SWInventory;
import de.steamwar.bungeecore.comms.packets.inventory.SWItem;
import de.steamwar.bungeecore.sql.BauweltMember;
import de.steamwar.bungeecore.sql.SteamwarUser;
import net.md_5.bungee.api.ProxyServer;
@ -226,6 +228,11 @@ public class BauCommand {
}
private static void delete(ProxiedPlayer p, String[] command){
SWInventory inventory = new SWInventory(p, 9, "§eDelete Confirm");
inventory.addItem(1, new SWItem(1, "§cDecline", 1), click -> {
inventory.close();
});
inventory.addItem(7, new SWItem(7, "§aAccept", 10), click -> {
if(bau15(p, command, 2)){
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§aDeine Welt wird zurückgesetzt.");
ProxyServer.getInstance().getScheduler().runAsync(BungeeCore.get(), () -> {
@ -252,6 +259,8 @@ public class BauCommand {
del(directory);
});
}
});
inventory.open();
}
private static void testarena(ProxiedPlayer p, String[] command){

Datei anzeigen

@ -1,33 +0,0 @@
package de.steamwar.bungeecore.commands;
import de.steamwar.bungeecore.comms.packets.inventory.SWInventory;
import de.steamwar.bungeecore.comms.packets.inventory.SWItem;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.connection.ProxiedPlayer;
public class TestCommand extends BasicCommand {
public TestCommand() {
super("test", null);
}
@Override
public void execute(CommandSender commandSender, String[] strings) {
if(!(commandSender instanceof ProxiedPlayer))
return;
SWInventory inventory = new SWInventory((ProxiedPlayer) commandSender, 3*9, "Test Inventory");
SWItem item = new SWItem("DIRT1", 13, "§e§lTest Item");
item.setSkullOwner(commandSender.getName());
for (ProxiedPlayer player:
((ProxiedPlayer) commandSender).getServer().getInfo().getPlayers()) {
item.addLore("§6" + player.getDisplayName());
}
item.setEnchanted(true);
item.setCallback(click -> {
inventory.close();
commandSender.sendMessage("TEST!!! FJOnbds");
});
inventory.addItem(item);
inventory.open();
}
}

Datei anzeigen

@ -1,3 +1,22 @@
/*
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 <https://www.gnu.org/licenses/>.
*/
package de.steamwar.bungeecore.comms;
import com.google.common.io.ByteArrayDataOutput;

Datei anzeigen

@ -1,3 +1,22 @@
/*
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 <https://www.gnu.org/licenses/>.
*/
package de.steamwar.bungeecore.comms;
import com.google.common.io.ByteArrayDataInput;

Datei anzeigen

@ -1,3 +1,22 @@
/*
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 <https://www.gnu.org/licenses/>.
*/
package de.steamwar.bungeecore.comms;
import com.google.common.io.ByteArrayDataInput;

Datei anzeigen

@ -1,3 +1,22 @@
/*
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 <https://www.gnu.org/licenses/>.
*/
package de.steamwar.bungeecore.comms.handlers;
import com.google.common.io.ByteArrayDataInput;

Datei anzeigen

@ -1,3 +1,22 @@
/*
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 <https://www.gnu.org/licenses/>.
*/
package de.steamwar.bungeecore.comms.packets;
import com.google.common.io.ByteArrayDataOutput;

Datei anzeigen

@ -1,3 +1,22 @@
/*
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 <https://www.gnu.org/licenses/>.
*/
package de.steamwar.bungeecore.comms.packets;
import com.google.common.io.ByteArrayDataOutput;

Datei anzeigen

@ -1,3 +1,22 @@
/*
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 <https://www.gnu.org/licenses/>.
*/
package de.steamwar.bungeecore.comms.packets;
import com.google.common.io.ByteArrayDataOutput;

Datei anzeigen

@ -1,3 +1,22 @@
/*
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 <https://www.gnu.org/licenses/>.
*/
package de.steamwar.bungeecore.comms.packets.inventory;
public interface InvCallback {

Datei anzeigen

@ -1,3 +1,22 @@
/*
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 <https://www.gnu.org/licenses/>.
*/
package de.steamwar.bungeecore.comms.packets.inventory;
import de.steamwar.bungeecore.comms.handlers.InventoryCallbackHandler;

Datei anzeigen

@ -1,3 +1,22 @@
/*
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 <https://www.gnu.org/licenses/>.
*/
package de.steamwar.bungeecore.comms.packets.inventory;
import com.google.gson.JsonArray;

Datei anzeigen

@ -1,3 +1,22 @@
/*
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 <https://www.gnu.org/licenses/>.
*/
package de.steamwar.bungeecore.comms.packets.inventory;
import de.steamwar.bungeecore.sql.Schematic;

Datei anzeigen

@ -1,3 +1,22 @@
/*
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 <https://www.gnu.org/licenses/>.
*/
package de.steamwar.bungeecore.sql;
import java.sql.ResultSet;