eisental/Rubyc — Issue #23: api - getWorldEditSelection
Author: mstram
Created: 2012-01-18 11:51:35+00:00
State: open

Can getWorldEditSelection (worldedit) be accessed from rubyc ?

I tried copying all the imports from rcsel.java :

require 'java'
import 'org.tal.rubychip.RubyCircuit'
import 'org.tal.redstonechips.circuit.Circuit'
import 'org.bukkit.event.player.PlayerMoveEvent'

##################
import 'java.lang.reflect.InvocationTargetException'
import 'java.lang.reflect.Method'
import 'java.util.ArrayList'
import 'java.util.HashMap'
import 'java.util.List'
import 'java.util.Map'
import 'java.util.logging.Level'

#########################
import 'org.bukkit.ChatColor'
import 'org.bukkit.Location'
import 'org.bukkit.Material'
import 'org.bukkit.block.Block'
import 'org.bukkit.command.Command'
import 'org.bukkit.command.CommandSender'
import 'org.bukkit.entity.Player'
import 'org.bukkit.material.MaterialData'
import 'org.bukkit.plugin.Plugin'
import 'org.tal.redstonechips.PrefsManager'

##################
#import 'org.bukkit.event.player.Player'

and then tried these :

begin
sel1 = circuit.world.getWorldEditSelection()
debug "sel1 = #{sel1}"
rescue Exception
puts "error #{$!}"
end

begin
sel2 = world.getWorldEditSelection()
debug "sel2 = #{sel2}"
rescue Exception
puts "error #{$!}"
end

begin
sel3 = getWorldEditSelection()
debug "sel3 = #{sel2}"
rescue Exception
puts "error #{$!}"
end