mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-18 15:17:36 +01:00
Added coordinates to blacklist file logger.
This commit is contained in:
parent
e94a9bf68f
commit
d619ed5798
@ -206,6 +206,16 @@ private void log(Player player, String message, String comment) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the coordinates of a block in text form for the log.
|
||||||
|
*
|
||||||
|
* @param block
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private String getCoordinates(Block block) {
|
||||||
|
return "@" + block.getX() + "," + block.getY() + "," + block.getZ();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log a block destroy attempt.
|
* Log a block destroy attempt.
|
||||||
*
|
*
|
||||||
@ -213,7 +223,8 @@ private void log(Player player, String message, String comment) {
|
|||||||
* @param block
|
* @param block
|
||||||
*/
|
*/
|
||||||
public void logDestroyAttempt(Player player, Block block, String comment) {
|
public void logDestroyAttempt(Player player, Block block, String comment) {
|
||||||
log(player, "Tried to destroy " + getFriendlyItemName(block.getType()),
|
log(player, "Tried to destroy " + getFriendlyItemName(block.getType())
|
||||||
|
+ " " + getCoordinates(block),
|
||||||
comment);
|
comment);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -224,7 +235,8 @@ public void logDestroyAttempt(Player player, Block block, String comment) {
|
|||||||
* @param block
|
* @param block
|
||||||
*/
|
*/
|
||||||
public void logBreakAttempt(Player player, Block block, String comment) {
|
public void logBreakAttempt(Player player, Block block, String comment) {
|
||||||
log(player, "Tried to break " + getFriendlyItemName(block.getType()),
|
log(player, "Tried to break " + getFriendlyItemName(block.getType())
|
||||||
|
+ " " + getCoordinates(block),
|
||||||
comment);
|
comment);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -235,7 +247,8 @@ public void logBreakAttempt(Player player, Block block, String comment) {
|
|||||||
* @param block
|
* @param block
|
||||||
*/
|
*/
|
||||||
public void logUseAttempt(Player player, Block block, String comment) {
|
public void logUseAttempt(Player player, Block block, String comment) {
|
||||||
log(player, "Tried to use " + getFriendlyItemName(block.getType()),
|
log(player, "Tried to use " + getFriendlyItemName(block.getType())
|
||||||
|
+ " " + getCoordinates(block),
|
||||||
comment);
|
comment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user