Skip to content

Instantly share code, notes, and snippets.

View Karlatemp's full-sized avatar
🏳️‍🌈
如你所见,如梦所见

微莹·纤绫 Karlatemp

🏳️‍🌈
如你所见,如梦所见
View GitHub Profile
@Karlatemp
Karlatemp / JNIfromJNA.java
Created August 5, 2022 12:34
Calling JNI from JNA
package io.github.karlatemp.jmse.tests;
import com.sun.jna.*;
import io.github.karlatemp.jmse.kit.SuperConsumer;
import io.github.karlatemp.unsafeaccessor.Unsafe;
import java.util.HashMap;
public class JNIfromJNA {
@Karlatemp
Karlatemp / MiraiConsolePermissionServiceExample.java
Created March 11, 2022 11:46
mirai-console-permission-service-example
import kotlin.Lazy;
import kotlin.LazyKt;
import net.mamoe.mirai.console.permission.*;
import net.mamoe.mirai.console.plugin.jvm.JavaPlugin;
import net.mamoe.mirai.console.plugin.jvm.JvmPluginDescriptionBuilder;
import net.mamoe.mirai.contact.Member;
import net.mamoe.mirai.contact.User;
class JPlugin extends JavaPlugin {
public static final JPlugin INSTANCE = new JPlugin();
@Karlatemp
Karlatemp / mkpom.gradle
Last active July 6, 2020 10:13
Gradle pom generator
/*
* Copyright (c) 2018-2020 Karlatemp. All rights reserved.
* @author Karlatemp <karlatemp@vip.qq.com> <https://github.com/Karlatemp>
* @create 2020/07/06 17:15:01
*
* gradient/gradient/pom.gradle
*/
/*
How to use:
@Karlatemp
Karlatemp / Mirai-YinwuChat-Bootstrap.kt
Created June 26, 2020 15:16
Mirai-YinwuChat-Bootstrap.kt
/*
* Copyright (c) 2018-2020 Karlatemp. All rights reserved.
* @author Karlatemp <karlatemp@vip.qq.com> <https://github.com/Karlatemp>
* @create 2020/06/17 21:34:56
*
* code/code.main/Startup.kt
*/
import cn.mcres.karlatemp.mxlib.network.PipelineUtils
import cn.mcres.karlatemp.mxlib.network.minecraft.MinecraftProtocolHelper