mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-08 09:10:11 +08:00
Remove useless files
This commit is contained in:
parent
b9720385f0
commit
4cccd854cc
@ -1,31 +0,0 @@
|
||||
/**
|
||||
* @author Him188moe
|
||||
*/
|
||||
public class NetworkTest {
|
||||
public static void main(String[] args) {
|
||||
|
||||
/*
|
||||
System.out.println(Short.valueOf("37 13", 16));
|
||||
|
||||
System.out.println(1040400290L & 0x0FFFFFFFF);
|
||||
System.out.println(Long.valueOf("3E033FA2", 16));
|
||||
*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static String bytesToHex(byte[] bytes) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
for(int i = 0; i < bytes.length; i++) {
|
||||
String hex = Integer.toHexString(bytes[i] & 0xFF);
|
||||
if(hex.length() < 2){
|
||||
sb.append(0);
|
||||
}
|
||||
sb.append(hex);
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
package event
|
||||
|
||||
import net.mamoe.mirai.event.Event
|
||||
import net.mamoe.mirai.event.broadcast
|
||||
import net.mamoe.mirai.event.subscribeAll
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
/**
|
||||
* @author Him188moe
|
||||
*/
|
||||
open class SuperEvent : Event() {
|
||||
companion object : KClass<SuperEvent> by SuperEvent::class//方便 subscribe
|
||||
}
|
||||
|
||||
open class ChildEvent : SuperEvent()
|
||||
|
||||
open class ChildChildEvent : ChildEvent()
|
||||
|
||||
class ChildChildChildEvent : ChildChildEvent()
|
||||
|
||||
|
||||
suspend fun main() {
|
||||
SuperEvent.subscribeAll {
|
||||
always {
|
||||
println(it.javaClass.simpleName)//ChildChildChildEvent
|
||||
}
|
||||
}
|
||||
|
||||
ChildChildChildEvent().broadcast()
|
||||
}
|
Loading…
Reference in New Issue
Block a user