Commit Graph

79 Commits

Author SHA1 Message Date
Bukkit/Spigot
215952d23f Fix saving configs which are only a header
By: md_5 <git@md-5.net>
2022-01-08 09:39:38 +11:00
Bukkit/Spigot
7aec97546b Add workaround for SnakeYAML 100 comment limit
By: md_5 <git@md-5.net>
2022-01-04 09:25:20 +11:00
Bukkit/Spigot
4fd0026eb5 #703: Fix/test yaml anchors and merge
By: Wolf2323 <gabrielpatrikurban@gmail.com>
2022-01-02 21:08:01 +01:00
Bukkit/Spigot
fc98731c16 #702: fromNodeTree is now private, this does not belong to the API
By: Wolf2323 <gabrielpatrikurban@gmail.com>
2021-12-29 07:52:44 +11:00
Bukkit/Spigot
b911613abe #701: Option to configure the max width of a line in the config
By: Wolf2323 <gabrielpatrikurban@gmail.com>
2021-12-27 09:47:14 +11:00
Bukkit/Spigot
0503e4faed SPIGOT-6866: Fixed spaces a between comment indicator and actual comment
By: Wolf2323 <gabrielpatrikurban@gmail.com>
2021-12-23 23:07:00 +01:00
Bukkit/Spigot
46d8d2cd11 Restore protected members to YamlConfiguration
By: md_5 <git@md-5.net>
2021-12-23 11:33:21 +11:00
Bukkit/Spigot
ed8a152b3a SPIGOT-3247: Comment support for YAML files
By: Wolf2323 <gabrielpatrikurban@gmail.com>
2021-12-21 08:35:19 +11:00
Bukkit/Spigot
308cc50afa #687: Fix NPE from previous commits
By: Wolf2323 <gabrielpatrikurban@gmail.com>
2021-12-06 07:22:16 +11:00
Bukkit/Spigot
ab0429fddc #686: Fix contains for default section generating real sections
By: Wolf2323 <gabrielpatrikurban@gmail.com>
2021-12-04 22:05:54 +01:00
Bukkit/Spigot
3ddde21487 SPIGOT-6830: Fix addDefaults with Configuration overrides child Sections in the defaults
By: Wolf2323 <gabrielpatrikurban@gmail.com>
2021-12-04 21:38:45 +01:00
Bukkit/Spigot
2b580de08b #604: Add Contract annotation to ConfigurationSection
By: DerFrZocker <derrieple@gmail.com>
2021-04-27 11:34:32 +10:00
Bukkit/Spigot
d34f1cd453 SPIGOT-6274: Reloading configuration does not clear previous values
By: blablubbabc <lukas@wirsindwir.de>
2021-01-13 08:35:37 +11:00
Bukkit/Spigot
c73564ed4b SPIGOT-6313: Revert "SPIGOT-6274: Reloading configuration does not clear previous values"
This reverts commit 885c2247d1.

By: md_5 <git@md-5.net>
2021-01-12 11:34:31 +11:00
Bukkit/Spigot
885c2247d1 SPIGOT-6274: Reloading configuration does not clear previous values
By: md_5 <git@md-5.net>
2021-01-12 09:37:26 +11:00
Bukkit/Spigot
139ca6a269 SPIGOT-6234: enum classes don't serialize properly when implementing ConfigurationSerializable
By: md_5 <git@md-5.net>
2020-11-17 12:56:36 +11:00
Bukkit/Spigot
42799043b2 SPIGOT-5881: SnakeYaml 1.26 limits non-scalar (null) nodes while 1.25 does not
By: md_5 <git@md-5.net>
2020-06-29 09:06:29 +10:00
Bukkit/Spigot
0c53c95293 Add additional checkstyle checks
By: md_5 <git@md-5.net>
2020-01-24 17:37:30 +11:00
Bukkit/Spigot
d16413b877 Javadoc improvements per checkstyle
By: md_5 <git@md-5.net>
2019-12-22 09:56:28 +11:00
Bukkit/Spigot
5b756e3926 Add getLocation to configuration API
By: Garrett Koleda <gmatrixgames@gmail.com>
2019-09-21 02:16:13 +00:00
Bukkit/Spigot
82854b7bd7 Add Override annotations where appropriate
By: md_5 <git@md-5.net>
2019-04-28 11:37:52 +10:00
Bukkit/Spigot
e9ae9842f0 Apply and enforce import ordering rules
By: md_5 <git@md-5.net>
2019-04-23 14:33:57 +10:00
Bukkit/Spigot
c240b58f66 Begin implementation of CheckStyle style checking
By: md_5 <git@md-5.net>
2019-04-23 14:00:20 +10:00
Bukkit/Spigot
4526a9f21e Add getObject methods to ConfigurationSection
By: stonar96 <minecraft.stonar96@gmail.com>
2019-03-19 23:19:09 +01:00
Bukkit/Spigot
416c865476 SPIGOT-2540: Add nullability annotations to entire Bukkit API
By: Darkyenus <darkyenus@gmail.com>
2019-03-13 17:42:57 +11:00
Bukkit/Spigot
6a8d62ff22 SPIGOT-4558: Preserve user order in the face of copied defaults in configurations
By: md_5 <git@md-5.net>
2018-12-31 17:10:56 +11:00
Bukkit/Spigot
66cea125d6 Minor cosmetic cleanups to imports etc
Please see https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/389/overview

By: Parker Hawke <hawkeboyz2@hotmail.com>
2018-10-27 14:55:52 -04:00
Bukkit/Spigot
55523cfcfc Add ray tracing and bounding box API
By: blablubbabc <lukas@wirsindwir.de>
2018-10-26 19:59:36 +11:00
Bukkit/Spigot
2496f119f4 Expand on ConfigurationSerializable methods in ConfigurationSection
By: Senmori <thesenmori@gmail.com>
2018-03-15 20:53:18 +11:00
Bukkit/Spigot
1c5031ca41 AttributeModifier not registered in ConfigurationSerialization
By: md_5 <git@md-5.net>
2017-11-15 09:45:55 +11:00
Bukkit/Spigot
e3d4acc303 Assorted whitespace fixes
By: md_5 <git@md-5.net>
2017-08-06 09:08:05 +10:00
Bukkit/Spigot
32f414ff58 Remove some more long deprecated methods (3+ years)
By: md_5 <git@md-5.net>
2017-05-14 12:00:00 +10:00
Bukkit/Spigot
a64729191f SPIGOT-2180: Empty ConfigurationSections created when removing value at end of path
By: Lukas Hennig <lukas@wirsindwir.de>
2016-04-16 16:08:35 +02:00
Bukkit/Spigot
640346e011 Add method to check configuration path existence, ignoring defaults.
By: FakeNeth <cneth97@gmail.com>
2016-04-05 18:24:05 -04:00
Bukkit/Spigot
ad7fee9850 BUILDTOOLS-203: Fix invalid javadoc
By: md_5 <git@md-5.net>
2016-03-04 16:16:59 +11:00
Bukkit/Spigot
9cd422d56a Use UTF-8 as default encoding
Since March 2014 Bukkit has been converting and preparing plugins for UTF-8 compliance. With this change in place, all plugins will now load their configuration files as UTF-8, which is a supported encoding on any valid JVM implementation. This should pose no issues on any server which has run Bukkit after 2014, and the only possible breaking path is when an embedded file is of a non UTF-8 compatible encoding (which it should not be anyway).

By: Matt <mattbdev@outlook.com>
2016-03-01 08:30:03 +11:00
Bukkit/Spigot
2fa0da6fd3 Make Location ConfigurationSerializable.
By: Jofkos <JofkosDE@gmail.com>
2014-12-26 22:43:59 +01:00
Bukkit/Spigot
8c956cb6ff Register the Pattern class to ConfigurationSerialization
By: Thinkofdeath <thinkofdeath@spigotmc.org>
2014-12-04 10:29:42 +00:00
Bukkit/Spigot
b2d54f59bb Clean up the javadoc to pass java 8's doclint
By: Thinkofdeath <thinkofdeath@spigotmc.org>
2014-11-30 21:09:01 +00:00
Bukkit/Spigot
300e61658e Change YamlConfiguration encoding styles.
On JVMs with UTF-8 default encoding, this commit has no change in behavior.

On JVMs with ascii default encoding (like some minimal linux installa-
tions), this commit now uses UTF-8 for YamlConfiguration operations.
Because all ascii is valid UTF-8, there is no feature degradation or data
loss during the transition.

On JVMs with any non-unicode but ascii-compliant encoding, this commit now
forces YamlConfiguration to escape special characters when writing to
files, effectively rendering the encoding to be plain ascii. Any affected
file will now be able to migrate to UTF-8 in the future without data-loss
or explicit conversion. When reading files, YamlConfiguration will use the
system default encoding to handle any incoming non-utf8 data, with the
expectation that any newly written file is still compliant with the
system's default encoding.

On JVMs with any non-unicode, but ascii-incompliant encoding (this may be
the case for some Eastern character sets on Windows systems), this change
is breaking, but is justified in claim that these systems would otherwise
be unable to read YamlConfiguration for implementation dependent settings
or from plugins themselves. For these systems, all uses of the encoding
will be forced to use UTF-8 in all cases, and is effectively treated as if
it was configured to be UTF-8 by default.

On JVMs with unicode encoding of UTF-16 or UTF-32, the ability to load any
configurations from almost any source prior to this change would have been
unfeasible, if not impossible. As of this change, however, these systems
now behave as expected when writing or reading files. However, when
reading from any plugin jar, UTF-8 will be used, matching a super-majority
of plugin developer base and requirements for the plugin.yml.

Plugin developers may now mark their plugin as UTF-8 compliant, as
documented in the PluginDescriptionFile class. This change will cause the
appropriate APIs in JavaPlugin to ignore any system default encoding,
instead using a Reader with the UTF-8 encoding, effectively rendering the
jar system independent. This does not affect the aformentioned JVM
settings for reading and writing files.

To coincide with these changes, YamlConfiguration methods that utilize a
stream are now deprecated to encourage use of a more strict denotation.
File methods carry system-specific behaviors to prevent unncessary data
loss during the transitional phase, while Reader methods are now provided
that have a very well-defined encoder behavior. For the transition from
InputStream methods to Reader methods, an API has been added to JavaPlugin
to provide a Reader that matches the previous behavior as well as
compliance to the UTF-8 flag in the PluginDescriptionFile.

Addresses BUKKIT-314, BUKKIT-1466, BUKKIT-3377

By: Wesley Wolfe <wesley.d.wolfe+git@gmail.com>
2014-03-25 00:05:21 -05:00
Bukkit/Spigot
bb50f1a774 Pulling all pending Bukkit-JavaDoc changes
A special thanks goes to @aerouk for almost all of the changes found here.

By: Wesley Wolfe <weswolf@aol.com>
2013-12-15 01:07:43 -05:00
Bukkit/Spigot
67439804f4 Pulling all pending Bukkit-JavaDoc changes
By: Wesley Wolfe <weswolf@aol.com>
2013-09-10 21:02:53 -05:00
Bukkit/Spigot
bdc0f04ee3 Relax generic types for ConfigurationSerialization
The method signatures are unnecessarily strict for the generic signatures.
This change may cause a compile-time error for extending classes overriding
methods, but no byte signature or compile time call signatures change.

By: Wesley Wolfe <weswolf@aol.com>
2013-04-25 03:53:54 -05:00
Bukkit/Spigot
761a84cb1b Pulling all pending Bukkit-JavaDoc changes
By: Edmond Poon <sagaciouszzzz@gmail.com>
2013-04-02 00:11:22 -04:00
Bukkit/Spigot
78abaa5f6d Pulling all pending Bukkit-JavaDoc changes
By: Wesley Wolfe <weswolf@aol.com>
2013-02-22 22:49:38 -06:00
Bukkit/Spigot
8065c9095a Improve javadoc in 26 files.
Addresses:
BUKKIT-1643, BUKKIT-1868, BUKKIT-1846, BUKKIT-2632, BUKKIT-3196,
BUKKIT-3187, BUKKIT-3198, BUKKIT-3200, BUKKIT-3201 and BUKKIT-3417.

By: feildmaster <admin@feildmaster.com>
2013-01-22 15:09:24 -06:00
Bukkit/Spigot
817fc4e584 Add FireworkEffect and respective item metas. Adds BUKKIT-3236
FireworkEffect is an immutable class that requires the builder pattern
to construct, to reduce ambiguity and help make code uses more readable.

FireworkMeta contains a list of effects, as well as a flight height.

FireworkEffectMeta contains a single effect for charges.

By: Wesley Wolfe <weswolf@aol.com>
2012-12-21 09:06:56 -06:00
Bukkit/Spigot
ac66053f35 Add ItemMeta factory and interfaces. This adds BUKKIT-15
Included with ItemMeta is a new serializable class Color.

PotionEffects are now serializable.

By: Wesley Wolfe <weswolf@aol.com>
2012-12-17 01:16:28 -06:00
Bukkit/Spigot
681de09ad0 Check for non-existent class alias; Fixes BUKKIT-1780
By: Wesley Wolfe <weswolf@aol.com>
2012-06-09 15:58:53 -05:00
Bukkit/Spigot
03af91781c Javadoc updates
Fixes BUKKIT-1653, Fixes BUKKIT-1383 and Fixes BUKKIT-1644

By: feildmaster <admin@feildmaster.com>
2012-06-03 05:40:54 -05:00