Commit graph

572 Commits

Autor SHA1 Nachricht Datum
zml2008
7922c437bf Allow copying item stacks with damage of > Byte.MAX_VALUE. Closes #972 2012-01-08 21:31:57 -08:00
zml2008
68c821d8a6 Updated for new SpoutAPI command methods 2012-01-08 21:11:13 -08:00
zml2008
c0d13e9b7d Updated for package changes in SpoutAPI 2012-01-08 17:05:35 -08:00
zml2008
9c3634d93d Updated for SpoutAPI Material changes 2012-01-08 11:49:01 -08:00
TomyLobo
4890c1ef9c Optimized Vector[2D].containedWithin and Vector.equals slightly. 2012-01-08 16:30:43 +01:00
TomyLobo
99b0345ca6 Fixed a javadoc in Vector.java. 2012-01-08 16:30:43 +01:00
zml2008
750e525806 Added permissions support for SpoutPlayer 2012-01-07 22:15:32 -08:00
TomyLobo
e1428602af Fixed Vector.cross and optimized the Vector tests slightly. 2012-01-08 03:21:35 +01:00
TomyLobo
e810113ea0 Fixed some warnings and removed Bukkit/SpoutWorld.toLocation(pt) (replaced it by a call to the according Bukkit/SpoutUtil method) 2012-01-06 18:17:04 +01:00
TomyLobo
f4ba28268a Possibly fixed conflicts with other plugins since dynamic command registration was added. 2012-01-06 17:40:15 +01:00
zml2008
3510999d25 Fixed some spout compatibility issues. 2012-01-05 21:15:59 -08:00
zml2008
37da1fec40 Added initial SpoutAPI compatibility 2012-01-05 20:58:00 -08:00
TomyLobo
12dbcf6bbc Added Vector2D.isCollinearWith(Vector2D other).
Also added a test for it.
2012-01-05 22:13:21 +01:00
TomyLobo
450feb6630 Added Vector.isCollinearWith(Vector other).
Also added a test for it.
2012-01-05 21:27:17 +01:00
TomyLobo
ef3aeda0dc Added vararg expand and contract overload to Region and AbstractRegion. 2012-01-05 21:06:40 +01:00
TomyLobo
e4d3f70594 Vector changes.
- Clarified some javadocs
- Optimized toBlockPoint and made it return a BlockVector instead of a Vector.
- Changed some whitespace
2012-01-05 16:08:53 +01:00
TomyLobo
8c68cdf4a8 Fixed Vector[2D].transform2D not using the aboutX/Z arguments properly. 2012-01-05 15:57:54 +01:00
TomyLobo
a7530b7f89 Added Vector.getMidpoint 2012-01-05 15:35:06 +01:00
TomyLobo
555758288b Added BlockVector[2D].toBlockVector[2D] overrrides.
This returns the current object, for an instant speed boost :)
2012-01-05 15:32:53 +01:00
Yetanotherx
8a24fd9741 Add a cylindrical region selector.
- Supports shift
- Supports expand/contract on the y axis
- getArea is slightly inaccurate, but more accuracy would mean more CPU usage.
- Displays as a cuboid in legacy mode.
2012-01-03 23:35:29 +01:00
TomyLobo
0138cd7f1c EllipsoidRegion's constructor now takes radius, not offset radius. 2012-01-03 17:40:36 +01:00
TomyLobo
3a828c9759 Added Region.shift
- Provided a default implementation using expand+contract in AbstractRegion
- Overrid the implementation in the subtypes
2012-01-03 17:40:36 +01:00
TomyLobo
4d708a5003 Extracted an AbstractRegion class with some common functionality of all the region types. 2012-01-03 16:35:19 +01:00
TomyLobo
2cc0087524 Made Polygonal2DRegion(LocalWorld) invoke one of the other constructors. 2012-01-03 16:09:38 +01:00
TomyLobo
082a1995db Moved EllipsoidRegion's iterator into a separate class called RegionIterator. 2012-01-03 14:26:43 +01:00
TomyLobo
eafde8cc49 Added Vector2D.toVector(double y). 2012-01-03 14:26:43 +01:00
TomyLobo
7c71617dbf Renamed Polygonal2DRegion.getMin/MaxY to getMinimum/MaximumY. 2012-01-03 04:44:34 +01:00
Yetanotherx
b96ef7b620 Allow conversion from an old region to ellipsoid when using //sel. 2012-01-02 22:15:04 -05:00
TomyLobo
c099ae5eb5 Added floor, ceil and round to Vector and Vector2D. 2012-01-03 03:54:01 +01:00
TomyLobo
e598f8eaa0 Made the fields of Polygonal2DRegionSelector private. 2012-01-03 03:42:39 +01:00
TomyLobo
b05a72fea1 Made the fields in Polygonal2DRegion private. 2012-01-03 03:20:19 +01:00
TomyLobo
978d499282 Added various methods to Vector2D.
- Several overloads of add, subtract, multiply and divide
- length, lengthSq, distance, distanceSq, normalize, dot, containedWithin, containedWithinBlock and transform2D
- static methods getMinimum and getMaximum
2012-01-03 01:13:10 +01:00
TomyLobo
9ddbcf0395 Improved Vector.getMinimum and Vector.getMaximum. 2012-01-03 01:13:09 +01:00
TomyLobo
6bbf167cb4 Moved Vector.dot further up in the file and added Vector.cross. 2012-01-03 01:06:15 +01:00
TomyLobo
4500f93a1b Fixed Vector.containedWithinBlock(min, max) and Vector2D.equals(Vector2D) 2012-01-03 00:58:00 +01:00
TomyLobo
f11415f451 Added Vector.toVector2D and Vector2D.toVector. 2012-01-03 00:41:25 +01:00
TomyLobo
f2e26b07ec Some region selection fixes
- CuboidSelection no longer deals with IncompleteRegionExceptions
- Fixed Polygonal2DSelection not passing its region to the selector
- Fixed Polygonal2DRegion not cloning the list it receives in its constructor
- Gave PolygonalRegionSelector a new constructor where it takes a list of points
2012-01-01 14:50:26 +01:00
Yetanotherx
3b87953da0 Add cuiVersion to LocalSession and set it via incoming CUI event
Refactor region selectors to handle legacy versions a bit better.
Because chat doesn't allow the section sign to be sent, I have to send non-color codes. Meh.
closes #158
2011-12-31 22:31:05 -08:00
TomyLobo
616f9a2360 Added support for ellipsoid and sphere selections.
//sel ellipsoid, //sel sphere.
2011-12-30 12:02:15 +01:00
TomyLobo
45655e1189 Added a legacy type id system to CUI.
Selection types can send fallback typeids and information now, for older WECUI versions to use.
2011-12-30 12:02:15 +01:00
TomyLobo
0b5c8748b5 Fixed some warnings. 2011-12-30 10:46:12 +01:00
zml2008
4fb44ebc1d Added more flexibility to the Bukkit dynamic command registration system. 2011-12-29 13:59:48 -08:00
zml2008
76f1ea9cf2 Added a gravity brush. 2011-12-28 02:04:27 -08:00
zml2008
754997ca73 Now sending an additional §4§5§3§4 color code for WECUI's handshake, so it knows that it has a version of WorldEdit with protocol version support 2011-12-27 22:20:06 -08:00
TomyLobo
48f529bc7a Added Vector.lengthSq() 2011-12-27 23:25:37 +01:00
zml2008
0960ce46e2 Updated the min protocol version so people don't get warnings every time they join servers. 2011-12-27 14:23:16 -08:00
zml2008
70207f1370 Added //desel or //deselect as aliases for //sel 2011-12-27 14:21:18 -08:00
zml2008
8cdfd65218 Added WECUI protocol version support. Eventually, this will disable WECUI until the user updates, but not yet. 2011-12-27 14:03:06 -08:00
Rusty Burchfield
72b2c90c19 Improve zip file recognition.
Look for world/level.dat because some zip file generators do not include
entries for directories by themselves.
2011-12-27 13:29:50 -08:00
zml2008
2d8a4a9f8a Allow using custom input and output streams in subclasses of YAMLProcessor. 2011-12-27 13:22:08 -08:00
zml2008
70205bfd11 Removed string.isEmpty() method calls 2011-12-27 13:21:55 -08:00
TomyLobo
370ca96a44 Fixed //sel selection clearing not being dispatched to CUI. 2011-12-27 12:23:09 +01:00
TomyLobo
7d503fdc5c //sel poly now keeps the previous selection, converting its outline into a polygon if necessary.
This loses some blocks, if anyone cares
2011-12-27 12:07:11 +01:00
zml2008
76fd63d64b Fixed a NPE in WorldEdit.getSafeFile() when extensions is null. 2011-12-26 16:28:51 -08:00
TomyLobo
cc256aa246 Added license blocks to some files that were still missing them.
Copied from files from the same directory.
2011-12-26 00:57:26 +01:00
TomyLobo
324a041e38 Split up some external .* imports. 2011-12-26 00:36:23 +01:00
TomyLobo
4b47200f27 Fixed some warnings. 2011-12-26 00:06:50 +01:00
TomyLobo
376d3c8727 Added "and contributors" to all Copyright statements on the com.sk89q.worldedit.expression package. 2011-12-25 23:27:19 +01:00
zml2008
d804144c27 Removed command plugin.ymling from DocumentationPrinter 2011-12-24 22:38:51 -08:00
zml2008
c8c0c69f6d Added support for dynamic command registration. 2011-12-24 22:34:53 -08:00
zml2008
a1e239d08c Fixed SIOOBE when entering a blank quoted string 2011-12-24 22:22:37 -08:00
zml2008
9aa8c5f674 Now that WorldEdit has YAML handling classes, YAMLConfiguration is separate from BukkitConfiguration. 2011-12-24 22:22:37 -08:00
zml2008
4a95d03230 No longer using switch statement in WorldEditPlayerListener. <.< 2011-12-24 22:22:36 -08:00
TomyLobo
479253821e Fixed //help and /we help after zml2008 broke it :) 2011-12-22 11:38:12 +01:00
TomyLobo
050442fac3 Added a -l flag to /butcher, which spawns fake lightning on all killed entities. 2011-12-21 19:03:21 +01:00
TomyLobo
09a92fa76c Added a block/pattern parameter to //hollow.
Also made a few variables final and optimized the thickness algo a bit.
2011-12-20 12:53:26 +01:00
TomyLobo
633f6643a5 Added a thickness parameter to //hollow. 2011-12-19 11:58:38 +01:00
TomyLobo
936aff06b2 Fixed //stack -s (again). 2011-12-18 22:46:09 +01:00
TomyLobo
4b3564a9ac Fixed a warning. 2011-12-18 09:31:47 +01:00
zml2008
4dc3c035c1 Updated to use simplified method signature for commands. Also improved SimpleInjector. 2011-12-17 23:45:12 -08:00
TomyLobo
a4d82be697 Made /butcher, /searchitem and /worldedit work on the console and added /we help as an alias for //help. 2011-12-15 15:46:32 +01:00
TomyLobo
370ddeb9ff Added support for console commands to WorldEditPlugin. 2011-12-15 15:45:34 +01:00
TomyLobo
3bec3c169c Added BukkitCommandSender and WorldEditPlugin.wrapCommandSender. 2011-12-15 15:45:34 +01:00
TomyLobo
6d4b4718db Added ServerInterface.getWorlds. 2011-12-15 15:45:33 +01:00
TomyLobo
32bb810ce7 Changed all instances of new BukkitWorld to BukkitUtil.getLocalWorld, except for the one in that function. 2011-12-15 15:45:32 +01:00
TomyLobo
88dd420d1f Removed LocalCommandSender again. Didn't lead to anything. 2011-12-15 11:30:10 +01:00
TomyLobo
af6455ea6b Made //help sort // commands ignoring prefixed slashes. 2011-12-15 06:28:09 +01:00
TomyLobo
caeab76abb Fixed a NullPointerException in conjunction with CraftBook.
Thanks FearThe1337.
2011-12-14 10:51:02 +01:00
TomyLobo
05404b005d Added a //help command. 2011-12-13 09:43:39 +01:00
TomyLobo
1ce9d39f45 Removed fast lighting completely for the release. 2011-12-13 06:00:08 +01:00
zml2008
914dd647b5 Changed EditSessionBlockDelegate.getHeight's return to match what Bukkit's worldheightheight methods return 2011-12-12 20:05:38 -08:00
zml2008
98216e2762 Added support for non-128 worldheights 2011-12-13 04:50:53 +01:00
TomyLobo
87940c9eae Added an asPlayer method to LocalCommandSender, which casts the object to LocalPlayer if possible and throws an exception otherwise. 2011-12-13 04:13:48 +01:00
TomyLobo
3960726d7a Installed a LocalCommandSender class atop LocalPlayer in the hierarchy and moved the relevant methods there.
Also changed equals to work on LocalCommandSender instead of LocalPlayer.
2011-12-13 03:43:02 +01:00
TomyLobo
f5c6678da6 Added an extending cuboid selector.
It can be used with //sel extend.
Also made //sel carry over some information about the selection into the new selection mode.
Also cleaned up the source of the RegionSelectors and the //sel command a bit.
2011-12-12 05:27:33 +01:00
TomyLobo
3dabcdacd1 Made /green break on liquids. 2011-12-10 12:16:57 +01:00
zml2008
cf69daff78 Fixed inGroup always returning true for ops 2011-12-10 01:25:35 +01:00
TomyLobo
2e1087a49a Added a //hollow command, which hollows out the object contained in the selection. 2011-12-08 11:54:49 +01:00
TomyLobo
90b062a9d8 Fixed some warnings 2011-12-08 11:54:35 +01:00
zml2008
d0367bfd5c Small cleanup of chunk reading 2011-12-06 15:07:10 -08:00
zml2008
c2460a6305 PlayerInteract listener should now respect cancelled status. 2011-12-06 15:03:34 -08:00
TomyLobo
d69863db59 Fixed unimportant typos. 2011-12-06 13:59:41 +01:00
TomyLobo
c21c380bba Added a -a flag to /butcher to kill animals. Its now disabled by default. 2011-12-06 07:10:15 +01:00
TomyLobo
bc3a4377ec The /butcher command no longer kills NPCs, except when the -n flag is passed.
Also:
- Moved some code from BukkitWorld to LocalWorld.
- Replaced the "boolean killPets" argument by an "int flags" to provide extensibility
- Made the radius argument a double
- Basically rewrote the entire function
- Deprecated all old versions of killMobs
2011-12-06 06:50:11 +01:00
TomyLobo
4c9e0a629f Added help text for most commands that take flags.
//generate, //regen, //deform, //[h]cyl, //[h]sphere, //chunk, //outset, //inset, //stack, //move, //smooth, //paste, //flip, /search //distr /butcher, //brush sphere/cyl/clipboard/smooth
Only //replace and /replacenear are still missing.
2011-12-06 06:50:10 +01:00
TomyLobo
6764704c22 Added support for help text to be shown on syntax errors and such. 2011-12-06 06:50:10 +01:00
zml2008
fcb7e62cb0 Formatting. 2011-12-05 20:02:41 -08:00
zml2008
745716426f Removed some unnecessary checks and fixed compatibility with CraftBook and other plugins that load() before registering the server listener 2011-12-05 19:59:10 -08:00
TomyLobo
258bdc11b0 Fixed //stack -s only shifting by 1 block, regardless of the selection size. 2011-12-05 23:23:52 +01:00
TomyLobo
a5a761a126 Added Vector.dot(Vector). 2011-12-05 23:23:51 +01:00
TomyLobo
274ecaadf2 Changed a usage string. 2011-12-05 23:23:51 +01:00
TomyLobo
3ccb152350 Added support for line breaks to BukkitPlayer.print* 2011-12-05 10:33:13 +01:00
TomyLobo
11dadd7417 Simplified CommandsManager.getUsage. 2011-12-05 10:18:30 +01:00
TomyLobo
259003d030 Corrected a command description. 2011-12-05 08:56:49 +01:00
TomyLobo
50bdb2332a Removed LegacyPluginPermissionsResolver.
Wrapping at the PermissionsProvider level instead, which removes some code duplication and fixes 2 warnings :)
2011-12-05 04:25:56 +01:00
zml2008
deea1f7655 Moved PermissionsResolverServerListener into PermissionsResolverManager and got rid of some unnecessary methods. 2011-12-04 19:06:41 -08:00
TomyLobo
cd2f56918d Renamed WEPIFRutimeException to WEPIFRuntimeException and gave it a serialVersionUID. 2011-12-05 03:41:24 +01:00
TomyLobo
09589e2a79 Fixed switch treating continue like break. 2011-12-05 03:23:22 +01:00
zml2008
daf1dde701 Moved WEPIF to the com.sk89q.wepif package and made PermissionsResolverManager a singleton
Added OfflinePlayer permissions fetching methods to WEPIF
2011-12-04 17:42:46 -08:00
TomyLobo
04a08e7e0c Improved Switch's optimizer. 2011-12-04 21:00:03 +01:00
TomyLobo
d55376e8a6 Added an optimizer and license/element comments for Switch. 2011-12-04 20:26:14 +01:00
TomyLobo
7a429e9932 Made Node.getPosition final and fixed some whitespace in LocalWorld. 2011-12-04 20:06:23 +01:00
TomyLobo
a8e64fd8bc Added switch/case to the expression parser.
Also added a test case.
2011-12-04 09:25:56 +01:00
TomyLobo
61b2ea4007 Added "switch" and "case" to the list of keywords so they can't be used as variable names. 2011-12-04 06:40:09 +01:00
TomyLobo
4753574bae Basically rewrote the tree remover tool to use breadth-first search to get rid of deep recursions.
Also changed a message to be more precise.
2011-12-03 02:11:10 +01:00
TomyLobo
771d068826 Reduced indentation on a piece of code. 2011-12-01 20:20:49 +01:00
TomyLobo
af9e2da6d3 Simplified the statement parser, fixed a few quirks and adjusted a test case. 2011-11-30 09:18:53 +01:00
TomyLobo
9cdac001e3 Added a megabuf function to the expression parser, which works like gmegabuf, except that there is one buffer per Expression instance. 2011-11-30 05:27:11 +01:00
TomyLobo
c6518a9243 Added a way to retrieve the current expression instance. 2011-11-30 05:20:16 +01:00
TomyLobo
662e597f1a Moved temporary variable creation from Parser to Expression. 2011-11-30 04:45:48 +01:00
sk89q
11245014c8 Added @Override annotations. 2011-11-29 20:17:50 +01:00
TomyLobo
36e4b99ade Added particle effects to area and recursive pickaxe. 2011-11-29 09:15:41 +01:00
TomyLobo
6be514cdf9 Added LocalWorld.queueBlockBreakEffect. 2011-11-29 09:15:29 +01:00
TomyLobo
a4ccadacdc Added ServerInterface.schedule(delay, period, task). 2011-11-29 09:09:04 +01:00
TomyLobo
cc0e39b493 Added particle and sound effects to the single super pickaxe. 2011-11-28 07:36:42 +01:00
TomyLobo
36fbfa409f Added LocalWorld.playEffect and an implementation for Bukkit. 2011-11-28 07:13:19 +01:00
TomyLobo
a6f0a48f84 Added a swap function to the expression parser. 2011-11-28 00:30:52 +01:00
zml2008
255e342353 Added enchantment support 2011-11-27 15:29:51 -08:00
zml2008
51dd7a0c9c Improved handling of valid blocks not in BlockType and added dragon egg to BlockType 2011-11-27 15:29:26 -08:00
TomyLobo
5d59dd764e Changed getSafe*File to accept varargs instead of arrays. 2011-11-27 05:29:49 +01:00
TomyLobo
c8180e641f Reverting part of a cleanup that made java cry for some obscure reason. 2011-11-25 06:34:10 +01:00
TomyLobo
6aec096709 Fixed a comment. 2011-11-24 21:20:44 +01:00
TomyLobo
77bd86a203 Whitespace police 2011-11-24 21:07:14 +01:00
TomyLobo
c1e151ac19 Improved the expression parser's optimizer.
Added optimizers for Conditional, For, SimpleFor and While.
Improved the Sequence optimizer.
Removed the optimizer TODOs from Break and Return.
2011-11-24 21:00:09 +01:00
TomyLobo
05b427316d Changed signature of the optimize() method to return an RValue. 2011-11-24 20:50:07 +01:00
TomyLobo
7cbb7da80b Added the ternary operator. 2011-11-24 20:04:42 +01:00
TomyLobo
9456c9e58f Expression parser improvements
- Fixed calling nullary functions.
- Improved error reporting for missing functions
- Added random() and randint(max)
- Improved Sequence.optimize() to eliminate statements with no effect
- Adjusted a comment
2011-11-24 11:05:41 +01:00
TomyLobo
adf326e2bf Renamed some variables and adjusted some comments in ArbitraryShape. 2011-11-24 11:01:24 +01:00
TomyLobo
d69b04caf5 Added some element comments to ArbitraryShape. 2011-11-24 04:06:14 +01:00
TomyLobo
dfb729d5f1 Added license blocks and element comments to all expression parser classes.
Also updated some terminology
2011-11-24 03:55:06 +01:00
TomyLobo
71287299b5 Added a simple for loop to the expression parser.
Syntax: for (counter = first, last) { body }
Also added a test case.
2011-11-24 02:35:19 +01:00
TomyLobo
7e13b60a51 Cleanup 2011-11-23 04:48:40 +01:00
TomyLobo
1a57f6e95d Added return, break and continue. 2011-11-22 18:51:19 +01:00
TomyLobo
efc2209c0f Prevented overwriting built-in constants. 2011-11-22 17:47:44 +01:00
TomyLobo
5ef9df7feb Made it possible to leave parts of a for statement empty. 2011-11-22 16:56:41 +01:00
TomyLobo
e6e31d0b93 Moved some code around 2011-11-22 16:35:56 +01:00
TomyLobo
effbf9f79c Added for loops to the expression parser, java style.
Also:
- Added a test case for for
- Fixed Identifiable.id() for the runtime Nodes and added missing elements to the list in Identifiable.java.
- Factored keyword and character consumption into a common function.
2011-11-22 16:08:15 +01:00
TomyLobo
f217be0bdf Added while loops to the expression parser.
Also added a test case.
Iterations are currently limited to 256 maximum.
2011-11-22 06:16:23 +01:00
TomyLobo
aa43975e34 Added support for if/else to the expression parser. Basically same syntax as Java.
Also added a test case.
2011-11-22 05:12:32 +01:00
TomyLobo
5071885d10 Expression parser: Extended the index range of the megabuf function and renamed it to gmegabuf 2011-11-22 02:33:01 +01:00