11.10.2014, 15:55
@123marvin123 Nope i wasn't thats it thanks!
public class VehicleData extends VehicleLifecycleObject {
public VehicleData(EventManager eventManager, Vehicle vehicle) {
super(eventManager, vehicle);
}
@Override
public void onInit() {
}
@Override
public void onDestroy() {
}
public int getFuel() {
return 50;
}
}
private VehicleLifecycleHolder vehicleLifecycleHolder;
....
vehicleLifecycleHolder = new VehicleLifecycleHolder(eventManager);
vehicleLifecycleHolder.registerClass(VehicleData.class);
Vehicle.create(560, x, y, z, 0, 0, 0, 0, 0, -1);
VehicleData vehicleData = vehicleLifecycleHolder.getObject(vehicle, VehicleData.class);
int fuel = vehicleData.getFuel();
[13:29:18][INFO][ResourceManagerImpl] Load gamemode: Military Conflict [13:29:18][ERROR][err] java.lang.UnsatisfiedLinkError: net.gtaun.shoebill.SampNa tiveFunction.addPlayerClassEx(IIFFFFIIIIII)I [13:29:18][ERROR][err] at net.gtaun.shoebill.SampNativeFunction.addPlayerClassE x(Native Method) [13:29:18][ERROR][err] at net.gtaun.shoebill.object.impl.WorldImpl.addPlayerCla ss(WorldImpl.java:83) [13:29:18][ERROR][err] at drumyum.mcgm.MCGamemode.onEnable(MCGamemode.java:25) [13:29:18][ERROR][err] at net.gtaun.shoebill.resource.Resource.enable(Resource. java:88) [13:29:18][ERROR][err] at net.gtaun.shoebill.resource.ResourceManagerImpl.loadG amemode(ResourceManagerImpl.java:214) [13:29:18][ERROR][err] at net.gtaun.shoebill.resource.ResourceManagerImpl.loadA llResource(ResourceManagerImpl.java:72) [13:29:18][ERROR][err] at net.gtaun.shoebill.ShoebillImpl.loadPluginsAndGamemod e(ShoebillImpl.java:263) [13:29:18][ERROR][err] at net.gtaun.shoebill.ShoebillImpl.access$100(ShoebillIm pl.java:51) [13:29:18][ERROR][err] at net.gtaun.shoebill.ShoebillImpl$1.onGameModeInit(Shoe billImpl.java:163) [13:29:18][ERROR][err] at net.gtaun.shoebill.samp.SampCallbackManagerImpl$1.lam bda$onGameModeInit$3(SampCallbackManagerImpl.java:86) [13:29:18][ERROR][err] at net.gtaun.shoebill.samp.SampCallbackManagerImpl$1$$La mbda$3/22147182.call(Unknown Source) [13:29:18][ERROR][err] at net.gtaun.shoebill.util.TryUtils.tryTo(TryUtils.java: 21) [13:29:18][ERROR][err] at net.gtaun.shoebill.util.TryUtils.tryTo(TryUtils.java: 14) [13:29:18][ERROR][err] at net.gtaun.shoebill.samp.SampCallbackManagerImpl$1.onG ameModeInit(SampCallbackManagerImpl.java:86) Filterscript 'ShoebillFS.amx' loaded. Number of vehicle models: 0
world.addPlayerClass(RUSpawnInfo);
public static SpawnInfo RUSpawnInfo = new SpawnInfo(TEAM_SPAWN_LOCATIONS[RU_TEAM_ID], SKIN_SELECT_ANGLE, 285, RU_TEAM_ID, WeaponModel.DEAGLE, 49, WeaponModel.AK47, 120, WeaponModel.MOLTOV, 5);
world.addPlayerClass(285, TEAM_SPAWN_LOCATIONS[RU_TEAM_ID].x, TEAM_SPAWN_LOCATIONS[RU_TEAM_ID].y, TEAM_SPAWN_LOCATIONS[RU_TEAM_ID].z, SKIN_SELECT_ANGLE, WeaponModel.DEAGLE.getId(), 50, WeaponModel.AK47.getId(), 120, WeaponModel.MOLTOV.getId(), 5);
world.addPlayerClass ( RUSpawnInfo.skinId, RUSpawnInfo.location.x, RUSpawnInfo.location.y, RUSpawnInfo.location.z, RUSpawnInfo.location.angle, RUSpawnInfo.weapon1.getModel().getId(), RUSpawnInfo.weapon1.getAmmo(), RUSpawnInfo.weapon2.getModel().getId(), RUSpawnInfo.weapon2.getAmmo(), RUSpawnInfo.weapon3.getModel().getId(), RUSpawnInfo.weapon3.getAmmo() );
p.showDialog(123, DialogStyle.INPUT, "Регистрация", "Введите пароль:", "Далее", "Выход");
<dependency>
<groupId>net.gtaun</groupId>
<artifactId>shoebill-common</artifactId>
<version>1.0-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
InputDialog.create(player, rootEventManager)
.caption("Login for Player " + player.getName())
.message("Please enter the password for account " + player.getName())
.buttonCancel("Disconnect")
.buttonOk("Login")
.onClickOk((inputDialog, s) -> player.sendMessage(Color.ORANGE, "You entered the password " + s))
.onClickCancel(abstractDialog -> player.kick())
.build()
.show();
DialogId myDialog = DialogId.create();
//Or
DialogId myDialog2 = DialogId.create((dialogId, player1, i, i1, s) -> {
player1.sendMessage(Color.RED, "Response");
return true;
});
InputDialog loginDialog = InputDialog.create(player, rootEventManager)
.caption("Login for Player " + player.getName())
.message("Please enter the password for account " + player.getName())
.buttonCancel("Disconnect")
.buttonOk("Login")
.onClickOk((inputDialog, s) -> player.sendMessage(Color.ORANGE, "You entered the password " + s))
.onClickCancel(abstractDialog -> player.kick())
.build();
loginDialog.setCaption("New caption");
loginDialog.show();
ListDialog myListDialog = ListDialog.(...).build();
for(int i = 0; i < 20; i++) {
myListDialog.addItem("Item nr." + i);
}
myListDialog.show();
playerLifecycleHolder.registerClass(PlayerMC.class, (eventManager, p) -> new PlayerMC(eventManager, p)); playerLifecycleHolder.registerClass(PlayerMC.class);
EventManagerNode vehicleEventNode = eventManager.createChildNode();
vehicleEventNode.registerHandler(VehicleCreateEvent.class, (e) -> {
});
vehicleEventNode.registerHandler(VehicleDestroyEvent.class, (e) -> {
});
EventManagerNode playerEventNode = eventManager.createChildNode();
playerEventNode.registerHandler(PlayerConnectEvent.class, (e) -> {
});
playerEventNode.registerHandler(PlayerDisconnectEvent.class, (e) -> {
});
//Don't need vehicle events anymore, so just destroy. Player Events will still remain
vehicleEventNode.cancelAll();
vehicleEventNode.destroy();
export JAVA_HOME=/usr/java/jre1.8.0_25 export LD_LIBRARY_PATH=.:$JAVA_HOME/lib/i386/server:$JAVA_HOME/lib/i386/client:/usr/local/lib ./samp03svr
Started server on port: 7777, with maxplayers: 20 lanmode is OFF. Shoebill Dependency Manager 1.0-SNAPSHOT Build 49 (for net.gtaun:shoebill-api:1.0) Build date: 2014-05-26 22:19:10 CST (+0800) Resolving dependencies... SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Skipped artifact example-lvdm-1.0-SNAPSHOT (Gamemode) Missing artifact descriptor for org.yaml:snakeyaml:jar:1.13 Missing artifact descriptor for org.slf4j:slf4j-api:jar:1.7.2 Missing artifact descriptor for net.gtaun:util-event:jar:1.0-SNAPSHOT Missing artifact descriptor for org.slf4j:slf4j-api:jar:1.7.7 Missing artifact descriptor for net.gtaun:shoebill-launcher:jar:1.0-SNAPSHOT Missing artifact descriptor for org.slf4j:slf4j-log4j12:jar:1.7.7 Missing artifact descriptor for net.gtaun.mk:mk-plugin-manager:jar:1.0-SNAPSHOT Missing artifact descriptor for net.gtaun.shoebill:example-vehicle-manager-plugin:jar:1.0-SNAPSHOT Missing artifact descriptor for net.gtaun:shoebill-common:jar:1.0-SNAPSHOT org.eclipse.aether.collection.DependencyCollectionException: Failed to collect dependencies at net.gtaun:shoebill-runtime:jar:1.0-SNAPSHOT -> net.gtaun:shoebill-api:jar:1.0-SNAPSHOT -> net.gtaun:shoebill-utilities:jar:1.0-SNAPSHOT -> org.apache.commons:commons-lang3:jar:3.3.1 at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:303) at org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:337) at net.gtaun.shoebill.dependency.ShoebillDependencyManager.resolveDependencies(ShoebillDependencyManager.java:223) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.gtaun.shoebill.ShoebillLauncher.resolveDependencies(ShoebillLauncher.java:55) Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.apache.commons:commons-lang3:jar:3.3.1 at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:370) at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:217) at org.eclipse.aether.internal.impl.DefaultDependencyCollector.resolveCachedArtifactDescriptor(DefaultDependencyCollector.java:537) at org.eclipse.aether.internal.impl.DefaultDependencyCollector.getArtifactDescriptorResult(DefaultDependencyCollector.java:521) at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:421) at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:375) at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:363) at org.eclipse.aether.internal.impl.DefaultDependencyCollector.doRecurse(DefaultDependencyCollector.java:506) at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:470) at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:375) at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:363) at org.eclipse.aether.internal.impl.DefaultDependencyCollector.doRecurse(DefaultDependencyCollector.java:506) at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:470) at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:375) at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:363) at org.eclipse.aether.internal.impl.DefaultDependencyCollector.doRecurse(DefaultDependencyCollector.java:506) at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:470) at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:375) at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:363) at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:266) ... 7 more Caused by: org.apache.maven.model.resolution.UnresolvableModelException: Cannot access central (http://repo1.maven.org/maven2/) in offline mode and the artifact org.apache:apache:pom:13 has not been downloaded from it before. at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:126) at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:817) at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:669) at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:307) at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:361) ... 26 more Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Cannot access central (http://repo1.maven.org/maven2/) in offline mode and the artifact org.apache:apache:pom:13 has not been downloaded from it before. at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:462) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:264) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:241) at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:122) ... 30 more Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Cannot access central (http://repo1.maven.org/maven2/) in offline mode and the artifact org.apache:apache:pom:13 has not been downloaded from it before. at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:409) ... 33 more Caused by: org.eclipse.aether.transfer.RepositoryOfflineException: Cannot access central (http://repo1.maven.org/maven2/) in offline mode at org.eclipse.aether.internal.impl.DefaultOfflineController.checkOffline(DefaultOfflineController.java:87) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:405) ... 33 more java.lang.IllegalArgumentException: dependency node or collect request missing at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:375) at net.gtaun.shoebill.dependency.ShoebillDependencyManager.resolveDependencies(ShoebillDependencyManager.java:235) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.gtaun.shoebill.ShoebillLauncher.resolveDependencies(ShoebillLauncher.java:55)