Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
MythicCraft
MythicCosmetics
Commits
05f7d78b
Commit
05f7d78b
authored
3 months ago
by
Ash
Browse files
Options
Download
Email Patches
Plain Diff
More refactoring of sprays
parent
91d7096d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
plugin/src/main/java/io/lumine/cosmetics/types/sprays/types/MapSpray.java
...java/io/lumine/cosmetics/types/sprays/types/MapSpray.java
+11
-5
No files found.
plugin/src/main/java/io/lumine/cosmetics/types/sprays/types/MapSpray.java
View file @
05f7d78b
...
...
@@ -16,21 +16,27 @@ import java.io.File;
public
class
MapSpray
extends
Spray
{
private
static
final
StringProp
IMAGE
=
Property
.
String
(
Scope
.
NONE
,
"Texture"
);
private
static
final
StringProp
MODEL
=
Property
.
String
(
Scope
.
NONE
,
"Model"
,
null
);
private
static
final
StringProp
IMAGE
=
Property
.
String
(
Scope
.
NONE
,
"Texture"
,
null
);
@Getter
private
final
String
imagePath
;
@Getter
private
final
SprayImage
image
;
@Getter
private
String
imagePath
;
@Getter
private
SprayImage
image
;
public
MapSpray
(
SprayManager
manager
,
Pack
pack
,
File
file
,
String
key
)
{
super
(
manager
,
pack
,
file
,
key
);
this
.
imagePath
=
MODEL
.
fget
(
file
,
this
);
this
.
image
=
getSprayImage
(
imagePath
);
this
.
imagePath
=
IMAGE
.
fget
(
file
,
this
);
if
(
imagePath
==
null
)
{
imagePath
=
MODEL
.
fget
(
file
,
this
);
}
if
(
this
.
imagePath
==
null
)
{
MCLogger
.
error
(
MCCLang
.
get
(
"cosmetic.spray.error.no-image-specified"
,
"No image specified for spray {0}"
,
key
));
return
;
}
this
.
image
=
getSprayImage
(
imagePath
);
if
(
this
.
image
==
null
)
{
MCLogger
.
error
(
MCCLang
.
get
(
"cosmetic.spray.error.image-not-found"
,
"Image {0} for spray {1} was not found"
,
imagePath
,
key
));
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment