SteamWar/BauSystem2.0
Archiviert
12
0

Update Permission #220

Zusammengeführt
YoyoNow hat 35 Commits von PermissionUpdate nach master 2024-02-17 08:53:31 +01:00 zusammengeführt
2 geänderte Dateien mit 86 neuen und 0 gelöschten Zeilen
Nur Änderungen aus Commit f5e4d725fe werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -0,0 +1,50 @@
/*
* This file is a part of the SteamWar software.
*
* Copyright (C) 2023 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.bausystem.features.world;
import de.steamwar.bausystem.utils.BauMemberUpdateEvent;
import de.steamwar.command.SWCommand;
import de.steamwar.linkage.Linked;
import de.steamwar.network.packets.PacketHandler;
import de.steamwar.network.packets.server.BaumemberUpdatePacket;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
@Linked
public class BauMemberUpdate extends PacketHandler {
@Handler
public void baumemberUpdate(BaumemberUpdatePacket baumemberUpdatePacket) {
Bukkit.getPluginManager().callEvent(new BauMemberUpdateEvent());
}
@Linked
public static class TestCommand extends SWCommand { // TODO: Remove before merge
public TestCommand() {
super("test");
}
@Register
public void test(Player player) {
PacketHandler.handlePacket(new BaumemberUpdatePacket());
}
}
}

Datei anzeigen

@ -0,0 +1,36 @@
/*
* This file is a part of the SteamWar software.
*
* Copyright (C) 2023 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.bausystem.utils;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
public class BauMemberUpdateEvent extends Event {
private static final HandlerList handlers = new HandlerList();
public HandlerList getHandlers() {
return handlers;
}
public static HandlerList getHandlerList() {
return handlers;
}
}