- spongybot:
#
- wee.bot:
`
- beta_bot:
!
- guster.conch:
-
- chester.bot.v2:
$
- infodousbot:
~
- ptp.bot:
.
- pangeabot:
@
- phobiaknown:
%
This file contains hidden or 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 main | |
import ( | |
"reflect" | |
) | |
type MyEnum struct { | |
SOME_VALUE string | |
SOME_OTHER_THING string | |
} |
This file contains hidden or 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 java.util.*; | |
import java.util.concurrent.locks.ReadWriteLock; | |
import java.util.concurrent.locks.ReentrantReadWriteLock; | |
import java.util.function.Consumer; | |
public class CommandBus { | |
| |
private final Map<String, List<Consumer<String[]>>> handlers = new HashMap<>(); | |
private final ReadWriteLock lock = new ReentrantReadWriteLock(); | |
|
This file contains hidden or 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
public abstract class CommandExecutor { | |
private final String command, permission; // you can group variables of the same type together like this | |
private final boolean console, player; | |
private final int length; | |
/* | |
Instantiating the variables inside of the constructor instead of using a setter. If you do not want all of these | |
to be set (e.g. if some are optional) you can have multiple constructors. | |
*/ |
I spent a while writing this out, so please give it a read and try this out. You'll thank me soon!
Static is not evil, however you are using it wrong. This is known as 'static abuse'. http://stackoverflow.com/questions/1766715/when-not-to-use-the-static-keyword-in-java http://stackoverflow.com/questions/7026507/why-are-static-variables-considered-evil
I would highly advise checking out the first 20 or so of the new boston's java tutorials. Some may disagree, however I believe that they are very helpful
This file contains hidden or 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
################## | |
# Privacy Settings | |
################## | |
# Privacy: Let apps use my advertising ID: Disable | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0 | |
# To Restore: | |
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1 | |
# Privacy: SmartScreen Filter for Store Apps: Disable | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0 |
This file contains hidden or 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 com.google.common.base.Preconditions; | |
import com.google.common.base.Splitter; | |
import com.google.common.collect.Lists; | |
import org.bukkit.Bukkit; | |
import org.bukkit.ChatColor; | |
import org.bukkit.OfflinePlayer; | |
import org.bukkit.entity.Player; | |
import org.bukkit.scoreboard.*; | |
import java.util.*; |
This file contains hidden or 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 de.zh32.slp; | |
import com.google.gson.Gson; | |
import java.io.ByteArrayOutputStream; | |
import java.io.DataInputStream; | |
import java.io.DataOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.io.OutputStream; |
NewerOlder