mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-30 12:06:41 +00:00
More progress towards 1.13
This commit is contained in:
@ -6,6 +6,7 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
public class RollbackEntry
|
||||
{
|
||||
@ -16,7 +17,7 @@ public class RollbackEntry
|
||||
public final int x;
|
||||
public final short y;
|
||||
public final int z;
|
||||
public final byte data;
|
||||
public final BlockData data;
|
||||
public final Material blockMaterial;
|
||||
private final boolean isBreak;
|
||||
|
||||
@ -33,13 +34,13 @@ public class RollbackEntry
|
||||
if (entryType == EntryType.BLOCK_BREAK)
|
||||
{
|
||||
this.blockMaterial = block.getType();
|
||||
this.data = DepreciationAggregator.getData_Block(block);
|
||||
this.data = block.getBlockData();
|
||||
this.isBreak = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.blockMaterial = block.getType();
|
||||
this.data = DepreciationAggregator.getData_Block(block);
|
||||
this.data = block.getBlockData();
|
||||
this.isBreak = false;
|
||||
}
|
||||
}
|
||||
@ -73,7 +74,7 @@ public class RollbackEntry
|
||||
if (isBreak)
|
||||
{
|
||||
block.setType(getMaterial());
|
||||
DepreciationAggregator.setData_Block(block, data);
|
||||
block.setBlockData(data);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -92,7 +93,7 @@ public class RollbackEntry
|
||||
else
|
||||
{
|
||||
block.setType(getMaterial());
|
||||
DepreciationAggregator.setData_Block(block, data);
|
||||
block.setBlockData(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -275,7 +275,7 @@ public class RollbackManager extends FreedomService
|
||||
for (RollbackEntry entry : entries)
|
||||
{
|
||||
FUtil.playerMsg(player, " - " + ChatColor.BLUE + entry.author + " " + entry.getType() + " "
|
||||
+ StringUtils.capitalize(entry.getMaterial().toString().toLowerCase()) + (entry.data == 0 ? "" : ":" + entry.data));
|
||||
+ StringUtils.capitalize(entry.getMaterial().toString().toLowerCase()) + (entry.data == null ? "" : ":" + entry.data));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user