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
############################################################################# | |
## Config file for NTheEndAgain plugin. If you don't understand something, ## | |
## please ask on dev.bukkit.org or on forum post. Ribesg ## | |
############################################################################# | |
# This config file is about the world "world_the_end" | |
########################### | |
## GENERAL CONFIGURATION ## | |
########################### |
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
##################################################################### | |
## Config file for NTheEndAgain plugin ## | |
## If you don't understand something, please ask on dev.bukkit.org ## | |
## Ribesg ## | |
##################################################################### | |
# This config file is about the world "world_the_end" | |
########################### | |
## GENERAL CONFIGURATION ## |
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
##################################################################### | |
## Config file for NWorld plugin ## | |
## If you don't understand something, please ask on dev.bukkit.org ## | |
## Ribesg ## | |
##################################################################### | |
############# | |
## General ## | |
############# |
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
##################################################################### | |
## Config file for NEnchantingEgg plugin ## | |
## If you don't understand something, please ask on dev.bukkit.org ## | |
## Ribesg ## | |
##################################################################### | |
# The minimum distance between 2 altars. Default: 500 | |
# Note: You can't use a value under 35. | |
minimumDistanceBetweenTwoAltars: 500 | |
# The coefficient applied to durability boost on repair. Default: 2.5 |
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
// You may do this in PlayerMoveEvent or somewhere else. | |
// So you have those | |
final Player player; | |
final Location targetLocation; | |
// You get this one | |
final Location playerLocation = player.getLocation(); | |
// You want the player to look at target |
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
// !gstats | |
private class GlobalStats { | |
public String serversAmount; | |
public String serversDiff; | |
public String serversMax; | |
public String serversMin; | |
public String serversAvg; | |
public String playersAmount; |
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
public class TestClass { | |
public void method() { | |
// 1 | |
} | |
public void someOtherMethod() { | |
new Runnable() { | |
@Override | |
public void run() { |
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
/** | |
* Parses an original args array provided to a CommandExecutor to support quotes. | |
* If the parameter array is malformed, then this method returns the parameter array as-is. | |
* | |
* @param args The original args array. Ex: ['A', '"B', 'C', 'D"', 'E'] | |
* | |
* @return The resulting args array, if valid. Ex: ['A', 'B C D', 'E'] | |
*/ | |
public static String[] parseArgumentsWithQuotes(String[] args) { | |
final List<String> resultList = new ArrayList<>(); |
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
/** | |
* Parses an original args array provided to a CommandExecutor to support quotes. | |
* If the parameter array is malformed, then this method returns the parameter array as-is. | |
* | |
* @param args The original args array. Ex: ['A', '"B', 'C', 'D"', 'E'] | |
* | |
* @return The resulting args array, if valid. Ex: ['A', 'B C D', 'E'] | |
*/ | |
public static String[] parseArgumentsWithQuotes(String[] args) { | |
final List<String> resultList = new ArrayList<>(); |
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 java.util.ArrayList; | |
import java.util.List; | |
/** @author dumptruckman, Ribesg */ | |
public class ArgumentParser { | |
/** | |
* Transform a Bukkit-provided args array, considering quotes in the original String. | |
* Example: | |
* - Input = { a | 'b | c | d' | "e | f | g" | h"i | j" | "k | l'm | n" | 'o | p | q } |