blob: 103b9d4597f2380c9560201d3921d918624563d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
package org.bukkit.craftbukkit.entity;
import net.minecraft.server.EntityBoat;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.Boat;
import org.bukkit.entity.EntityType;
public class CraftBoat extends CraftVehicle implements Boat {
public CraftBoat(CraftServer server, EntityBoat entity) {
super(server, entity);
}
public double getMaxSpeed() {
return getHandle().maxSpeed;
}
public void setMaxSpeed(double speed) {
if (speed >= 0D) {
getHandle().maxSpeed = speed;
}
}
public double getOccupiedDeceleration() {
return getHandle().occupiedDeceleration;
}
public void setOccupiedDeceleration(double speed) {
if (speed >= 0D) {
getHandle().occupiedDeceleration = speed;
}
}
public double getUnoccupiedDeceleration() {
return getHandle().unoccupiedDeceleration;
}
public void setUnoccupiedDeceleration(double speed) {
getHandle().unoccupiedDeceleration = speed;
}
public boolean getWorkOnLand() {
return getHandle().landBoats;
}
public void setWorkOnLand(boolean workOnLand) {
getHandle().landBoats = workOnLand;
}
@Override
public EntityBoat getHandle() {
return (EntityBoat) entity;
}
@Override
public String toString() {
return "CraftBoat";
}
public EntityType getType() {
return EntityType.BOAT;
}
}
|