Fix commandspy

This commit is contained in:
Telesphoreo 2022-02-25 01:15:13 -06:00
parent bd21e5d2ba
commit 3b2566039d
7 changed files with 11 additions and 9 deletions

View File

@ -7,6 +7,7 @@ import dev.plex.command.annotation.CommandPermissions;
import dev.plex.command.source.RequiredCommandSource;
import dev.plex.player.PlexPlayer;
import dev.plex.rank.enums.Rank;
import dev.plex.util.PlexUtils;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.NamedTextColor;
import org.bukkit.command.CommandSender;
@ -26,9 +27,9 @@ public class CommandSpyCMD extends PlexCommand
PlexPlayer plexPlayer = DataUtils.getPlayer(playerSender.getUniqueId());
plexPlayer.setCommandSpy(!plexPlayer.isCommandSpy());
DataUtils.update(plexPlayer);
return Component.text("CommandSpy has been").color(NamedTextColor.GRAY)
return Component.text(PlexUtils.messageString("toggleCommandSpy")).color(NamedTextColor.GRAY)
.append(Component.space())
.append(Component.text(plexPlayer.isCommandSpy() ? "enabled." : "disabled.").color(NamedTextColor.GRAY));
.append(Component.text(plexPlayer.isCommandSpy() ? PlexUtils.messageString("enabled") : PlexUtils.messageString("disabled")).color(NamedTextColor.GRAY));
}
return null;
}

View File

@ -10,7 +10,7 @@ import org.bukkit.event.HandlerList;
/**
* Event that is ran when a player is added to the admin list
*/
@EqualsAndHashCode(callSuper = true)
@EqualsAndHashCode(callSuper = false)
@Data
public class AdminAddEvent extends Event
{

View File

@ -10,7 +10,7 @@ import org.bukkit.event.HandlerList;
/**
* Event that is ran when a player is removed from the admin list
*/
@EqualsAndHashCode(callSuper = true)
@EqualsAndHashCode(callSuper = false)
@Data
public class AdminRemoveEvent extends Event
{

View File

@ -11,7 +11,7 @@ import org.bukkit.event.HandlerList;
/**
* Event that is ran when an admin's rank is set
*/
@EqualsAndHashCode(callSuper = true)
@EqualsAndHashCode(callSuper = false)
@Data
public class AdminSetRankEvent extends Event
{

View File

@ -9,7 +9,7 @@ import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
@EqualsAndHashCode(callSuper = true)
@EqualsAndHashCode(callSuper = false)
@Data
public class GameModeUpdateEvent extends Event
{

View File

@ -34,6 +34,7 @@ public class GameRuleService extends AbstractService
world.setGameRule(GameRule.COMMAND_BLOCK_OUTPUT, false);
world.setGameRule(GameRule.NATURAL_REGENERATION, true);
world.setGameRule(GameRule.DO_DAYLIGHT_CYCLE, false);
world.setGameRule(GameRule.DO_WEATHER_CYCLE, false);
world.setGameRule(GameRule.ANNOUNCE_ADVANCEMENTS, false);
world.setGameRule(GameRule.SHOW_DEATH_MESSAGES, false);
world.setGameRule(GameRule.SEND_COMMAND_FEEDBACK, false);

View File

@ -99,6 +99,6 @@ unbanningPlayer: "<aqua><v> - Unbanning <v>"
playerNotBanned: "<red>That player is not banned!"
teleportedToWorldSpawn: "<aqua>Teleporting to the local spawn"
toggleCommandSpy: "CommandSpy has been"
enabled: "enabled"
disabled: "disabled"
enabled: "enabled."
disabled: "disabled."
adminChatFormat: '&8[&9AdminChat&8] &4<v> &7» &6<v>'