UUIDAPI
When I make some private projects, I think that it would be great to add some features like offline payment or, offline whatever. So it came in my mind to make some UUID API to help me and developers to get UUID from a name and vice versa.
public boolean checkUUIDAPI ( ) {
boolean enabled = Bukkit. getServer ( ) . getPluginManager ( ) . isPluginEnabled ( "UUIDAPI" ) ;
if ( ! enabled ) {
// Warn
this . setEnabled ( false ) ;
}
return enabled ;
}
#
# Add softdepend: [UUIDAPI] to it.
#
# If you want to add multiple dependencies, incase you haven't
# understand yet, use
# softdepend: [UUIDAPI, Whatplugin, Plugin2] etc
softdepend : [ UUIDAPI ]
public class ExampleUsage {
public void setOfflineSomeThing ( String name ) {
UUID uuid = UUIDAPI. getUUID ( name ) ; // Get UUID
if ( uuid == null ) { // Player never existed
return ;
}
/*Get file of player*/ File file = new File ( this . getDataFolder ( ) , "data" + File . separator + uuid. toString ( ) + ".yml" ) ;
YamlConfiguration yml = YamlConfiguration. loadConfiguration ( file ) ;
/*
* TODO
* Do something
*/
}
}
UUIDAPI#getName
UUIDAPI#getUUID
Icon by Smashicons
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta