mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-15 08:25:21 +01:00
Add existing commands
This commit is contained in:
@@ -485,7 +485,7 @@ public class GenshinPlayer {
|
||||
this.regionId = regionId;
|
||||
}
|
||||
|
||||
public boolean hasGodmode() {
|
||||
public boolean inGodmode() {
|
||||
return godmode;
|
||||
}
|
||||
|
||||
@@ -558,6 +558,15 @@ public class GenshinPlayer {
|
||||
public void dropMessage(Object message) {
|
||||
this.sendPacket(new PacketPrivateChatNotify(GenshinConstants.SERVER_CONSOLE_UID, getId(), message.toString()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a message to another player.
|
||||
* @param sender The sender of the message.
|
||||
* @param message The message to send.
|
||||
*/
|
||||
public void sendMessage(GenshinPlayer sender, Object message) {
|
||||
this.sendPacket(new PacketPrivateChatNotify(sender.getId(), this.getId(), message.toString()));
|
||||
}
|
||||
|
||||
public void interactWith(int gadgetEntityId) {
|
||||
GenshinEntity entity = getWorld().getEntityById(gadgetEntityId);
|
||||
|
||||
@@ -344,7 +344,7 @@ public class World implements Iterable<GenshinPlayer> {
|
||||
|
||||
// Godmode check
|
||||
if (target instanceof EntityAvatar) {
|
||||
if (((EntityAvatar) target).getPlayer().hasGodmode()) {
|
||||
if (((EntityAvatar) target).getPlayer().inGodmode()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user