refactor
This commit is contained in:
parent
e28304522c
commit
3ecdfd75b0
2 changed files with 11 additions and 9 deletions
|
@ -12,14 +12,16 @@ public class PotionEffectSerializer implements JsonSerializer<PotionEffect> {
|
||||||
@Override
|
@Override
|
||||||
public JsonElement serialize(
|
public JsonElement serialize(
|
||||||
PotionEffect potionEffect, Type type, JsonSerializationContext jsonSerializationContext) {
|
PotionEffect potionEffect, Type type, JsonSerializationContext jsonSerializationContext) {
|
||||||
String sb = "{"
|
String sb =
|
||||||
+ potionEffect.getType().key()
|
"{"
|
||||||
+ ","
|
+ potionEffect.getType().key()
|
||||||
+ potionEffect.getDuration()
|
+ ","
|
||||||
+ ","
|
+ potionEffect.getDuration()
|
||||||
+ potionEffect.getAmplifier()
|
+ ","
|
||||||
+ "," + potionEffect.hasParticles()
|
+ potionEffect.getAmplifier()
|
||||||
+ "}";
|
+ ","
|
||||||
|
+ potionEffect.hasParticles()
|
||||||
|
+ "}";
|
||||||
return new JsonPrimitive(sb);
|
return new JsonPrimitive(sb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ api-version: "$apiVersion"
|
||||||
description: $description
|
description: $description
|
||||||
load: POSTWORLD
|
load: POSTWORLD
|
||||||
authors:
|
authors:
|
||||||
- unurled
|
- unurled
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
sr.tutorial:
|
sr.tutorial:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue