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 static void NewVote() | |
| { | |
| VoteIsOn = true; | |
| } | |
| public static void takeVote() | |
| { | |
| VoteThread = new Thread(new ThreadStart(delegate | |
| { | |
| NewVote(); |
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
| static void DragonHandler(Player player, Command cmd) | |
| { | |
| string DragonCMD = cmd.Next(); | |
| switch (DragonCMD.toLower()) | |
| { | |
| case "on": | |
| if (!player.Info.isDragon) | |
| { | |
| //Great dragon is off | |
| //Turns Dragon On until the user turns it off |
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) <2013 - 2014> Michael Cummings <michael.cummings.97@outlook.com> | |
| // All rights reserved. | |
| // | |
| // Redistribution and use in source and binary forms, with or without | |
| // modification, are permitted provided that the following conditions are met: | |
| // * Redistributions of source code must retain the above copyright | |
| // notice, this list of conditions and the following disclaimer. | |
| // * Redistributions in binary form must reproduce the above copyright | |
| // notice, this list of conditions and the following disclaimer in the | |
| // documentation and/or other materials provided with the distribution. |
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 static void takeVote() | |
| { | |
| world1 = PropHuntWorlds[randWorld.Next(0, PropHuntWorlds.Count)]; | |
| world2 = PropHuntWorlds[randWorld.Next(0, PropHuntWorlds.Count)]; | |
| world3 = PropHuntWorlds[randWorld.Next(0, PropHuntWorlds.Count)]; | |
| if (world1 != world2 || world1 != world3 || world2 != world3) | |
| { | |
| VoteThread = new Thread(new ThreadStart(delegate | |
| { | |
| NewVote(); |
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 Interval(SchedulerTask task) | |
| { | |
| //check to stop Interval | |
| if (_world == null) | |
| { | |
| _world = null; | |
| task.Stop(); | |
| return; | |
| #if DEBUG | |
| Server.Message("World was null"); |
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
| static readonly CommandDescriptor CdJoke = new CommandDescriptor | |
| { | |
| Name = "Joke", | |
| //Permissions = new Permission[] { Permission.Games}, | |
| Aliases = new[] { "Jk" }, | |
| Category = CommandCategory.Fun, | |
| IsConsoleSafe = true, | |
| Usage = "/Joke", | |
| Help = "Displays a random joke to the server", | |
| Handler = JokeHandler |
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
| void ProcessSetBlockPacket() | |
| { | |
| BytesReceived += 9; | |
| if (World == null || World.Map == null) return; | |
| ResetIdleTimer(); | |
| short x = IPAddress.NetworkToHostOrder(reader.ReadInt16()); | |
| short z = IPAddress.NetworkToHostOrder(reader.ReadInt16()); | |
| short y = IPAddress.NetworkToHostOrder(reader.ReadInt16()); | |
| ClickAction action = (reader.ReadByte() == 1) ? ClickAction.Build : ClickAction.Delete; | |
| byte type = reader.ReadByte(); |
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
| How this should work: | |
| *NOTE* # refers to the number that is supplied on the texture info page of the texture hosting site | |
| - Client executes command (ex: /env terrain #) | |
| - Server sends GET/POST request to URL (ex: texture.classicube.net/getTexture?#) | |
| - Server gets reply of the URL of the texture (ex: texture.classicube.net/repo/mrbluepotato/sphax64x-129484) | |
| - Server stores that URL somewhere (ex: in fCraft, worlds.xml) | |
| - Server sends EnvMapAppearance packet to client containing the URL of the texture | |
| - Client then proceeds to download texture and apply it. |
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
| // resource download thread | |
| minecraft.sound.registerSound(new File(fireworksFolder, "blast1.ogg"), "fireworks/blast1.ogg"); | |
| // minecraft.java | |
| level.playSound("fireworks.blast1", xCoord, yCoord, zCoord, Volume + 1.0F, 1.0F); |
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
| "sound3/fireworks/blast1.ogg", | |
| "sound3/fireworks/launch1.ogg", "sound3/fireworks/twinkle1.ogg", "sound3/random/explode1.ogg", | |
| "sound3/random/explode2.ogg", "sound3/random/explode3.ogg", "sound3/random/fuse.ogg", "sound3/random/splash.ogg", | |
| "sound3/ambient/weather/rain1.ogg", "sound3/ambient/weather/rain2.ogg", "sound3/ambient/weather/rain3.ogg", | |
| "sound3/ambient/weather/rain4.ogg", "sound3/ambient/weather/thunder1.ogg", "sound3/ambient/weather/thunder2.ogg", | |
| "sound3/ambient/weather/thunder3.ogg", "sound3/mob/chicken/say1.ogg", "sound3/mob/chicken/say2.ogg", | |
| "sound3/mob/chicken/say3.ogg", "sound3/mob/pig/say1.ogg", "sound3/mob/pig/say2.ogg", | |
| "sound3/mob/pig/say3.ogg", "sound3/mob/sheep/say1.ogg", "sound3/mob/sheep/say2.ogg", | |
| "sound3/mob/sheep/say3.ogg", "sou |