3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-02 17:40:09 +01:00

Added AbstractLoggingExtent for block loggers.

Dieser Commit ist enthalten in:
sk89q 2014-03-31 20:36:17 -07:00
Ursprung 302e493538
Commit 8ff09d6391

Datei anzeigen

@ -0,0 +1,49 @@
/*
* WorldEdit, a Minecraft world manipulation toolkit
* Copyright (C) sk89q <http://www.sk89q.com>
* Copyright (C) WorldEdit team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.sk89q.worldedit.extent;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.blocks.BaseBlock;
/**
* An abstract class to implement block loggers and so on with.
*/
public abstract class AbstractLoggingExtent extends ExtentDelegate {
/**
* Create a new instance.
*
* @param extent the extent
*/
public AbstractLoggingExtent(Extent extent) {
super(extent);
}
protected void onBlockSet(Vector position, BaseBlock newBlock) {
}
@Override
public final boolean setBlock(Vector position, BaseBlock block) throws WorldEditException {
onBlockSet(position, block);
return super.setBlock(position, block);
}
}