Added position/region logging.

This commit is contained in:
TomyLobo
2011-08-08 14:40:02 +02:00
parent 6f79df8398
commit cc917b424c
7 changed files with 139 additions and 6 deletions

View File

@ -24,6 +24,8 @@ import java.util.Set;
import com.sk89q.minecraft.util.commands.Command;
import com.sk89q.minecraft.util.commands.CommandContext;
import com.sk89q.minecraft.util.commands.CommandPermissions;
import com.sk89q.minecraft.util.commands.Logging;
import static com.sk89q.minecraft.util.commands.Logging.LogMode.*;
import com.sk89q.worldedit.*;
import com.sk89q.worldedit.data.LegacyChunkStore;
import com.sk89q.worldedit.data.McRegionChunkStore;
@ -88,6 +90,7 @@ public class ChunkCommands {
max = 0
)
@CommandPermissions({"worldedit.delchunks"})
@Logging(REGION)
public static void deleteChunks(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {

View File

@ -24,6 +24,8 @@ import java.io.IOException;
import com.sk89q.minecraft.util.commands.Command;
import com.sk89q.minecraft.util.commands.CommandContext;
import com.sk89q.minecraft.util.commands.CommandPermissions;
import com.sk89q.minecraft.util.commands.Logging;
import static com.sk89q.minecraft.util.commands.Logging.LogMode.*;
import com.sk89q.worldedit.*;
import com.sk89q.worldedit.blocks.BaseBlock;
import com.sk89q.worldedit.data.DataException;
@ -69,6 +71,7 @@ public class ClipboardCommands {
max = 1
)
@CommandPermissions({"worldedit.clipboard.cut"})
@Logging(REGION)
public static void cut(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -103,6 +106,7 @@ public class ClipboardCommands {
max = 0
)
@CommandPermissions({"worldedit.clipboard.paste"})
@Logging(PLACEMENT)
public static void paste(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {

View File

@ -22,6 +22,8 @@ package com.sk89q.worldedit.commands;
import com.sk89q.minecraft.util.commands.Command;
import com.sk89q.minecraft.util.commands.CommandContext;
import com.sk89q.minecraft.util.commands.CommandPermissions;
import com.sk89q.minecraft.util.commands.Logging;
import static com.sk89q.minecraft.util.commands.Logging.LogMode.*;
import com.sk89q.worldedit.*;
import com.sk89q.worldedit.patterns.Pattern;
import com.sk89q.worldedit.util.TreeGenerator;
@ -40,6 +42,7 @@ public class GenerationCommands {
max = 3
)
@CommandPermissions({"worldedit.generation.cylinder"})
@Logging(PLACEMENT)
public static void hcyl(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -61,6 +64,7 @@ public class GenerationCommands {
max = 3
)
@CommandPermissions({"worldedit.generation.cylinder"})
@Logging(PLACEMENT)
public static void cyl(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -82,6 +86,7 @@ public class GenerationCommands {
max = 3
)
@CommandPermissions({"worldedit.generation.sphere"})
@Logging(PLACEMENT)
public static void hsphere(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -111,6 +116,7 @@ public class GenerationCommands {
max = 3
)
@CommandPermissions({"worldedit.generation.sphere"})
@Logging(PLACEMENT)
public static void sphere(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -140,6 +146,7 @@ public class GenerationCommands {
max = 3
)
@CommandPermissions({"worldedit.generation.forest"})
@Logging(POSITION)
public static void forestGen(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -169,6 +176,7 @@ public class GenerationCommands {
max = 1
)
@CommandPermissions({"worldedit.generation.pumpkins"})
@Logging(POSITION)
public static void pumpkins(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -187,6 +195,7 @@ public class GenerationCommands {
max = 2
)
@CommandPermissions({"worldedit.generation.pyramid"})
@Logging(PLACEMENT)
public static void pyramid(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -209,6 +218,7 @@ public class GenerationCommands {
max = 2
)
@CommandPermissions({"worldedit.generation.pyramid"})
@Logging(PLACEMENT)
public static void hpyramid(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {

View File

@ -19,10 +19,13 @@
package com.sk89q.worldedit.commands;
import java.util.Set;
import com.sk89q.minecraft.util.commands.Command;
import com.sk89q.minecraft.util.commands.CommandContext;
import com.sk89q.minecraft.util.commands.CommandPermissions;
import com.sk89q.minecraft.util.commands.Logging;
import static com.sk89q.minecraft.util.commands.Logging.LogMode.*;
import com.sk89q.worldedit.*;
import com.sk89q.worldedit.blocks.BaseBlock;
import com.sk89q.worldedit.filtering.GaussianKernel;
@ -45,6 +48,7 @@ public class RegionCommands {
max = 1
)
@CommandPermissions({"worldedit.region.set"})
@Logging(REGION)
public static void set(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -71,6 +75,7 @@ public class RegionCommands {
max = 2
)
@CommandPermissions({"worldedit.region.replace"})
@Logging(REGION)
public static void replace(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -104,6 +109,7 @@ public class RegionCommands {
max = 1
)
@CommandPermissions({"worldedit.region.overlay"})
@Logging(REGION)
public static void overlay(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -129,6 +135,7 @@ public class RegionCommands {
max = 0
)
@CommandPermissions({"worldedit.region.naturalize"})
@Logging(REGION)
public static void naturalize(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -146,6 +153,7 @@ public class RegionCommands {
max = 1
)
@CommandPermissions({"worldedit.region.walls"})
@Logging(REGION)
public static void walls(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -164,6 +172,7 @@ public class RegionCommands {
max = 1
)
@CommandPermissions({"worldedit.region.faces"})
@Logging(REGION)
public static void faces(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -181,6 +190,7 @@ public class RegionCommands {
max = 1
)
@CommandPermissions({"worldedit.region.smooth"})
@Logging(REGION)
public static void smooth(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -206,6 +216,7 @@ public class RegionCommands {
max = 3
)
@CommandPermissions({"worldedit.region.move"})
@Logging(REGION) // TODO: Add view direction
public static void move(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -251,6 +262,7 @@ public class RegionCommands {
max = 2
)
@CommandPermissions({"worldedit.region.stack"})
@Logging(REGION) // TODO: Add view direction
public static void stack(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -286,6 +298,7 @@ public class RegionCommands {
max = 0
)
@CommandPermissions({"worldedit.regen"})
@Logging(REGION)
public static void regenerateChunk(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {

View File

@ -19,10 +19,13 @@
package com.sk89q.worldedit.commands;
import java.util.Set;
import com.sk89q.minecraft.util.commands.Command;
import com.sk89q.minecraft.util.commands.CommandContext;
import com.sk89q.minecraft.util.commands.CommandPermissions;
import com.sk89q.minecraft.util.commands.Logging;
import static com.sk89q.minecraft.util.commands.Logging.LogMode.*;
import com.sk89q.worldedit.*;
import com.sk89q.worldedit.blocks.BaseBlock;
import com.sk89q.worldedit.patterns.*;
@ -43,6 +46,7 @@ public class UtilityCommands {
max = 3
)
@CommandPermissions({"worldedit.fill"})
@Logging(PLACEMENT)
public static void fill(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -72,6 +76,7 @@ public class UtilityCommands {
max = 3
)
@CommandPermissions({"worldedit.fill.recursive"})
@Logging(PLACEMENT)
public static void fillr(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -101,6 +106,7 @@ public class UtilityCommands {
max = 1
)
@CommandPermissions({"worldedit.drain"})
@Logging(PLACEMENT)
public static void drain(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -120,6 +126,7 @@ public class UtilityCommands {
max = 1
)
@CommandPermissions({"worldedit.fixlava"})
@Logging(PLACEMENT)
public static void fixLava(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -139,6 +146,7 @@ public class UtilityCommands {
max = 1
)
@CommandPermissions({"worldedit.fixwater"})
@Logging(PLACEMENT)
public static void fixWater(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -158,6 +166,7 @@ public class UtilityCommands {
max = 2
)
@CommandPermissions({"worldedit.removeabove"})
@Logging(PLACEMENT)
public static void removeAbove(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -179,6 +188,7 @@ public class UtilityCommands {
max = 2
)
@CommandPermissions({"worldedit.removebelow"})
@Logging(PLACEMENT)
public static void removeBelow(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -200,6 +210,7 @@ public class UtilityCommands {
max = 2
)
@CommandPermissions({"worldedit.removenear"})
@Logging(PLACEMENT)
public static void removeNear(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -221,6 +232,7 @@ public class UtilityCommands {
max = 3
)
@CommandPermissions({"worldedit.replacenear"})
@Logging(PLACEMENT)
public static void replaceNear(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -253,6 +265,7 @@ public class UtilityCommands {
max = 1
)
@CommandPermissions({"worldedit.snow"})
@Logging(PLACEMENT)
public static void snow(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -271,6 +284,7 @@ public class UtilityCommands {
max = 1
)
@CommandPermissions({"worldedit.thaw"})
@Logging(PLACEMENT)
public static void thaw(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -289,6 +303,7 @@ public class UtilityCommands {
max = 1
)
@CommandPermissions({"worldedit.extinguish"})
@Logging(PLACEMENT)
public static void extinguish(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -314,6 +329,7 @@ public class UtilityCommands {
max = 1
)
@CommandPermissions({"worldedit.butcher"})
@Logging(PLACEMENT)
public static void butcher(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {
@ -334,6 +350,7 @@ public class UtilityCommands {
max = 2
)
@CommandPermissions({"worldedit.remove"})
@Logging(PLACEMENT)
public static void remove(CommandContext args, WorldEdit we,
LocalSession session, LocalPlayer player, EditSession editSession)
throws WorldEditException {