Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
0c652180
Commit
0c652180
authored
May 17, 2022
by
muhammadeko
Committed by
Melledy
May 17, 2022
Browse files
add CommandResponseEvent
parent
10fe5d11
Changes
2
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/command/CommandHandler.java
View file @
0c652180
...
...
@@ -2,6 +2,8 @@ package emu.grasscutter.command;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.game.player.Player
;
import
emu.grasscutter.server.event.game.CommandResponseEvent
;
import
emu.grasscutter.server.event.types.ServerEvent
;
import
java.util.List
;
...
...
@@ -19,6 +21,8 @@ public interface CommandHandler {
}
else
{
player
.
dropMessage
(
message
);
}
CommandResponseEvent
event
=
new
CommandResponseEvent
(
ServerEvent
.
Type
.
GAME
,
player
,
message
);
event
.
call
();
}
/**
...
...
src/main/java/emu/grasscutter/server/event/game/CommandResponseEvent.java
0 → 100644
View file @
0c652180
package
emu.grasscutter.server.event.game
;
import
emu.grasscutter.game.player.Player
;
import
emu.grasscutter.server.event.types.GameEvent
;
import
emu.grasscutter.server.event.types.ServerEvent
;
public
class
CommandResponseEvent
extends
ServerEvent
{
private
String
message
;
private
Player
player
;
public
CommandResponseEvent
(
Type
type
,
Player
player
,
String
message
)
{
super
(
type
);
this
.
message
=
message
;
this
.
player
=
player
;
}
public
String
getMessage
()
{
return
message
;
}
public
Player
getPlayer
()
{
return
player
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment