mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Log plot chat to console
- Fix plot music removal template - Fix debug args
This commit is contained in:
parent
73936bb10d
commit
e97bc25fb8
@ -40,6 +40,7 @@ import com.plotsquared.core.listener.PlayerBlockEventType;
|
|||||||
import com.plotsquared.core.listener.PlotListener;
|
import com.plotsquared.core.listener.PlotListener;
|
||||||
import com.plotsquared.core.location.Location;
|
import com.plotsquared.core.location.Location;
|
||||||
import com.plotsquared.core.permissions.Permission;
|
import com.plotsquared.core.permissions.Permission;
|
||||||
|
import com.plotsquared.core.player.ConsolePlayer;
|
||||||
import com.plotsquared.core.player.MetaDataAccess;
|
import com.plotsquared.core.player.MetaDataAccess;
|
||||||
import com.plotsquared.core.player.PlayerMetaDataKeys;
|
import com.plotsquared.core.player.PlayerMetaDataKeys;
|
||||||
import com.plotsquared.core.player.PlotPlayer;
|
import com.plotsquared.core.player.PlotPlayer;
|
||||||
@ -725,8 +726,13 @@ public class PlayerEventListener extends PlotListener implements Listener {
|
|||||||
player.sendMessage(spymsg, plotidTemplate, spysenderTemplate, spymessageTemplate);
|
player.sendMessage(spymsg, plotidTemplate, spysenderTemplate, spymessageTemplate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO: Re-implement
|
if (Settings.Chat.LOG_PLOTCHAT_TO_CONSOLE) {
|
||||||
// PlotSquared.debug(full);
|
Caption spymsg = TranslatableCaption.of("chat.plot_chat_spy_format");
|
||||||
|
Template plotidTemplate = Template.of("plot_id", id.getX() + ";" + id.getY());
|
||||||
|
Template spysenderTemplate = Template.of("sender", sender);
|
||||||
|
Template spymessageTemplate = Template.of("msg", Component.text(message));
|
||||||
|
ConsolePlayer.getConsole().sendMessage(spymsg, plotidTemplate, spysenderTemplate, spymessageTemplate);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
|
@ -79,7 +79,7 @@ public class Debug extends SubCommand {
|
|||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
TranslatableCaption.of("commandconfig.command_syntax"),
|
TranslatableCaption.of("commandconfig.command_syntax"),
|
||||||
Template.of("value", "/plot debug <loadedchunks | debug-players | entitytypes | msg>")
|
Template.of("value", "/plot debug <loadedchunks | player | debug-players | entitytypes | msg>")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (args.length > 0) {
|
if (args.length > 0) {
|
||||||
|
@ -104,8 +104,9 @@ public class Music extends SubCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
plot.removeFlag(event.getFlag());
|
plot.removeFlag(event.getFlag());
|
||||||
getPlayer().sendMessage(TranslatableCaption.of("flag.flag_removed"), Template.of("flag",
|
getPlayer().sendMessage(TranslatableCaption.of("flag.flag_removed"),
|
||||||
String.valueOf(event.getFlag())
|
Template.of("flag", String.valueOf(event.getFlag())),
|
||||||
|
Template.of("value", String.valueOf(event.getFlag().getValue())
|
||||||
));
|
));
|
||||||
} else if (item.getName().toLowerCase(Locale.ENGLISH).contains("disc")) {
|
} else if (item.getName().toLowerCase(Locale.ENGLISH).contains("disc")) {
|
||||||
PlotFlag<?, ?> plotFlag = plot.getFlagContainer().getFlag(MusicFlag.class)
|
PlotFlag<?, ?> plotFlag = plot.getFlagContainer().getFlag(MusicFlag.class)
|
||||||
|
@ -509,6 +509,9 @@ public class Settings extends Config {
|
|||||||
@Comment("Should the chat be interactive?")
|
@Comment("Should the chat be interactive?")
|
||||||
public static boolean INTERACTIVE = true;
|
public static boolean INTERACTIVE = true;
|
||||||
|
|
||||||
|
@Comment("Should the plot chat be logged to console?")
|
||||||
|
public static boolean LOG_PLOTCHAT_TO_CONSOLE = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user