Skip to content

Instantly share code, notes, and snippets.

View Fejm's full-sized avatar
🏠
Working from home

Mateusz Filipczak Fejm

🏠
Working from home
View GitHub Profile
@Fejm
Fejm / spigot.yml
Created February 23, 2020 18:09
spigot.yml
# This is the main configuration file for Spigot.
# As you can see, there's tons to configure. Some options may impact gameplay, so use
# with caution, and make sure you know what each option does before configuring.
# For a reference for any variable inside this file, check out the Spigot wiki at
# http://www.spigotmc.org/wiki/spigot-configuration/
#
# If you need help with the configuration or have any questions related to Spigot,
# join us at the IRC or drop by our forums and leave a post.
#
# IRC: #spigot @ irc.spi.gt ( http://www.spigotmc.org/pages/irc/ )
@Fejm
Fejm / paper.yml
Created February 23, 2020 18:08
paper.yml
# This is the main configuration file for Paper.
# As you can see, there's tons to configure. Some options may impact gameplay, so use
# with caution, and make sure you know what each option does before configuring.
#
# If you need help with the configuration or have any questions related to Paper,
# join us in our Discord or IRC channel.
#
# Discord: https://paperdiscord.emc.gs
# IRC: #paper @ irc.spi.gt ( http://irc.spi.gt/iris/?channels=paper )
# Website: https://papermc.io/
settings:
allow-end: false
warn-on-overload: true
permissions-file: permissions.yml
update-folder: update
plugin-profiling: false
connection-throttle: -1
query-plugins: true
deprecated-verbose: default
shutdown-message: Server closed
@Fejm
Fejm / iptables.txt
Created December 31, 2019 00:43
Banned IP's
Chain INPUT (policy ACCEPT)
target prot opt source destination
REJECT all -- 109.238.208.138 0.0.0.0/0 reject-with icmp-port-unreachable
REJECT all -- 109.238.208.130 0.0.0.0/0 reject-with icmp-port-unreachable
REJECT all -- 185.14.148.75 0.0.0.0/0 reject-with icmp-port-unreachable
REJECT all -- 212.200.237.122 0.0.0.0/0 reject-with icmp-port-unreachable
REJECT all -- 216.144.228.130 0.0.0.0/0 reject-with icmp-port-unreachable
REJECT all -- 174.127.155.118 0.0.0.0/0 reject-with icmp-port-unreachable
REJECT all -- 203.188.243.50 0.0.0.0/0 reject-with icmp-port-unreachable
REJECT all -- 177.136.255.90 0.0.0.0/0 reject-with icmp-port-unreachable
package pl.fejm.server.api.utils;
import org.bukkit.craftbukkit.v1_8_R3.CraftChunk;
import net.minecraft.server.v1_8_R3.BlockPosition;
import net.minecraft.server.v1_8_R3.Chunk;
import net.minecraft.server.v1_8_R3.ChunkSection;
import net.minecraft.server.v1_8_R3.IBlockData;
public class SetBlockFast {
@Override
public void handle(Login login) throws Exception
{
Preconditions.checkState( thisState == State.LOGIN, "Not expecting LOGIN" );
ServerConnection server = new ServerConnection( ch, target );
ServerConnectedEvent event = new ServerConnectedEvent( user, server );
bungee.getPluginManager().callEvent( event );
ch.write( BungeeCord.getInstance().registerChannels( user.getPendingConnection().getVersion() ) );
@Fejm
Fejm / DeviceUtil.java
Created October 1, 2016 18:52 — forked from espinchi/DeviceUtil.java
Check if the running device is an emulator
import android.os.Build;
/**
* Utility methods related to physical devies and emulators.
*/
public class DeviceUtil {
public static boolean isEmulator() {
return Build.FINGERPRINT.startsWith("generic")
|| Build.FINGERPRINT.startsWith("unknown")