This file contains hidden or 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.Map; | |
| import java.util.HashMap; | |
| class Java { | |
| public static void main(String[] args) { | |
| // Associate(or map) string values to numbers(Integerrs) | |
| Map<String, Integer> map = new HashMap<String, Integer>(); | |
| // map["joe"] = 1; | |
| map.put("Joe", 1); | |
| map.put("Nate", 2); | |
| // joe = 1, nate = 2 |
This file contains hidden or 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
| /* | |
| * Copyright (c) 2015 Nate Mortensen | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is | |
| * furnished to do so, subject to the following conditions: | |
| * |
This file contains hidden or 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.concurrent.ExecutionException; | |
| import java.util.concurrent.Future; | |
| import java.util.concurrent.TimeUnit; | |
| import java.util.concurrent.TimeoutException; | |
| /** | |
| * Add a Future object that doesn't involve Runnables or anything fancy. | |
| * It allows for checking for completion, waiting until completion, and getting the value. | |
| * Nice and simple. | |
| * |
This file contains hidden or 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 @interface Database { | |
| public DatabaseType value(); | |
| } |
This file contains hidden or 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
| @PluginService(value=SomeNmsThing.class, minecraftVersion="1_6R1") | |
| public class NmsThing1_6 implements SomeNmsThing { | |
| void doSomething() {} | |
| } |
This file contains hidden or 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
| #include <hxcpp.h> | |
| #ifndef INCLUDED_Test | |
| #include <Test.h> | |
| #endif | |
| #ifndef INCLUDED_haxe_Log | |
| #include <haxe/Log.h> | |
| #endif | |
| Void Test_obj::__construct() |
This file contains hidden or 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
| class Test { | |
| static function main() { | |
| var test = new TestImplementation(); | |
| trace(test.someVariable + ""); | |
| } | |
| } | |
| interface TestInterface { | |
| public var someVariable:Int = 2; | |
| } |
This file contains hidden or 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
| test: | |
| ==: org.bukkit.inventory.ItemStack | |
| type: POTION | |
| meta: | |
| ==: ItemMeta | |
| meta-type: POTION | |
| custom-effects: | |
| - ==: PotionEffect | |
| effect: 11 | |
| duration: 60 |
This file contains hidden or 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
| package com.evilmidget38.example; | |
| import java.util.ArrayList; | |
| import java.util.HashMap; | |
| import java.util.List; | |
| import java.util.Map; | |
| import java.util.Map.Entry; | |
| import org.bukkit.configuration.serialization.ConfigurationSerializable; | |
| import org.bukkit.configuration.serialization.ConfigurationSerialization; |
This file contains hidden or 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 void saveChestFile(Location loc, Inventory inv, String playerName){ | |
| File file = new File(getDataFolder(), loc.toString() + ".yml"); | |
| //Create a new File if one does not exist | |
| if(!file.exists()){ | |
| try{ | |
| file.createNewFile(); | |
| }catch(IOException e){ | |
| getLogger().severe("Could not create a new chest file for chest at " + loc.toString()); | |
| } |