forked from SteamWar/SteamWar
Add StreamingCommand for UserPerm.PREFIX_YOUTUBER
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
package de.steamwar.velocitycore.commands;
|
package de.steamwar.velocitycore.commands;
|
||||||
|
|
||||||
|
import com.velocitypowered.api.command.SimpleCommand;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.linkage.EventMode;
|
import de.steamwar.linkage.EventMode;
|
||||||
import de.steamwar.linkage.Linked;
|
import de.steamwar.linkage.Linked;
|
||||||
@@ -40,7 +41,13 @@ public class StreamingCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public StreamingCommand() {
|
public StreamingCommand() {
|
||||||
super("streaming", UserPerm.TEAM);
|
super("streaming");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean hasPermission(SimpleCommand.Invocation invocation) {
|
||||||
|
SteamwarUser user = Chatter.of(invocation.source()).user();
|
||||||
|
return user.hasPerm(UserPerm.TEAM) || user.hasPerm(UserPerm.PREFIX_YOUTUBER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Register
|
@Register
|
||||||
|
|||||||
Reference in New Issue
Block a user