@@ -43,7 +43,7 @@ public OreGinListener(OreGinManager oreGinMan)
43
43
* Checks to see if an OreGin can be created
44
44
*/
45
45
@ EventHandler
46
- public void OreGinInteraction (PlayerInteractEvent event )
46
+ public void oreGinInteraction (PlayerInteractEvent event )
47
47
{
48
48
Block clicked = event .getClickedBlock ();
49
49
Player creator = event .getPlayer ();
@@ -56,29 +56,29 @@ public void OreGinInteraction(PlayerInteractEvent event)
56
56
if (creator .getItemInHand ().getType ().equals (OreGinPlugin .OREGIN_UPGRADE_WAND ))
57
57
{
58
58
59
- if (oreGinMan .OreGinExistsAt (clicked .getLocation ()))
59
+ if (oreGinMan .oreGinExistsAt (clicked .getLocation ()))
60
60
{
61
- OreGin oreGin = oreGinMan .GetOreGin (clicked .getLocation ());
61
+ OreGin oreGin = oreGinMan .getOreGin (clicked .getLocation ());
62
62
creator .sendMessage (oreGin .upgrade ());
63
63
}
64
64
else
65
65
{
66
- creator .sendMessage (oreGinMan .CreateOreGin (clicked .getLocation ()));
66
+ creator .sendMessage (oreGinMan .createOreGin (clicked .getLocation ()));
67
67
}
68
68
} //Activate or de-activate OreGin
69
69
else if (creator .getItemInHand ().getType ().equals (OreGinPlugin .OREGIN_ACTIVATION_WAND ))
70
70
{
71
- if (oreGinMan .OreGinExistsAt (clicked .getLocation ()))
71
+ if (oreGinMan .oreGinExistsAt (clicked .getLocation ()))
72
72
{
73
- OreGin oreGin = oreGinMan .GetOreGin (clicked .getLocation ());
73
+ OreGin oreGin = oreGinMan .getOreGin (clicked .getLocation ());
74
74
creator .sendMessage (oreGin .togglePower ());
75
75
}
76
76
} //Repair OreGin
77
77
else if (creator .getItemInHand ().getType ().equals (OreGinPlugin .OREGIN_REPAIR_WAND ))
78
78
{
79
- if (oreGinMan .OreGinExistsAt (clicked .getLocation ()))
79
+ if (oreGinMan .oreGinExistsAt (clicked .getLocation ()))
80
80
{
81
- OreGin oreGin = oreGinMan .GetOreGin (clicked .getLocation ());
81
+ OreGin oreGin = oreGinMan .getOreGin (clicked .getLocation ());
82
82
creator .sendMessage (oreGin .repair ());
83
83
}
84
84
}
@@ -92,18 +92,18 @@ else if (creator.getItemInHand().getType().equals(OreGinPlugin.OREGIN_REPAIR_WAN
92
92
* Checks to see if an OreGin (dispenser or light) is being destroyed (block broken)
93
93
*/
94
94
@ EventHandler
95
- public void OreGinBroken (BlockBreakEvent event )
95
+ public void oreGinBroken (BlockBreakEvent event )
96
96
{
97
97
Block destroyed = event .getBlock ();
98
98
99
99
if ((destroyed .getState () instanceof Dispenser ) || destroyed .getType ().equals (OreGinPlugin .LIGHT_ON )
100
100
|| destroyed .getType ().equals (OreGinPlugin .LIGHT_OFF ))
101
101
{
102
- if (oreGinMan .OreGinExistsAt (destroyed .getLocation ()) || oreGinMan .OreGinLightExistsAt (destroyed .getLocation ()))
102
+ if (oreGinMan .oreGinExistsAt (destroyed .getLocation ()) || oreGinMan .oreGinLightExistsAt (destroyed .getLocation ()))
103
103
{
104
- OreGin oreGin = oreGinMan .GetOreGin (destroyed .getLocation ());
105
- if (oreGinMan .OreGinLightExistsAt (destroyed .getLocation ()))
106
- oreGin = oreGinMan .GetOreGin (destroyed .getRelative (BlockFace .DOWN ).getLocation ());
104
+ OreGin oreGin = oreGinMan .getOreGin (destroyed .getLocation ());
105
+ if (oreGinMan .oreGinLightExistsAt (destroyed .getLocation ()))
106
+ oreGin = oreGinMan .getOreGin (destroyed .getRelative (BlockFace .DOWN ).getLocation ());
107
107
108
108
if (!isReinforced (oreGin .getLocation ().getBlock ()) &&
109
109
!isReinforced (oreGin .getLocation ().getBlock ().getRelative (BlockFace .UP )))
@@ -126,22 +126,22 @@ else if (isReinforced(oreGin.getLocation().getBlock()) ||
126
126
* Checks to see if an OreGin has been placed
127
127
*/
128
128
@ EventHandler
129
- public void OreGinPlaced (BlockPlaceEvent event )
129
+ public void oreGinPlaced (BlockPlaceEvent event )
130
130
{
131
131
Block placed = event .getBlock ();
132
132
133
- if (oreGinMan .IsOreGin (event .getItemInHand ()))
133
+ if (oreGinMan .isOreGin (event .getItemInHand ()))
134
134
{
135
- if (OreGin .validOreGinCreationLocation (placed .getLocation ()))
135
+ if (OreGin .isValidOreGinCreationLocation (placed .getLocation ()))
136
136
{
137
137
OreGin oreGin = new OreGin (placed .getLocation (), OreGin .getTierLevel (event .getItemInHand ().getItemMeta ().getDisplayName ()),
138
138
OreGin .getBlockBreaksFromLore (event .getItemInHand ().getItemMeta ().getLore ()), oreGinMan );
139
- oreGinMan .AddOreGin (oreGin );
139
+ oreGinMan .addOreGin (oreGin );
140
140
event .getPlayer ().sendMessage (ChatColor .GREEN + "An OreGin of tier level " + oreGin .getTierLevel () + " was placed!" );
141
141
}
142
142
else
143
143
{
144
- OreGinSoundCollection .ErrorSound ().playSound (placed .getLocation ());
144
+ OreGinSoundCollection .getErrorSound ().playSound (placed .getLocation ());
145
145
event .getPlayer ().sendMessage (ChatColor .RED + "Space above OreGin must be empty!" );
146
146
event .setCancelled (true );
147
147
}
@@ -153,7 +153,7 @@ public void OreGinPlaced(BlockPlaceEvent event)
153
153
* Helps with organizing inventory
154
154
*/
155
155
@ EventHandler
156
- public void MovedOreGin (InventoryClickEvent event )
156
+ public void movedOreGin (InventoryClickEvent event )
157
157
{
158
158
ItemStack cursorItem = event .getCursor ();
159
159
ItemStack slotItem = event .getCurrentItem ();
@@ -162,7 +162,7 @@ public void MovedOreGin(InventoryClickEvent event)
162
162
{
163
163
if (slotItem .getType () == Material .DISPENSER )
164
164
{
165
- if (oreGinMan .IsOreGin (cursorItem ) || oreGinMan .IsOreGin (slotItem ))
165
+ if (oreGinMan .isOreGin (cursorItem ) || oreGinMan .isOreGin (slotItem ))
166
166
{
167
167
if ((cursorItem .getItemMeta ().getDisplayName () != slotItem .getItemMeta ().getDisplayName ())
168
168
|| cursorItem .getItemMeta ().getLore () != slotItem .getItemMeta ().getLore ())
@@ -180,17 +180,17 @@ public void MovedOreGin(InventoryClickEvent event)
180
180
* Maintains the OreGin lights stable
181
181
*/
182
182
@ EventHandler
183
- public void KeepLightsStable (BlockRedstoneEvent event )
183
+ public void keepLightsStable (BlockRedstoneEvent event )
184
184
{
185
185
if (event .getBlock ().getType ().equals (OreGinPlugin .LIGHT_ON ) || event .getBlock ().getType ().equals (OreGinPlugin .LIGHT_OFF ))
186
186
{
187
- if (oreGinMan .OreGinLightExistsAt (event .getBlock ().getLocation ()))
187
+ if (oreGinMan .oreGinLightExistsAt (event .getBlock ().getLocation ()))
188
188
{
189
- if (oreGinMan .GetOreGin (event .getBlock ().getRelative (BlockFace .DOWN ).getLocation ()).getMining ())
189
+ if (oreGinMan .getOreGin (event .getBlock ().getRelative (BlockFace .DOWN ).getLocation ()).getMining ())
190
190
{
191
191
event .setNewCurrent (1 );
192
192
}
193
- else if (!oreGinMan .GetOreGin (event .getBlock ().getRelative (BlockFace .DOWN ).getLocation ()).getBroken ())
193
+ else if (!oreGinMan .getOreGin (event .getBlock ().getRelative (BlockFace .DOWN ).getLocation ()).getBroken ())
194
194
{
195
195
event .setNewCurrent (0 );
196
196
}
@@ -202,9 +202,9 @@ else if (!oreGinMan.GetOreGin(event.getBlock().getRelative(BlockFace.DOWN).getLo
202
202
* Stops OreGins from dispensing fuel or materials
203
203
*/
204
204
@ EventHandler
205
- public void OreGinDispense (BlockDispenseEvent event )
205
+ public void oreGinDispense (BlockDispenseEvent event )
206
206
{
207
- event .setCancelled (oreGinMan .OreGinExistsAt (event .getBlock ().getLocation ()));
207
+ event .setCancelled (oreGinMan .oreGinExistsAt (event .getBlock ().getLocation ()));
208
208
}
209
209
210
210
0 commit comments