Now, 1.3.0 goes out.
There are update contents:
1.Now NPC has all monster entity types, zombie-like entity types and hoglin, zoglin, piglin data is boolean to set is baby, Villager and Zombie Villager data is org.ezapi.module.npc.fake.FakeVillager.VillagerData, Slime and Magma Cube data is integer to set size
2.ReflectionUtils has been renamed to Ref
3.EzAnvil goes out! Using nms and dynamic class generator to make perfect anvil gui!
4.When NPC looking at player, they will look at correct position (player's eyes)
Animal entity types for npc will be added in next version!
Some features MAYBE add in next version:
1.Shulker type can set color
2.NPC with NPC as passenger
3.NPC can move by them self with method, developer may be able to make a command like "/npc moveTo ~ ~ ~10", but with no gravity and can go through blocks, so developers need code a pathfinder to solve it
4.NPC can swing their hands to make some animation
Added more features to EasyPlugin class
Now using setConfigAutoReload can make the configuration file auto reload and listening by onConfigReload() and onConfigDelete() methods
Code (Java):
@Override
public
void enable
(
)
{
this.
setConfigAutoReload
(
true
)
;
}
@Override
public
void onConfigReload
(
)
{
this.
sendConsole
(
"Config has been reloaded"
)
;
}
@Override
public
void onConfigDelete
(
)
{
this.
sendConsole
(
"Config has been deleted"
)
;
}
Fixed ChatMessage doesn't process Player
A new feature, brings a lot of bugs
Examples
Code (Java):
File file
=
new
File
(
"plugins/EasyAPI/",
"example.yml"
)
;
FileUtils.
create
(file,
true
)
;
AutoReloadFile autoReloadFile
=
new AutoReloadFile
(EasyAPI.
getInstance
(
), file
)
;
autoReloadFile.
onModified
(
(
)
->
{
System.
out.
println
(
"Modified"
)
;
System.
out.
println
(
"content: "
+ FileUtils.
readText
(file
)
)
;
}
)
;
autoReloadFile.
onDeleted
(
(
)
->
{
System.
out.
println
(
"Deleted"
)
;
}
)
;
I don't know why so many bugs ¯\_(ツ)_/¯
I forget add the method last version, sorry.
Added PlaceholderProvider to replace text.
To use PlaceholderAPI to replace, You can use EasyAPI addon: PAPI Provider for Easy API
Added BossBar API!
Code (Java):
//Create a new boss bar
EzBossBar bossBar
=
new EzBossBar
(
new ChatMessage
(
"Ender Dragon",
false
)
)
;
//Add a new viewer
bossBar.
addViewer
(player
)
;
//Set boss bar progress
bossBar.
setProgress
(0.5f
)
;
//Set boss bar color
bossBar.
setColor
(BarColor.
BLUE
)
;
//Set boss bar style
bossBar.
setStyle
(BarStyle.
NOTCHED_20
)
;
//Make sky dark
bossBar.
setDarkenSky
(
true
)
;
//Play music to player
bossBar.
setPlayMusic
(
true
)
;
//Create fog
bossBar.
setCreateFog
(
true
)
;
//Make player cannot see the boss bar
bossBar.
hide
(player
)
;
//Make player can see the boss bar
bossBar.
show
(player
)
;
//Remove a viewer
bossBar.
removeViewer
(player
)
;
//Drop the boss bar
bossBar.
drop
(
)
;
Removed command shouln't appear in EasyAPI
Now!
Scoreboard is coming!
Code (Java):
//Create a new scoreboard
EzScoreboard scoreboard
=
new EzScoreboard
(
new ChatMessage
(
"&c&lExample",
false
)
)
;
//Add text, the int is witch line, line number higher, position higher
scoreboard.
setText
(
8,
new ChatMessage
(
"&b&l| &bThanks for playing!",
false
)
)
;
scoreboard.
setText
(
7,
new ChatMessage
(
"&b&l| ",
false
)
)
;
scoreboard.
setText
(
6,
new ChatMessage
(
"&b&l| &bPlayer",
false
)
)
;
scoreboard.
setText
(
5,
new ChatMessage
(
"&b&l| &e{display_name}",
false
)
)
;
scoreboard.
setText
(
4,
new ChatMessage
(
"&b&l| ",
false
)
)
;
scoreboard.
setText
(
3,
new ChatMessage
(
"&b&l| ",
false
)
)
;
scoreboard.
setText
(
2,
new ChatMessage
(
"&b&l| ",
false
)
)
;
scoreboard.
setText
(
1,
new ChatMessage
(
"&b&l|&e example.com",
false
)
)
;
//Make a player can see the scoreboard
scoreboard.
addViewer
(player
)
;
//Remove line witch is 1
scoreboard.
removeText
(
1
)
;
//Make a player cannot see the scoreboard
scoreboard.
removeViewer
(player
)
;
//Set title display name
scoreboard.
setTitle
(
new ChatMessage
(
"New Display",
false
)
)
;
//Drop the scoreboard
scoreboard.
drop
(
)
;
Fixed loading main class bugs
EzCommand and EzArgument has more constructors!
Added 6 new constructor for EzCommand and EzArgument classes.
Add PermissionManager class!
Fixed when you are coding with some languages and add default values, "???" will be saved in language file.
Language file encoding has been set to Unicode
1.Removed Storage API because it's too useless
2.NPC API now support set item in npc main hand or off hand, also helmet, chestplate, leggings and boots.
3.Now fixed Player Type NPC Show in TabList and Entity selector
Finally, I pushed my source code to github.
I cannot push caused by my internet, so no source code on github, sorry for that!
Fixed Japanese Language Code from "ja-jp" to "ja_jp"
Readded toml storage support
Removed unnecessary classes libraries.
These classes will be a module in the future
Fixed PlayerUtils titleWithSubtitle method title and subtitle using same ChatMessage object
Fixed EzInventory Dynamic Inputs bug: only add one item stacks
Made storage file can be delete.
Because I forgot close FileReader so file cannot be delete before 1.2.6
Fixed EzInventory dynamic inputs bugs
Add more methods for developer
Just fixed some bugs and add some new methods.
New features in next big version
Now right click a npc will only called once not four times or twice
I don't know why
I upload this file yesterday and update to 1.2.1
But today, I just want to upload 1.2.2, I just found EasyAPI version is 1.2.0, I don't know why
Fixed dropped NPC but player still can see the npc
Finally, EasyAPI added NPC API!
Create your npc with org.ezapi.module.npc.EzNPC!
More features in overview
Now! You can create hologram text with EasyAPI!
import class: org.ezapi.module.hologram.TextHologram!
It's easy to understand!
Only need text ChatMessage, world and location!
(I just found that I forget upload 1.1.6 file to spigotmc.org)
Fixed ArgumentAttribute bugs on 1.17 server.
Fixed ItemUtils turn ItemStack to JsonObject bugs on 1.17 server
Please feedback bugs when you find a bug!
I need it!
CommandAPI added more arguments support!
ArgumentUUID, ArgumentNBTTag and ArgumentParticle
ArgumentEntityType has been rewrote to avoid spawning items that shouldn't appear in the world
You can set player's item cooldown and let a player see a block break stage to a specified value.
Times in title cannot be used on actionbar, so PlayerUtils removed actionbar methods with fadeIn, stay and fadeOut
Fixed cannot send message in 1.17 caused by wrong package name
Rename "clear" in PlayerUtils to "clearTitle",
Rename "reset" in PlayerUtils to "resetTitle",
Add method hasOnlineAccount(Player) in PlayerUtils to check if player has a online account.
If player has a online account, you can use getOnlineUUID(Player) in PlayerUtils to get player online account uuid on offline server.
You can clear player's skin with method "resetSkin" in PlayerUtils, if player has online account, his skin will be set to his online account skin, or else steve or alex.
You can use method "syncSkin" in PlayerUtils to make people who has online account to show their online skin on offline server
Now EasyAPI PlayerUtils has a big upgrades!
You can send title, subtitle, actionbar message in PlayerUtils!
You can also set player skin!
Attention: You can only set a online player skin to the other player, no matter the other player has online minecraft account or not
Send title, subtitle, actionbar in PlayerUtils!
And fixed EzClass bugs:
If invoked methods returns void, method won't be invoke
Fixed when use draw setting clone() method
If modified item stack after and item stack comes from a player's inventory, the item stack in player's inventory also will be modified
Now draw setting can clone a item so you don't need set item data too much times!
(UTC-8) Today's final version
If has more bugs I will fix it tomorrow
Fixed multi language api caused when send message, plugin cannot get player client language and send right language message, then send en_us language message
Fixed language manager reload problems
Fixed if you turn a item stack to json object, then turn it back, will throw a exception because I forgot remove a "," in an array.
Fixed cannot register multi commands to a same prefix
(Because registered command map used Map<String,EzCommand> not Map<String,List<EzCommand>> so registered command is replaced by new command
Command executor register is after server loaded so caused bugs