Commits
md_5 authored 93e7b199bd2
1 - | --- ../work/decompile-8eb82bde/net/minecraft/server/WorldData.java 2015-01-05 09:50:01.989188327 +1100 |
2 - | +++ src/main/java/net/minecraft/server/WorldData.java 2015-01-05 09:50:01.993188321 +1100 |
1 + | --- ../work/decompile-8eb82bde/net/minecraft/server/WorldData.java 2015-01-13 20:36:38.880978444 +1100 |
2 + | +++ src/main/java/net/minecraft/server/WorldData.java 2015-01-13 20:36:38.880978444 +1100 |
3 3 | |
4 4 | package net.minecraft.server; |
5 5 | |
6 6 | import java.util.concurrent.Callable; |
7 7 | +import org.bukkit.Bukkit; |
8 8 | +import org.bukkit.event.weather.ThunderChangeEvent; |
9 9 | +import org.bukkit.event.weather.WeatherChangeEvent; |
10 10 | |
11 11 | public class WorldData { |
12 12 | |
13 - | |
13 + | |
14 14 | } |
15 15 | |
16 16 | public void setThundering(boolean flag) { |
17 17 | + // CraftBukkit start |
18 18 | + org.bukkit.World world = Bukkit.getWorld(getName()); |
19 19 | + if (world != null) { |
20 20 | + ThunderChangeEvent thunder = new ThunderChangeEvent(world, flag); |
21 21 | + Bukkit.getServer().getPluginManager().callEvent(thunder); |
22 22 | + if (thunder.isCancelled()) { |
23 23 | + return; |
24 24 | + } |
25 + | + |
26 + | + setThunderDuration(0); // Will force a time reset |
25 27 | + } |
26 28 | + // CraftBukkit end |
27 29 | this.s = flag; |
28 30 | } |
29 31 | |
30 - | |
32 + | |
31 33 | } |
32 34 | |
33 35 | public void setStorm(boolean flag) { |
34 36 | + // CraftBukkit start |
35 37 | + org.bukkit.World world = Bukkit.getWorld(getName()); |
36 38 | + if (world != null) { |
37 39 | + WeatherChangeEvent weather = new WeatherChangeEvent(world, flag); |
38 40 | + Bukkit.getServer().getPluginManager().callEvent(weather); |
39 41 | + if (weather.isCancelled()) { |
40 42 | + return; |
41 43 | + } |
44 + | + |
45 + | + setWeatherDuration(0); // Will force a time reset |
42 46 | + } |
43 47 | + // CraftBukkit end |
44 48 | this.q = flag; |
45 49 | } |
46 50 | |
47 - | |
51 + | |
48 52 | static boolean q(WorldData worlddata) { |
49 53 | return worlddata.x; |
50 54 | } |
51 55 | + |
52 56 | + // CraftBukkit start - Check if the name stored in NBT is the correct one |
53 57 | + public void checkName( String name ) { |
54 58 | + if ( !this.n.equals( name ) ) { |
55 59 | + this.n = name; |
56 60 | + } |
57 61 | + } |