You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -140,18 +144,18 @@ other developers access to your data manipulator.
140
144
141
145
.. warning::
142
146
143
-
Be sure to store your ``Key`` somewhere global so you can access it later.
147
+
Retain your ``Key`` reference readily available for later access, otherwise you incur additional processing expense recreating a new `Key` each time.
144
148
145
149
.. tip::
146
150
147
-
You can register a key for a specific element within a DataSerializable
151
+
You can register a key for a specific field within a DataSerializable
148
152
149
153
Data Store
150
154
==========
151
155
152
-
The :javadoc:`DataStore` is used to register your ``Key`` with the appropriate ``DataHolder`` and also register
153
-
any other keys you may have accessing your ``DataSerializable``. In the example below, it creates a ``DataStore``
154
-
and makes it appliciable to only the :javadoc:`Entity` ``DataHolder``.
156
+
The :javadoc:`DataStore` is used to register your ``Key`` with the appropriate ``DataHolder`` so that Key knows how/where to store the custom data whenever
157
+
serializing/deserializing. The DataStore also is used to register any other keys you may have accessing your ``DataSerializable``. In the example below,
158
+
it creates a ``DataStore`` and makes it appliciable to only the :javadoc:`Entity` ``DataHolder``.
155
159
156
160
.. code-block:: java
157
161
@@ -197,7 +201,7 @@ Data Provider
197
201
198
202
For data that requires more code to be used whenever the getter, setter, deleter are used will require the use of
199
203
a ``DataProvider``. With a ``dataProvider`` a plugin is able to manipulate how its data should be received, set, and
200
-
deleted automatically.
204
+
deleted automatically such as being stored to a external database.
201
205
202
206
In the following example, we will be getting the UUID from the last attacker but if there is no last attacker, then
203
207
return the player's UUID instead.
@@ -230,6 +234,8 @@ Data Registration
230
234
231
235
The final object you will need to register your data is the :javadoc:`DataRegistration` which combines
232
236
your ``Key``, ``DataStore`` and ``DataProvider`` together into a single package that you can register.
237
+
Only the ``key`` is required, however not providing the ``store`` or the ``provider`` will mean that
0 commit comments