This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.bukkit.Bukkit | |
import org.bukkit.boss.BarColor | |
import org.bukkit.boss.BarStyle | |
import org.bukkit.boss.BossBar | |
import org.bukkit.entity.Player | |
import org.bukkit.event.EventHandler | |
import org.bukkit.event.Listener | |
import org.bukkit.event.player.PlayerQuitEvent | |
import org.bukkit.plugin.Plugin | |
import org.bukkit.scheduler.BukkitRunnable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/sbt/sbt-assembly#excluding-scala-library-jars | |
assembly / assemblyExcludedJars := { | |
val cp = (assembly / fullClasspath).value | |
cp filter { attr => | |
val name = attr.data.getName | |
name.startsWith("scala-") || name.startsWith("scala3-") | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.bytedeco.javacv.FFmpegFrameGrabber; | |
import org.bytedeco.javacv.Frame; | |
import org.bytedeco.javacv.FrameGrabber; | |
import org.lwjgl.opengl.GL11; | |
import org.lwjgl.opengl.GL12; | |
import org.lwjgl.opengl.GL30; | |
import javax.sound.sampled.*; | |
import java.awt.image.*; | |
import java.io.File; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package kr.rvs.instrumentation; | |
import java.io.ByteArrayOutputStream; | |
import java.io.InputStream; | |
import java.lang.instrument.ClassDefinition; | |
import java.lang.instrument.Instrumentation; | |
/** | |
* Created by Junhyeong Lim on 2017-02-02. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 아이템 배열 비교 */ | |
@parent = array('type': 32, 'meta': array( | |
'lore': array('a', 'b', 'c'), | |
'display': 'Test' | |
)) | |
@item = array('data': 0, 'type': 32, 'qty': 10, 'flags': array(), 'meta': array( | |
'lore': array('a', 'b', 'c'), | |
'display': 'Test' | |
)) | |
if (_subset_of(@parent, @item)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@key = 'registered_aliases'; | |
@prevAliases = get_value(@key); | |
# Ensure | |
if (!@prevAliases) { | |
@prevAliases = array(); | |
} | |
set_timeout(0, closure() { | |
@completes = array(); | |
foreach (@alias in get_aliases()) { | |
@name = substr( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proc _subset_of(@arrayA, @arrayB) { | |
if (!is_array(@arrayA) || !is_array(@arrayB) || | |
is_associative(@arrayA) != is_associative(@arrayB)) { | |
return(false) | |
} | |
foreach (@key : @valueA in @arrayA) { | |
@valueB = array_get(@arrayB, @key, null) | |
if (@valueB == null | |
|| typeof(@valueB) != typeof(@valueA)) { | |
return(false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* _take_item() 예제: | |
# if (_take_item(player(), 아이템)) { | |
# msg('아이템 1개를 뺐었습니다.') | |
# } else { | |
# msg('아이템 1개가 부족합니다.') | |
# } | |
# if (_take_item(player(), 아이템, 100)) { | |
# msg('아이템 100 개를 뺐었습니다.') | |
# } else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* aliases.msa (파일) */ | |
*:/opchat = >>> | |
/* | |
# @isOpChat 변수에 닉네임.opchat 라는 전역변수의 값을 넣습니다. | |
# 커맨드헬퍼는 'test' 'abc' 를 할 경우 test 와 abc 사이의 공백과 무관하게 | |
# 두 값을 띄워주는데, (마침표) . 를 사이에 넣을 경우 값을 붙여줍니다. | |
# 예: msg('test' 'abc') test abc | |
# 예: msg('test''abc') test abc |
NewerOlder