Sueta

KotLib

0.2.12

A kotlin libraries which included stdlib, reflect, coroutine, exposed and some of my apis

·Plugin
  1. 0.2.12latestUpdated Data Configuration with Foreign keyOct 24, 2020
    Added Foreign Object Updated config.yml Code (YAML): yaml_warn_if_foreign_key_unknown : false foreign_key_unchangeable : false foreign_key_mode : NULLABLE # or DELETE debug_enabled : false debug_plugins : - KotLib Data Configuration with Foreign Key (NEW EXAMPLE) Code (Kotlin): class KotLibTester : BukkitPlugin ( ) { @DataResource (folder = "Address" ) data class Address ( @PrimaryKey val name : String, val address : String ) : DataFile @DataResource (folder = "School" ) data class School ( @PrimaryKey val name : String, @ForeignKey (Address :: class ) var locate : String ?, @ForeignObject var address : Address ? = null ) : DataFile class AddressController (dao : Dao <Address, String > ) : Dao <Address, String > by dao class SchoolController (dao : Dao <School, String > ) : Dao <School, String > by dao override fun enable ( ) { val manager = KotLib. getConfigFactory ( this ) . registerDao (Address :: class, AddressController :: class ) . registerDao (School :: class, SchoolController :: class ) . dump ( ) val addressController = manager. getDao (AddressController :: class ) val schoolController = manager. getDao (SchoolController :: class ) addressController. save { Address ( "A", "city A, HK" ) } addressController. save { Address ( "B", "city B, HK" ) } addressController. save { Address ( "C", "city C HK" ) } schoolController. save { School ( "A school", "A" ) } schoolController. save { School ( "B school", "B" ) } schoolController. save { School ( "C school", "C" ) } // Normal kLogger. info ( "=== Test 1 ===" ) schoolController. findAll ( ). forEach { s -> kLogger. info (s. toString ( ) ) } schoolController. update ( "A school" ) { locate = "C" } // Changed foreign key kLogger. info ( "=== Test 2 ===" ) schoolController. findAll ( ). forEach { s -> kLogger. info (s. toString ( ) ) } addressController. delete ( "B" ) // Removed address B kLogger. info ( "=== Test 3 ===" ) schoolController. findAll ( ). forEach { s -> kLogger. info (s. toString ( ) ) } schoolController. update ( "C school" ) { locate = null } // Removed foreign key kLogger. info ( "=== Test 4 ===" ) schoolController. findAll ( ). forEach { s -> kLogger. info (s. toString ( ) ) } } } Result:
    1 download
  2. 0.2.11Added notifyUnpaid methodSep 29, 2020
    - Added notifyUnpaid method Code (Kotlin): notifyUnPaid ( "you haven't paid the {0} version {1} plugin !", "click the text to check author github!", "https://github.com/mygithub" ) - stopped 1.12 support - update jackson core version to 2.11.2
    26 downloads
  3. 0.2.9.1Added asyncTransection and runAsyncSep 1, 2020
    Code (Kotlin): runAsync { println ( "hello world" ) }. thenSync { println ( "finished" ) }. catch { e -> e. printStackTrace ( ) }. finally { println ( "done" ) }
    25 downloads
  4. 0.2.9-kotlin-updateKotlin libraries version updated to 1.4.0Aug 29, 2020
    Kotlin libraries version updated to 1.4.0
    7 downloads
  5. 0.2.9Added Support 1.12 ~ 1.14Jul 25, 2020
    Added Support for 1.12 ~ 1.14
    13 downloads
  6. 0.2.8Upgrade as belowJul 19, 2020
    1. upgrade kotlin version to v1.3.72 2. upgrade jackson-databind to v2.11.0
    7 downloads
  7. 0.2.7.9An Interim version fixing a lots of bugsApr 16, 2020
    - Fixed the mostly DAO problems - Fixed the string format problem - And more
    36 downloads
  8. 0.2.6Kotlin libraries updated to 1.3.70Mar 15, 2020
    Kotlin libraries updated to 1.3.70
    15 downloads
  9. 0.2.4Update as belowFeb 24, 2020
    1. deleted old api version 2. added null handling for map/collection to empty list / map 3. now the config can access all fields now (including private/protected)
    9 downloads
  10. 0.2.3Support 1.12 itemstackFeb 19, 2020
    Support 1.12 itemstack library
    11 downloads
  11. 0.2.2Fixed CommandSender in BigCommand cannot cast to PlayerFeb 17, 2020
    Fixed CommandSender in BigCommand cannot cast to Player
    9 downloads
  12. 0.2.1added as followingFeb 7, 2020
    · added Foreign Key for data linkage · debug utils · config.yml for some settings Data Configuration with Foreign Key Code (Kotlin): override fun enable ( ) { val manager = KotLib. getConfigFactory ( this ) . registerDao (kClassOf ( ), StudentController :: class ) . registerDao (kClassOf ( ), SchoolController :: class ) . registerDao (kClassOf ( ), AddressController :: class ) . dump ( ) val studentController : StudentController = manager. getDao (kClassOf ( ) ) val schoolController : SchoolController = manager. getDao (kClassOf ( ) ) val addressController : AddressController = manager. getDao (kClassOf ( ) ) debug ( "This is a debug message!!!!!!" ) val testCommands = object : BukkitCommand ( name = "test", description = "test commands", child = arrayOf ( BukkitCommand ( name = "student", description = "student commands", child = arrayOf ( BukkitCommand ( name = "add", description = "add student", placeholders = arrayOf ( "name", "school", "address" ) ) { commandSender, strings -> val id = studentController. save { Student (UUID. randomUUID ( ), strings [ 0 ], strings [ 1 ], strings [ 2 ] ) } commandSender. sendMessage ( "saved id: $id" ) }, BukkitCommand ( name = "remove", description = "remove student", placeholders = arrayOf ( "name" ) ) {commandSender, strings -> val list = studentController. deleteSome { name == strings [ 0 ] } commandSender. sendMessage ( "Deleted: $list" ) } ) ), BukkitCommand ( name = "address", description = "address commands", child = arrayOf ( BukkitCommand ( name = "add", description = "add address", placeholders = arrayOf ( "name", "population" ) ) {commandSender, strings -> val population = strings [ 1 ]. toIntOrNull ( ) ?: return@BukkitCommand val id = addressController. save { Address (strings [ 0 ], population ) } commandSender. sendMessage ( "saved id: $id" ) }, BukkitCommand ( name = "remove", description = "remove address", placeholders = arrayOf ( "name" ) ) {commandSender, strings -> val b = addressController. delete (strings [ 0 ] ) commandSender. sendMessage ( "deleted: $b" ) } ) ), BukkitCommand ( name = "school", description = "school commands", child = arrayOf ( BukkitCommand ( name = "add", description = "add school", placeholders = arrayOf ( "name", "band", "address" ) ) {commandSender, strings -> val band = strings [ 1 ]. toIntOrNull ( ) ?: return@BukkitCommand val id = schoolController. save { School (strings [ 0 ], band, strings [ 2 ] ) } commandSender. sendMessage ( "saved id: $id" ) }, BukkitCommand ( name = "remove", description = "remove school", placeholders = arrayOf ( "name" ) ) { commandSender, strings -> val b = schoolController. delete (strings [ 0 ] ) commandSender. sendMessage ( "deleted: $b" ) } ) ) ) ) { } registerCmd (testCommands ) } @DataResource (folder = "Students" ) data class Student (@PrimaryKey val id : UUID, var name : String, @ForeignKey (School :: class ) val school : String, @ForeignKey (Address :: class ) val address : String ) : DataFile @DataResource (folder = "Schools" ) data class School (@PrimaryKey val name : String, var band : Int, @ForeignKey (Address :: class
    9 downloads
  13. 0.2.0Fixed plugin cannot run in bungeecordFeb 2, 2020
    Fixed plugin cannot run in bungeecord
    12 downloads
  14. 0.1.9update bungeecommand that child is not optional parameterFeb 1, 2020
    update bungeecommand that child is not optional parameter
    7 downloads
  15. 0.1.8update followingJan 30, 2020
    · added exposed SQL syntax: insertUpdate · added some small utils in extension
    10 downloads
  16. 0.1.7Update as belowJan 18, 2020
    · Added optional placeholders for BigCommand · Now parent permission will affect for sub commands
    11 downloads
  17. 0.1.6Changed single pool sql datasource to hikariCPJan 13, 2020
    Changed single pool sql datasource to hikariCP latest sql.yml Code (YAML): single_pool_enable : false data_source : "mysql" driver : "com.mysql.jdbc.Driver" host : "localhost" port : 3306 database : "database" username : "username" password : "password" use_ssl : false pool: name : KotLib min_size : 5 max_size : 10 connection_timeout : 30000 idle_timeout : 60000 max_life_time : 600000 # jdbc:mysql://localhost:3306/database the api version is still 0.1.5
    7 downloads
  18. 0.1.5Added consume event and click event from itemStack(), removed continueEditJan 11, 2020
    feature as below
    8 downloads
  19. 0.1.4New Features about createUIJan 11, 2020
    new features as below · fills feature · (row 0 ~ 6) row (slot 1 ~ 9) function · CHANGED SLOTS TO ROWS, SO 54 SHOULD BE 6
    11 downloads
  20. 0.1.3fix linkJan 11, 2020
    fix link
    8 downloads
  21. 0.1.2DAO pattern finishedJan 10, 2020
    You can check the example usage from overview
    11 downloads
  22. 0.1.1Added DAO which can access from data poolJan 10, 2020
    Added DAO which can access from data pool Code (Kotlin): interface Dao < out T : DataFile, in V : Comparable <V >> { fun findAll ( ) : List <T > fun findById (id : V ) : T ? fun find (filter : T. ( ) -> Boolean ) : List <T > fun update (id : V, update : T. ( ) -> Unit ) : T ? fun delete (id : V ) }
    7 downloads
  23. 0.1.0Fixed the followingJan 9, 2020
    · fixed plugin enabling error · ConfigORM now can work with kotlin data class, all features same as ConfigDTO
    13 downloads
  24. unstableUNSTABLE VERSION, PLZ WAIT FOR FUTHER UPDATEJan 9, 2020
    UNSTABLE VERSION, PLZ WAIT FOR FUTHER UPDATE
    11 downloads
  25. 0.0.9Restructure my apis, other libraries unchangedJan 9, 2020
    · Added APIs from CondigDTO (edition for support both bungee and spigot) · Removed old config api which using delegate · change the logic of Command Api · added getConfigFactory but removed getConfigSection · ALL INBUILT CONFIG PATH REPLACE "-" TO "_"
    10 downloads
  26. 0.0.7Fixed bigcommand invoke problemJan 9, 2020
    Fixed bigcommand invoke problem
    11 downloads
  27. 0.0.6fixed missed linkJan 8, 2020
    fixed missed link
    8 downloads
  28. 0.0.5Added more APIJan 8, 2020
    · ItemStack utils · Inventory utils · BigCommand utils · now this plugin can both run on bungee and spigot
    10 downloads
  29. 0.0.4See the followingJan 8, 2020
    · Restructured the module · Added single pool transaction (initialize pool from sql.yml) · Added KBoolean and KPrimitive
    8 downloads
  30. 0.0.3Jan 8, 2020
    16 downloads

Similar projects

Plugin →