forked from PlayPro/CoreProtect
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for proper logging of CustomBlocks, bump version
- Loading branch information
1 parent
2e82273
commit 97f6d01
Showing
6 changed files
with
90 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
src/main/java/net/coreprotect/event/CoreProtectPreLogBlockEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package net.coreprotect.event; | ||
|
||
import org.bukkit.Location; | ||
import org.bukkit.Material; | ||
|
||
public class CoreProtectPreLogBlockEvent extends CoreProtectPreLogEvent { | ||
private boolean cancelled = false; | ||
|
||
BlockAction action; | ||
Location location; | ||
Material type; | ||
String blockData; | ||
|
||
public CoreProtectPreLogBlockEvent(String user, BlockAction action, Location location, Material type, String blockData) { | ||
super(user); | ||
this.action = action; | ||
this.location = location; | ||
this.type = type; | ||
this.blockData = blockData; | ||
} | ||
|
||
public BlockAction getAction() { | ||
return action; | ||
} | ||
|
||
public Location getLocation() { | ||
return location; | ||
} | ||
|
||
public Material getType() { | ||
return type; | ||
} | ||
|
||
public String getBlockData() { | ||
return blockData; | ||
} | ||
|
||
public enum BlockAction { | ||
PLACE, | ||
BREAK | ||
} | ||
|
||
@Override | ||
public boolean isCancelled() { | ||
return cancelled; | ||
} | ||
|
||
@Override | ||
public void setCancelled(boolean cancel) { | ||
cancelled = cancel; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters