mirror of
https://github.com/Melledy/Nebula.git
synced 2026-09-20 01:29:54 +02:00
Improve command system
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package emu.nebula.command;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
public class CommandResult {
|
||||
private CommandHandler command;
|
||||
private String message;
|
||||
|
||||
public boolean isCommandTypeOf(Class<? extends CommandHandler> handler) {
|
||||
if (command == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return command.getClass().equals(handler);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user