Skip to content

Instantly share code, notes, and snippets.

View sgdc3's full-sized avatar

Gabriele C. sgdc3

View GitHub Profile
@sgdc3
sgdc3 / Metrics.java
Created January 29, 2017 22:09 — forked from Bastian/Metrics.java
The Metrics class for bStats
package your.package;
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.ServicePriority;
import org.bukkit.plugin.java.JavaPlugin;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import javax.net.ssl.HttpsURLConnection;
@sgdc3
sgdc3 / xrdpMac.sh
Created December 2, 2016 12:47
Xrdp install script for OSX
#!/bin/sh
echo Controllo stato csrutil....
SIP_status=`/usr/bin/csrutil status | awk '/status/ {print $5}' | sed 's/\.$//'`
if [ $SIP_status = "enabled" ]; then
echo Devo disabilitare il CSR dalla recovery mode per continuare!
echo Adesso si riavviera'' il sistema, premere simultaneamente i tasti Mac e R
echo Una volta avviata la recovery mode aprire il terminale e scrivere
@sgdc3
sgdc3 / NoVillagerTrading.java
Created August 14, 2016 22:24
NoVillagerTrading, requested by foxi69
package com.github.sgdc3.novillagerstrading;
import org.bukkit.ChatColor;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.entity.Villager;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerInteractEntityEvent;
modelVersion: 4.0.0
# Artifact infos
groupId: fr.xephi
artifactId: authme
version: 5.2-SNAPSHOT
packaging: jar
# Project infos
name: AuthMeReloaded
# What type of database do you want to use? Avariable options: sqlite, mysql, redis
# (The old flatfile backend is now deprecated, if you set this option to 'file' the 'file to SQLite' converter will be executed!)
backend: sqlite
# Do you like to cache all the queries? (Performance Boost)
caching: true
# Database Name
databaseName: authme
# Table of the database
tableName: authme
forcedActions:
action1:
at: firstlogin
executedBy: console
commands:
- 'msg %p Welcome!'
- pex user set group Player
connectionmessage:
at: connection
executedBy: console
# Available languages: en, de, br, cz, pl, fr, ru, hu, sk, es, zhtw, fi, zhcn, lt, it, ko, pt
language: en
registration:
# Do you want to enable the registration on the server?
enabled: true
# Do you want to force players to register before playing?
force: true
# Maximum Registration per IP
maxRegPerIp: 1
sessionLogin:
# Do you want to enable session? When enabled
# the ip of a player will be bound to the nickname
# of the player on login. As long as neither of those
# two change players don't have to login on a reconnect
enabled: false
# After how many minutes a session should timeout?
# 0 for unlimitted sessions, use 0 at your own risk!
# consider that session will end only after timeout, and
# if player's ip is changed but the timeout treshould isent