Skip to content

Instantly share code, notes, and snippets.

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

Baran OZCAN Draww

🏠
Working from home
View GitHub Profile
MultiMC version: 0.6.11-1430
Minecraft folder is:
D:/MultiMC/instances/1.16.1/.minecraft
Java path is:
C:/Program Files (x86)/Common Files/Oracle/Java/javapath/javaw.exe
@Draww
Draww / ReplaceTurkishChars.java
Created October 12, 2019 10:03 — forked from onuryilmaz/ReplaceTurkishChars.java
Replace Turkish Characters
public static String clearTurkishChars(String str) {
String ret = str;
char[] turkishChars = new char[] {0x131, 0x130, 0xFC, 0xDC, 0xF6, 0xD6, 0x15F, 0x15E, 0xE7, 0xC7, 0x11F, 0x11E};
char[] englishChars = new char[] {'i', 'I', 'u', 'U', 'o', 'O', 's', 'S', 'c', 'C', 'g', 'G'};
for (int i = 0; i < turkishChars.length; i++) {
ret = ret.replaceAll(new String(new char[]{turkishChars[i]}), new String(new char[]{englishChars[i]}));
}
return ret;
}
@Draww
Draww / publickey-git-error.markdown
Created September 24, 2019 13:55 — forked from adamjohnson/publickey-git-error.markdown
Fix "Permission denied (publickey)" error when pushing with Git

"Help, I keep getting a 'Permission Denied (publickey)' error when I push!"

This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:

  1. Open git bash (Use the Windows search. To find it, type "git bash") or the Mac Terminal. Pro Tip: You can use any *nix based command prompt (but not the default Windows Command Prompt!)
  2. Type cd ~/.ssh. This will take you to the root directory for Git (Likely C:\Users\[YOUR-USER-NAME]\.ssh\ on Windows)
  3. Within the .ssh folder, there should be these two files: id_rsa and id_rsa.pub. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Type ls to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be named id_rsa and id_rsa.pub in order for Git, GitHub, and BitBucket to recognize them by default.
  4. To create the SSH keys, type ssh-keygen -t rsa -C "your_email@example.com". Th
@Draww
Draww / ScoreboardSign.java
Created March 8, 2019 15:54 — forked from lcarneli/ScoreboardSign.java
A simple tool to manage scoreboards in minecraft (lines up to 48 characters !). (Updated for Minecraft 1.11.2 version)
package com.mrzalty.scoreboards;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.craftbukkit.v1_11_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;
import net.minecraft.server.v1_11_R1.IScoreboardCriteria;
@Draww
Draww / ScoreboardSign.java
Created March 8, 2019 15:50 — forked from zyuiop/README.MD
A simple tool to manage scoreboards in minecraft (lines up to 48 characters !). 1.10 version : https://gist.github.com/FraZren/a7348ff3d96026d17cc817148f4221f9 // 1.11 version : https://gist.github.com/MrZalTy/f8895d84979d49af946fbcc108b1bf2b
package net.zyuiop.scoreboard;
import net.minecraft.server.v1_8_R3.*;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.entity.Player;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
@Draww
Draww / unirestjavamavenshader.xml
Created February 20, 2019 08:17 — forked from ismaelc/unirestjavamavenshader.xml
Add this Maven shader plugin in the Unirest-java pom.xml to work around dependency errors when using Unirest in your Android projects
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
@Draww
Draww / gist:5640f6e57b05a07284a65497a8e4aa4b
Created January 22, 2019 19:47
Maven ProtocolLib Build Error
[INFO] 12 warnings
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /D:/ValeMC/ValeBox/src/main/java/com/valemc/utils/lib/SignGUI.java:[72,55] cannot access org.bukkit.block.data.BlockData
class file for org.bukkit.block.data.BlockData not found
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
@Draww
Draww / Tutorial.md
Created October 20, 2018 10:20
A short discord.js tutorial with examples

Discord.js Tutorial - a short tutorial

After this tutorial you are able to code a cool bot with many commands and a level system.

Setup

Did you ever want to write your own bot but you think you are to bad for it or you don't have motivation? Stop thinking that way. Writing discord bots using discord.js is like, really, really, easy if you know some javascript basics.

In this tutorial we will use some ES6 and ES2017, which makes javascript more powerful. If you never heard of ES6/ES2017, i'll explain some stuff if i use it. Found a mistake? Just open an issue or fork and pull.

@Draww
Draww / linebreak.md
Created July 5, 2018 06:23
Line breaks in markdown
Hello  (<-- two spaces)
World

Hello
World


@Draww
Draww / TeleportFixThree.java
Created July 2, 2018 10:29 — forked from Zidkon/TeleportFixThree.java
Quick Fix to aadnk TeleportFixTwo
package com.comphenix.example;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Server;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;