Commit daf8c53
committed
Fix inconsistency getting an item from a player slot
Previously when getting the item in hand, it would return an empty item stack instead of null. This was inconsistent with all other slot values, resulting in unexpected behavior and core errors in some item meta functions. To fix this inconsistent function behavior, I decided to return empty values where that would have already been a handled output, avoiding breaking any scripts where possible. This also matches the previous behavior of the most common use cases.1 parent ababae6 commit daf8c53
File tree
3 files changed
+30
-33
lines changed- src/main/java/com/laytonsmith
- abstraction/bukkit/entities
- core/functions
3 files changed
+30
-33
lines changedLines changed: 10 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | 130 | | |
134 | | - | |
135 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
136 | 139 | | |
137 | 140 | | |
138 | 141 | | |
| |||
142 | 145 | | |
143 | 146 | | |
144 | 147 | | |
145 | | - | |
146 | | - | |
| 148 | + | |
147 | 149 | | |
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
151 | | - | |
152 | | - | |
153 | 153 | | |
| 154 | + | |
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
| 346 | + | |
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
| |||
Lines changed: 19 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
87 | 89 | | |
88 | 90 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
| 91 | + | |
98 | 92 | | |
99 | 93 | | |
100 | 94 | | |
| |||
186 | 180 | | |
187 | 181 | | |
188 | 182 | | |
189 | | - | |
| 183 | + | |
190 | 184 | | |
191 | 185 | | |
192 | 186 | | |
| |||
195 | 189 | | |
196 | 190 | | |
197 | 191 | | |
| 192 | + | |
| 193 | + | |
198 | 194 | | |
199 | 195 | | |
200 | 196 | | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
| 197 | + | |
207 | 198 | | |
208 | 199 | | |
209 | 200 | | |
| |||
441 | 432 | | |
442 | 433 | | |
443 | 434 | | |
444 | | - | |
445 | | - | |
| 435 | + | |
| 436 | + | |
446 | 437 | | |
447 | 438 | | |
448 | | - | |
| 439 | + | |
449 | 440 | | |
450 | | - | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
451 | 444 | | |
452 | | - | |
453 | | - | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
454 | 450 | | |
455 | 451 | | |
456 | 452 | | |
| |||
0 commit comments