mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 22:15:08 +00:00
Add ChannelSwitchEvent (#413)
This commit is contained in:
1 parent
8ef507f51c
commit
2ed8ef2298
11 files changed
+126
-1
No files matched your search
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* CarbonChat
|
||||
*
|
||||
* Copyright (c) 2024 Josua Parks (Vicarious)
|
||||
* Contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package net.draycia.carbon.api.event.events;
|
||||
|
||||
import net.draycia.carbon.api.channels.ChatChannel;
|
||||
import net.draycia.carbon.api.event.CarbonEvent;
|
||||
import net.draycia.carbon.api.users.CarbonPlayer;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.framework.qual.DefaultQualifier;
|
||||
|
||||
/**
|
||||
* Called when a player switches channels.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*/
|
||||
@DefaultQualifier(NonNull.class)
|
||||
public interface ChannelSwitchEvent extends CarbonEvent {
|
||||
|
||||
/**
|
||||
* The player switching channels.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*/
|
||||
CarbonPlayer player();
|
||||
|
||||
/**
|
||||
* The channel the player is switching to.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*/
|
||||
ChatChannel channel();
|
||||
|
||||
/**
|
||||
* Sets the player's new channel.
|
||||
*
|
||||
* @param chatChannel the new channel
|
||||
* @since 3.0.0
|
||||
*/
|
||||
void channel(final ChatChannel chatChannel);
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user