@@ -32,7 +32,7 @@ public class BlockMetadataStore extends MetadataStoreBase<Block> implements Meta
|
||||
*/
|
||||
@Override
|
||||
protected String disambiguate(Block block, String metadataKey) {
|
||||
return Integer.toString(block.getX()) + ":" + Integer.toString(block.getY()) + ":" + Integer.toString(block.getZ()) + ":" + metadataKey;
|
||||
return Integer.toString(block.getX()) + ":" + Integer.toString(block.getY()) + ":" + Integer.toString(block.getZ()) + ":" + metadataKey;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -42,7 +42,7 @@ public class BlockMetadataStore extends MetadataStoreBase<Block> implements Meta
|
||||
*/
|
||||
@Override
|
||||
public List<MetadataValue> getMetadata(Block block, String metadataKey) {
|
||||
if(block.getWorld() == owningWorld) {
|
||||
if (block.getWorld() == owningWorld) {
|
||||
return super.getMetadata(block, metadataKey);
|
||||
} else {
|
||||
throw new IllegalArgumentException("Block does not belong to world " + owningWorld.getName());
|
||||
@@ -56,7 +56,7 @@ public class BlockMetadataStore extends MetadataStoreBase<Block> implements Meta
|
||||
*/
|
||||
@Override
|
||||
public boolean hasMetadata(Block block, String metadataKey) {
|
||||
if(block.getWorld() == owningWorld) {
|
||||
if (block.getWorld() == owningWorld) {
|
||||
return super.hasMetadata(block, metadataKey);
|
||||
} else {
|
||||
throw new IllegalArgumentException("Block does not belong to world " + owningWorld.getName());
|
||||
@@ -70,7 +70,7 @@ public class BlockMetadataStore extends MetadataStoreBase<Block> implements Meta
|
||||
*/
|
||||
@Override
|
||||
public void removeMetadata(Block block, String metadataKey, Plugin owningPlugin) {
|
||||
if(block.getWorld() == owningWorld) {
|
||||
if (block.getWorld() == owningWorld) {
|
||||
super.removeMetadata(block, metadataKey, owningPlugin);
|
||||
} else {
|
||||
throw new IllegalArgumentException("Block does not belong to world " + owningWorld.getName());
|
||||
@@ -84,7 +84,7 @@ public class BlockMetadataStore extends MetadataStoreBase<Block> implements Meta
|
||||
*/
|
||||
@Override
|
||||
public void setMetadata(Block block, String metadataKey, MetadataValue newMetadataValue) {
|
||||
if(block.getWorld() == owningWorld) {
|
||||
if (block.getWorld() == owningWorld) {
|
||||
super.setMetadata(block, metadataKey, newMetadataValue);
|
||||
} else {
|
||||
throw new IllegalArgumentException("Block does not belong to world " + owningWorld.getName());
|
||||
|
||||
Reference in New Issue
Block a user