mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 17:57:38 +00:00
WorldEdit.getBlock (and its callers) can now throw any WorldEditException.
This commit is contained in:
parent
79bcfd815b
commit
cd0bc62931
@ -367,7 +367,7 @@ public class WorldEdit {
|
||||
}
|
||||
|
||||
public BaseBlock getBlock(LocalPlayer player, String arg, boolean allAllowed)
|
||||
throws UnknownItemException, DisallowedItemException {
|
||||
throws WorldEditException {
|
||||
return getBlock(player, arg, allAllowed, false);
|
||||
}
|
||||
|
||||
@ -384,7 +384,7 @@ public class WorldEdit {
|
||||
*/
|
||||
public BaseBlock getBlock(LocalPlayer player, String arg,
|
||||
boolean allAllowed, boolean allowNoData)
|
||||
throws UnknownItemException, DisallowedItemException {
|
||||
throws WorldEditException {
|
||||
BlockType blockType;
|
||||
arg = arg.replace("_", " ");
|
||||
arg = arg.replace(";", "|");
|
||||
@ -620,12 +620,12 @@ public class WorldEdit {
|
||||
* @throws DisallowedItemException
|
||||
*/
|
||||
public BaseBlock getBlock(LocalPlayer player, String id)
|
||||
throws UnknownItemException, DisallowedItemException {
|
||||
throws WorldEditException {
|
||||
return getBlock(player, id, false);
|
||||
}
|
||||
|
||||
public Set<BaseBlock> getBlocks(LocalPlayer player, String list, boolean allAllowed, boolean allowNoData)
|
||||
throws DisallowedItemException, UnknownItemException {
|
||||
throws WorldEditException {
|
||||
String[] items = list.split(",");
|
||||
Set<BaseBlock> blocks = new HashSet<BaseBlock>();
|
||||
for (String id : items) {
|
||||
@ -635,12 +635,12 @@ public class WorldEdit {
|
||||
}
|
||||
|
||||
public Set<BaseBlock> getBlocks(LocalPlayer player, String list, boolean allAllowed)
|
||||
throws DisallowedItemException, UnknownItemException {
|
||||
throws WorldEditException {
|
||||
return getBlocks(player, list, allAllowed, false);
|
||||
}
|
||||
|
||||
public Set<BaseBlock> getBlocks(LocalPlayer player, String list)
|
||||
throws DisallowedItemException, UnknownItemException {
|
||||
throws WorldEditException {
|
||||
return getBlocks(player, list, false);
|
||||
}
|
||||
|
||||
@ -655,7 +655,7 @@ public class WorldEdit {
|
||||
* @throws DisallowedItemException
|
||||
*/
|
||||
public Pattern getBlockPattern(LocalPlayer player, String patternString)
|
||||
throws UnknownItemException, DisallowedItemException {
|
||||
throws WorldEditException {
|
||||
|
||||
String[] items = patternString.split(",");
|
||||
|
||||
@ -804,7 +804,7 @@ public class WorldEdit {
|
||||
*/
|
||||
public Set<Integer> getBlockIDs(LocalPlayer player,
|
||||
String list, boolean allBlocksAllowed)
|
||||
throws UnknownItemException, DisallowedItemException {
|
||||
throws WorldEditException {
|
||||
|
||||
String[] items = list.split(",");
|
||||
Set<Integer> blocks = new HashSet<Integer>();
|
||||
|
@ -33,6 +33,7 @@ import com.sk89q.worldedit.LocalSession;
|
||||
import com.sk89q.worldedit.ServerInterface;
|
||||
import com.sk89q.worldedit.UnknownItemException;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||
import com.sk89q.worldedit.commands.InsufficientArgumentsException;
|
||||
import com.sk89q.worldedit.patterns.Pattern;
|
||||
@ -156,7 +157,7 @@ public class CraftScriptContext extends CraftScriptEnvironment {
|
||||
* @throws DisallowedItemException
|
||||
*/
|
||||
public BaseBlock getBlock(String arg, boolean allAllowed)
|
||||
throws UnknownItemException, DisallowedItemException {
|
||||
throws WorldEditException {
|
||||
return controller.getBlock(player, arg, allAllowed);
|
||||
}
|
||||
|
||||
@ -169,7 +170,7 @@ public class CraftScriptContext extends CraftScriptEnvironment {
|
||||
* @throws DisallowedItemException
|
||||
*/
|
||||
public BaseBlock getBlock(String id)
|
||||
throws UnknownItemException, DisallowedItemException {
|
||||
throws WorldEditException {
|
||||
return controller.getBlock(player, id, false);
|
||||
}
|
||||
|
||||
@ -182,7 +183,7 @@ public class CraftScriptContext extends CraftScriptEnvironment {
|
||||
* @throws DisallowedItemException
|
||||
*/
|
||||
public Pattern getBlockPattern(String list)
|
||||
throws UnknownItemException, DisallowedItemException {
|
||||
throws WorldEditException {
|
||||
return controller.getBlockPattern(player, list);
|
||||
}
|
||||
|
||||
@ -196,7 +197,7 @@ public class CraftScriptContext extends CraftScriptEnvironment {
|
||||
* @throws DisallowedItemException
|
||||
*/
|
||||
public Set<Integer> getBlockIDs(String list, boolean allBlocksAllowed)
|
||||
throws UnknownItemException, DisallowedItemException {
|
||||
throws WorldEditException {
|
||||
return controller.getBlockIDs(player, list, allBlocksAllowed);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user