Skip to content

Instantly share code, notes, and snippets.

@xZise
xZise / gist:1020431
Created June 11, 2011 10:13
Example Bukkit location classes
/*
* Missing properties:
* - world
* - getDirection
* - zero
* - equals
* - hashcode
* - clone
* - to<Type> (similar to the Location.toVector())
* - toString()
@xZise
xZise / gist:1086411
Created July 16, 2011 14:47
extends clause in Java generics
public static int sumInt(List<Integer> intList) {
int sum = 0;
for (int i : intList) {
sum += i;
}
return sum;
}
public static double sumDouble(List<Double> doubleList) {
double sum = 0;
@xZise
xZise / gist:1086462
Created July 16, 2011 15:39
Dynmap configuration file
# All paths in this configuration file are relative to Dynmap's data-folder: minecraft_server/plugins/dynmap/
# NOTE: this is a sample of the standard configuration.txt, with HDMap renders substituted
components:
- class: org.dynmap.ClientConfigurationComponent
- class: org.dynmap.InternalClientUpdateComponent
sendhealth: true
sendposition: true
allowwebchat: true
@xZise
xZise / message.yml
Created July 24, 2011 21:26
Login message setup
#Create new messages here. See the readme file for help.
messages:
login:
lg:
receivers:
groups: [pri]
users: []
triggers:
groups: [pri]
users: []
@xZise
xZise / gist:1114153
Created July 29, 2011 16:20
Permissions solution
groups:
Default:
default: true
info:
prefix: '&0'
suffix: ''
build: true
interact: true
warp:
limit:
@xZise
xZise / gist:1119919
Created August 2, 2011 09:55
Not working interact example
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.Event;
import org.bukkit.event.Event.Priority;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerListener;
import org.bukkit.plugin.java.JavaPlugin;
public class Plugin extends JavaPlugin {
@xZise
xZise / gist:1123025
Created August 3, 2011 16:10
Location safety test
/**
* Returns if the location is save.
* @return if the location is save. Is false if invalid.
*/
public boolean isSave() {
//TODO: Check if the player can fall through: Check below if there is a torch (not on ground), wall sign
if (this.location.isValid()) {
Location location = this.getLocation().toLocation();
Material lower = location.getBlock().getType();
groups:
Default:
default: true
permissions:
- essentials.compass
- essentials.list
- essentials.rules
- essentials.spawn
- xwarp.warp.to.global
- xwarp.warp.to.invited
@xZise
xZise / configuration.txt
Created August 7, 2011 14:27
Dynmap configuration files
# All paths in this configuration file are relative to Dynmap's data-folder: minecraft_server/plugins/dynmap/
# All map templates are defined in the templates directory
# By default, the 'classic' FlatMap and KzedMap templates are used, which can be found in normal.txt, nether.txt, and skylands.txt
#
# To use the HDMap low-res map templates as world defaults (normal-lowres, nether-lowres and skylands-lowres), uncomment the following line
# The definitions of these templates are in normal-lowres.txt, nether-lowres.txt, and skylands-lowres.txt
#deftemplatesuffix: lowres
# To use the HDMap hi-res map templates (these can take a VERY long time for initial fullrender), comment the following line
# The definitions of these templates are in normal-hires.txt, nether-hires.txt, and skylands-hires.txt
groups:
Prisoner:
default: false
permissions: []
inheritance: []
info:
prefix: ""
build: false
suffix: ""
Default: