Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-05 11:00:05 +01:00
WorldEdit.getBlock (and its callers) can now throw any WorldEditException.
Dieser Commit ist enthalten in:
Ursprung
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);
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren